/* ================================================
   BOSS TECH - Premium Design System
   Elegant Navy & Gold Theme
   ================================================ */

/* ============ CSS Variables ============ */
:root {
    /* Primary - Deep Navy/Indigo */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;

    /* Accent - Gold/Amber (complementary to logo) */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;

    /* Status Colors */
    --success: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --purple: #8b5cf6;
    --purple-dark: #7c3aed;

    /* Neutral - Slate tones */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Transitions */
    --transition-fast: 150ms;
    --transition-normal: 200ms;
    --transition-slow: 300ms;
    --transition-slower: 400ms;

    /* Premium Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Glow effects */
    --glow-gold: 0 0 20px rgba(245, 158, 11, 0.3);
    --glow-primary: 0 0 20px rgba(79, 70, 229, 0.3);
    --glow-success: 0 0 20px rgba(16, 185, 129, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* ============ Base Styles ============ */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ============ Animations ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-5%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn var(--transition-normal) ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown var(--transition-slow) ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft var(--transition-slow) ease-out;
}

.animate-slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

.animate-scale-in {
    animation: scaleIn var(--transition-normal) ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Staggered animations */
.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
.stagger-6 { animation-delay: 300ms; }
.stagger-7 { animation-delay: 350ms; }
.stagger-8 { animation-delay: 400ms; }
.stagger-9 { animation-delay: 450ms; }
.stagger-10 { animation-delay: 500ms; }

/* ============ Enhanced Animations ============ */

/* Pop animation for interactive elements */
@keyframes pop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pop {
    animation: pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glow pulse for highlights */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(79, 70, 229, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(79, 70, 229, 0.6), 0 0 40px rgba(79, 70, 229, 0.3);
    }
}

.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Float animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Heartbeat for notifications */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Page transition */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-enter {
    animation: pageEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Main content animation */
main {
    animation: pageEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-count {
    animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Link hover underline animation */
.link-animated {
    position: relative;
    text-decoration: none;
}

.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 1px;
}

.link-animated:hover::after {
    width: 100%;
}

/* Card hover lift */
.card-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Icon bounce on hover */
.icon-bounce:hover i,
.icon-bounce:hover svg {
    animation: bounce 0.5s ease;
}

/* Ripple effect for buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Table row hover slide */
.table tbody tr {
    transition: transform 0.2s ease, background 0.2s ease;
}

.table tbody tr:hover {
    transform: translateX(4px);
}

/* Stats card number animation */
.stats-value {
    transition: transform 0.3s ease;
}

.stats-card:hover .stats-value {
    transform: scale(1.05);
}

/* Badge pulse for new items */
.badge-new {
    position: relative;
}

.badge-new::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: inherit;
    opacity: 0.5;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============ Buttons - Premium Styling ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal) ease;
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    pointer-events: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, var(--danger) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--slate-500) 0%, var(--slate-600) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--slate-400) 0%, var(--slate-500) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--slate-300);
    color: var(--slate-700);
}

.btn-outline::before {
    display: none;
}

.btn-outline:hover {
    background-color: var(--slate-100);
    border-color: var(--slate-400);
    transform: translateY(-1px);
}

.dark .btn-outline {
    border-color: var(--slate-600);
    color: var(--slate-300);
}

.dark .btn-outline:hover {
    background-color: var(--slate-700);
    border-color: var(--slate-500);
}

/* Gold accent button */
.btn-gold {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: var(--glow-gold);
}

/* Button with icon */
.btn i, .btn svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
    vertical-align: middle;
}

.btn-icon {
    padding: 0.625rem;
}

.btn-icon i, .btn-icon svg {
    margin-right: 0;
}

/* ============ Cards - Premium Glass Effect ============ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition-normal) ease;
    animation: fadeInUp var(--transition-slow) ease-out;
    border: 1px solid var(--slate-200);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--slate-300);
}

.dark .card {
    background: var(--slate-800);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark .card::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.dark .card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background: var(--slate-50);
}

.dark .card-header {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-800);
}

.dark .card-title {
    color: white;
}

.card-title i, .card-title svg {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--primary);
    flex-shrink: 0;
}

.dark .card-title i, .dark .card-title svg {
    color: var(--primary-light);
}

.card-body {
    padding: 1.5rem;
}

.card-clickable {
    cursor: pointer;
}

.card-clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ============ Tables - Premium Styling ============ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--slate-100) 100%);
}

.dark .table thead {
    background: linear-gradient(135deg, var(--slate-800) 0%, var(--slate-900) 100%);
}

.table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-500);
}

.dark .table th {
    color: var(--slate-400);
}

.table td {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--slate-200);
    color: var(--slate-700);
}

.dark .table td {
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--slate-300);
}

.table tbody tr {
    transition: all var(--transition-fast) ease;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.03) 0%, rgba(79, 70, 229, 0.01) 100%);
}

.dark .table tbody tr:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

/* ============ Forms - Premium Styling ============ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dark .form-label {
    color: var(--slate-300);
}

/* Base styles for all form inputs */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 2.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.5;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-md);
    background-color: white;
    color: var(--slate-800);
    transition: all var(--transition-normal) ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Textarea specific - allow auto height */
.form-textarea {
    height: auto;
    min-height: 5rem;
    resize: vertical;
}

/* Select specific - custom arrow */
.form-select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    cursor: pointer;
}

/* Date input specific */
input[type="date"].form-input {
    padding-right: 2.5rem;
    position: relative;
}

/* Custom date picker icon */
input[type="date"].form-input::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'/%3E%3Cline x1='16' x2='16' y1='2' y2='6'/%3E%3Cline x1='8' x2='8' y1='2' y2='6'/%3E%3Cline x1='3' x2='21' y1='10' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.125rem;
    cursor: pointer;
    opacity: 1;
    padding: 0.5rem;
    margin: 0;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Firefox date input */
input[type="date"].form-input::-moz-calendar-picker-indicator {
    cursor: pointer;
}

/* Focus states */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Hover states */
.form-input:hover:not(:focus),
.form-select:hover:not(:focus),
.form-textarea:hover:not(:focus) {
    border-color: var(--slate-300);
    background-color: var(--slate-50);
}

/* Placeholder styling */
.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Dark mode styles */
.dark .form-input,
.dark .form-select,
.dark .form-textarea {
    background-color: var(--slate-900);
    border-color: var(--slate-700);
    color: var(--slate-100);
}

.dark .form-input:hover:not(:focus),
.dark .form-select:hover:not(:focus),
.dark .form-textarea:hover:not(:focus) {
    border-color: var(--slate-600);
    background-color: var(--slate-800);
}

.dark .form-input:focus,
.dark .form-select:focus,
.dark .form-textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
}

/* Dark mode select arrow */
.dark .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ============ Premium Select Design ============ */
.dark .form-select {
    background-color: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(99, 102, 241, 0.25);
    border-radius: 0.75rem;
    color: #f1f5f9;
    font-weight: 500;
    padding-right: 2.75rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.125rem;
}

.dark .form-select:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background-color: rgba(30, 41, 59, 0.8);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(99, 102, 241, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.dark .form-select:focus {
    outline: none;
    border-color: #6366f1;
    background-color: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 8px 16px -4px rgba(0, 0, 0, 0.25);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a5b4fc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Select options */
.dark .form-select option {
    background-color: #1e293b;
    color: #f1f5f9;
    padding: 0.75rem 1rem;
}

.dark .form-select option:checked {
    background-color: #4f46e5;
    color: white;
}

/* Disabled state */
.dark .form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filter bar selects */
.filter-bar .form-select {
    height: 2.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.8125rem;
}

/* Dark mode date picker icon */
.dark input[type="date"].form-input::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'/%3E%3Cline x1='16' x2='16' y1='2' y2='6'/%3E%3Cline x1='8' x2='8' y1='2' y2='6'/%3E%3Cline x1='3' x2='21' y1='10' y2='10'/%3E%3C/svg%3E");
    filter: none;
}

/* Dark mode placeholder */
.dark .form-input::placeholder,
.dark .form-textarea::placeholder {
    color: #6b7280;
}

/* ============ Search Input (Top Bar) ============ */
.search-input {
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.5;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #f9fafb;
    color: #1f2937;
    transition: all var(--transition-fast) ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-input:hover {
    border-color: #d1d5db;
    background-color: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Dark mode search input */
.dark .search-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.dark .search-input:hover {
    border-color: #6b7280;
    background-color: #3f4a5c;
}

.dark .search-input:focus {
    border-color: var(--primary-light);
    background-color: #374151;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.dark .search-input::placeholder {
    color: #6b7280;
}

/* ============ Badges - Premium Styling ============ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius);
    transition: all var(--transition-fast) ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge i, .badge svg {
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.375rem;
    flex-shrink: 0;
}

/* Type badge with icon - ensures proper inline alignment */
.type-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.375rem;
}

.type-badge i, .type-badge svg {
    width: 0.875rem !important;
    height: 0.875rem !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dark .badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: var(--success-light);
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: var(--accent-dark);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.dark .badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: var(--accent-light);
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dark .badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.dark .badge-info {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(79, 70, 229, 0.1) 100%);
    color: var(--primary-light);
    border-color: rgba(79, 70, 229, 0.3);
}

.badge-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.dark .badge-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.3);
}

.badge-gray {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.15) 0%, rgba(100, 116, 139, 0.1) 100%);
    color: var(--slate-600);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.dark .badge-gray {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.2) 0%, rgba(100, 116, 139, 0.1) 100%);
    color: var(--slate-300);
    border-color: rgba(100, 116, 139, 0.3);
}

/* ============ Toggle Button (Pago/Nao Pago) ============ */
.toggle-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: all var(--transition-normal) ease;
    border: none;
    outline: none;
}

.toggle-btn:hover {
    transform: scale(1.02);
}

.toggle-btn:active {
    transform: scale(0.98);
}

.toggle-btn-success {
    background-color: #22c55e;
    color: white;
}

.toggle-btn-success:hover {
    background-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.toggle-btn-danger {
    background-color: #ef4444;
    color: white;
}

.toggle-btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.toggle-btn i, .toggle-btn svg {
    width: 0.875rem;
    height: 0.875rem;
    margin-right: 0.375rem;
    flex-shrink: 0;
    vertical-align: middle;
    transition: transform var(--transition-normal) ease;
}

.toggle-btn:hover i,
.toggle-btn:hover svg {
    transform: scale(1.1);
}

/* ============ Links - Premium Styling ============ */
.link {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast) ease;
    font-weight: 500;
}

.link:hover {
    color: var(--primary-light);
}

.link-back {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--slate-500);
    transition: all var(--transition-fast) ease;
    margin-bottom: 1rem;
    font-weight: 500;
}

.link-back:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

.link-back i, .link-back svg {
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
    transition: transform var(--transition-fast) ease;
}

.link-back:hover i,
.link-back:hover svg {
    transform: translateX(-3px);
}

/* ============ Action Icons - Premium ============ */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    transition: all var(--transition-normal) ease;
    cursor: pointer;
    position: relative;
}

.action-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--transition-fast) ease;
}

.action-icon:hover {
    transform: scale(1.1);
}

.action-icon:hover::before {
    opacity: 0.1;
}

.dark .action-icon:hover::before {
    opacity: 0.15;
}

.action-icon i, .action-icon svg {
    width: 1rem;
    height: 1rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.action-icon-edit {
    color: var(--slate-500);
}

.action-icon-edit:hover {
    color: var(--primary);
}

.action-icon-delete {
    color: var(--slate-500);
}

.action-icon-delete:hover {
    color: var(--danger);
}

.action-icon-warning {
    color: var(--slate-500);
}

.action-icon-warning:hover {
    color: var(--warning);
}

.action-icon-pdf {
    color: var(--slate-500);
}

.action-icon-pdf:hover {
    color: var(--accent);
}

/* ============ Alerts - Premium Styling ============ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    animation: slideInLeft var(--transition-slow) ease-out;
    backdrop-filter: blur(8px);
}

.alert i, .alert svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: var(--danger);
    color: var(--danger);
}

.dark .alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
    color: #fca5a5;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: var(--accent);
    color: var(--accent-dark);
}

.dark .alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
    color: var(--accent-light);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: var(--success);
    color: var(--success-dark);
}

.dark .alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
    color: var(--success-light);
}

.alert-info {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-color: var(--primary);
    color: var(--primary);
}

.dark .alert-info {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.08) 100%);
    color: var(--primary-light);
}

/* ============ Sidebar - Premium Dark Navy ============ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 16rem;
    height: 100vh;
    background: linear-gradient(180deg, var(--slate-900) 0%, var(--slate-950) 100%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.sidebar-subtitle {
    font-size: 0.7rem;
    color: var(--slate-500);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--slate-400);
    transition: all var(--transition-normal) ease;
    border-radius: var(--radius-md);
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform var(--transition-normal) ease;
    border-radius: 0 2px 2px 0;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--slate-100);
}

.sidebar-link:hover::before {
    transform: scaleY(0.6);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: var(--accent-light);
}

.sidebar-link.active::before {
    transform: scaleY(1);
    box-shadow: var(--glow-gold);
}

.sidebar-link i, .sidebar-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    transition: transform var(--transition-fast) ease;
}

.sidebar-link:hover i,
.sidebar-link:hover svg {
    transform: scale(1.1);
}

.sidebar-section {
    padding: 1rem 0.5rem;
    margin-top: 0.5rem;
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate-600);
    margin-bottom: 0.75rem;
    padding: 0 0.75rem;
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

/* Sidebar User */
.sidebar-user {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    flex-shrink: 0;
}

.sidebar-user-info {
    margin-left: 0.75rem;
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    color: var(--slate-100);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: var(--slate-500);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    line-height: 1.5;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    color: var(--slate-500);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast) ease;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
}

.sidebar-logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-logout i,
.sidebar-logout svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    transition: transform var(--transition-fast) ease;
}

.sidebar-logout:hover i,
.sidebar-logout:hover svg {
    transform: translateX(-2px);
}

/* ============ Page Header - Premium ============ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    animation: fadeInUp var(--transition-slow) ease-out;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.025em;
}

.dark .page-title {
    color: white;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-top: 0.375rem;
    font-weight: 500;
}

.dark .page-subtitle {
    color: var(--slate-400);
}

/* ============ Stats Cards - Premium ============ */
.stats-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all var(--transition-normal) ease;
    border: 1px solid var(--slate-200);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal) ease;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--slate-300);
}

.stats-card:hover::before {
    opacity: 1;
}

.dark .stats-card {
    background: var(--slate-800);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark .stats-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.stats-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stats-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    filter: blur(8px);
    opacity: 0.4;
    z-index: -1;
}

.stats-icon i, .stats-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.stats-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 0.75rem;
    color: var(--slate-900);
    letter-spacing: -0.025em;
}

.dark .stats-value {
    color: white;
}

.stats-label {
    font-size: 0.8rem;
    color: var(--slate-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .stats-label {
    color: var(--slate-400);
}

/* ============ Dropdown ============ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 12rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal) ease;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dark .dropdown-menu {
    background-color: #1f2937;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #374151;
    transition: background-color var(--transition-fast) ease;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dark .dropdown-item {
    color: #e5e7eb;
}

.dark .dropdown-item:hover {
    background-color: #374151;
}

/* ============ Modal - Premium Styling ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    max-width: 28rem;
    width: 100%;
    margin: 1rem;
    transform: scale(0.95) translateY(10px);
    transition: all var(--transition-slow) ease;
    border: 1px solid var(--slate-200);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.dark .modal {
    background: var(--slate-800);
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    background: var(--slate-50);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.dark .modal-header {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.025em;
}

.dark .modal-title {
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--slate-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--slate-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.dark .modal-footer {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

/* ============ Modal Fullscreen - Premium ============ */
.modal-fullscreen {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-fullscreen.active {
    display: flex !important;
}

.modal-fullscreen .modal-content {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    animation: scaleIn var(--transition-normal) ease-out;
    margin: auto;
    border: 1px solid var(--slate-200);
}

.modal-fullscreen .modal-content.modal-sm {
    max-width: 28rem;
}

.modal-fullscreen .modal-content.modal-md {
    max-width: 36rem;
}

.modal-fullscreen .modal-content.modal-lg {
    max-width: 48rem;
}

.modal-fullscreen .modal-content.modal-xl {
    max-width: 64rem;
}

.dark .modal-fullscreen .modal-content {
    background: var(--slate-800);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Modal close button */
.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #6b7280;
    transition: all var(--transition-fast) ease;
    cursor: pointer;
    background: transparent;
    border: none;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.dark .modal-close:hover {
    background-color: #374151;
    color: #e5e7eb;
}

/* ============ Loading States ============ */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.dark .loading::after {
    background-color: rgba(17, 24, 39, 0.7);
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.375rem;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* ============ Empty States ============ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}

.empty-state i, .empty-state svg {
    display: block;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.empty-state-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* ============ Filter Bar ============ */
.filter-bar {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    animation: fadeInUp var(--transition-slow) ease-out;
}

.dark .filter-bar {
    background-color: #1f2937;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ============ Tooltips ============ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    background-color: #1f2937;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast) ease;
    pointer-events: none;
    margin-bottom: 0.5rem;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ============ Focus Visible ============ */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============ Selection ============ */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
}

/* ============ Flatpickr Custom Theme ============ */
.flatpickr-calendar {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    padding: 0;
    overflow: hidden;
}

.flatpickr-calendar::before,
.flatpickr-calendar::after {
    display: none;
}

.flatpickr-months {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 0.75rem;
    border-radius: 0.75rem 0.75rem 0 0;
}

.flatpickr-months .flatpickr-month {
    height: auto;
}

.flatpickr-current-month {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    padding: 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent;
    color: white;
    font-weight: 600;
    border: none;
    appearance: none;
    -webkit-appearance: none;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.flatpickr-current-month input.cur-year {
    color: white;
    font-weight: 600;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: white;
    fill: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    background: rgba(255, 255, 255, 0.2);
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    width: 14px;
    height: 14px;
}

.flatpickr-innerContainer {
    padding: 0.5rem;
}

.flatpickr-weekdays {
    background: transparent;
    padding: 0.5rem 0;
}

.flatpickr-weekday {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.flatpickr-days {
    width: 100%;
}

.dayContainer {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.flatpickr-day {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: none;
    max-width: none;
    height: 2.25rem;
    line-height: 2.25rem;
    margin: 1px;
    transition: all 0.15s ease;
}

.flatpickr-day:hover {
    background: #eff6ff;
    border: none;
    color: #3b82f6;
}

.flatpickr-day.today {
    background: #dbeafe;
    border: none;
    color: #2563eb;
    font-weight: 600;
}

.flatpickr-day.today:hover {
    background: #bfdbfe;
    color: #1d4ed8;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #d1d5db;
}

.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
    background: #f3f4f6;
    color: #9ca3af;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: #e5e7eb;
    background: transparent;
    cursor: not-allowed;
}

/* Flatpickr input wrapper */
.flatpickr-input + input.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'/%3E%3Cline x1='16' x2='16' y1='2' y2='6'/%3E%3Cline x1='8' x2='8' y1='2' y2='6'/%3E%3Cline x1='3' x2='21' y1='10' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.125rem;
    cursor: pointer;
}

.dark .flatpickr-input + input.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'/%3E%3Cline x1='16' x2='16' y1='2' y2='6'/%3E%3Cline x1='8' x2='8' y1='2' y2='6'/%3E%3Cline x1='3' x2='21' y1='10' y2='10'/%3E%3C/svg%3E");
}

/* Dark mode Flatpickr */
.dark .flatpickr-calendar {
    background: #1f2937;
    border-color: #374151;
}

.dark .flatpickr-weekday {
    color: #9ca3af;
}

.dark .flatpickr-day {
    color: #e5e7eb;
}

.dark .flatpickr-day:hover {
    background: #374151;
    color: #60a5fa;
}

.dark .flatpickr-day.today {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.dark .flatpickr-day.today:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.dark .flatpickr-day.selected,
.dark .flatpickr-day.selected:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.dark .flatpickr-day.prevMonthDay,
.dark .flatpickr-day.nextMonthDay {
    color: #4b5563;
}

.dark .flatpickr-day.prevMonthDay:hover,
.dark .flatpickr-day.nextMonthDay:hover {
    background: #374151;
    color: #6b7280;
}

.dark .flatpickr-day.disabled {
    color: #374151;
}

/* ============ Print ============ */
@media print {
    .sidebar,
    .no-print {
        display: none !important;
    }

    .ml-64 {
        margin-left: 0 !important;
    }
}

/* ============ Additional Dark Mode Fixes ============ */
.dark .empty-state {
    color: #9ca3af;
}

.dark .empty-state i,
.dark .empty-state svg {
    color: #6b7280;
}

.dark .empty-state-title {
    color: #e5e7eb;
}

.dark .link {
    color: #60a5fa;
}

.dark .link:hover {
    color: #93c5fd;
}

.dark .link-back {
    color: #60a5fa;
}

.dark .link-back:hover {
    color: #93c5fd;
}

.dark .action-icon-edit {
    color: #9ca3af;
}

.dark .action-icon-edit:hover {
    color: #60a5fa;
    background-color: rgba(59, 130, 246, 0.1);
}

.dark .action-icon-delete {
    color: #9ca3af;
}

.dark .action-icon-delete:hover {
    color: #f87171;
    background-color: rgba(239, 68, 68, 0.1);
}

.dark .action-icon-warning {
    color: #9ca3af;
}

.dark .action-icon-warning:hover {
    color: #fbbf24;
    background-color: rgba(245, 158, 11, 0.1);
}

.dark .text-gray-800 {
    color: #f3f4f6;
}

.dark .text-gray-600 {
    color: #d1d5db;
}

.dark .text-gray-500 {
    color: #9ca3af;
}

.dark .text-gray-400 {
    color: #6b7280;
}

.dark .font-medium.text-gray-800 {
    color: #f9fafb;
}

.dark .text-green-600 {
    color: #4ade80;
}

.dark .text-red-600 {
    color: #f87171;
}

.dark .text-indigo-600 {
    color: #a5b4fc;
}

.dark .text-blue-600 {
    color: #60a5fa;
}

.dark .border-gray-200 {
    border-color: #374151;
}

.dark .border-t {
    border-color: #374151;
}

/* Dark mode for table text */
.dark .table td {
    color: #e5e7eb;
}

.dark .font-mono {
    color: #d1d5db;
}

/* Fix for form placeholders in dark mode */
.dark .form-input::placeholder,
.dark .form-textarea::placeholder {
    color: #6b7280;
}

/* Dark mode for select options */
.dark .form-select option {
    background-color: #374151;
    color: #f3f4f6;
}

/* Better contrast for badges in both modes */
.badge-success {
    background-color: #22c55e;
    color: white;
}

.badge-warning {
    background-color: #f59e0b;
    color: white;
}

.badge-danger {
    background-color: #ef4444;
    color: white;
}

.badge-info {
    background-color: #3b82f6;
    color: white;
}

.badge-purple {
    background-color: #8b5cf6;
    color: white;
}

.badge-gray {
    background-color: #6b7280;
    color: white;
}

/* Dark mode for stats values */
.dark .stats-value {
    color: #f9fafb;
}

/* Fix for checkbox labels */
.dark label[for] {
    color: #d1d5db;
}

/* Dark mode for card body text */
.dark .card-body {
    color: #e5e7eb;
}

/* Fix for the total card in pagamentos */
.dark [style*="background: linear-gradient"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.1)) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.dark [style*="background: linear-gradient"] .text-green-700 {
    color: #86efac !important;
}

.dark [style*="background: linear-gradient"] .text-green-600 {
    color: #4ade80 !important;
}

/* Fix for color buttons that Tailwind may not generate */
.bg-emerald-600 {
    background-color: #059669 !important;
}

.hover\:bg-emerald-700:hover {
    background-color: #047857 !important;
}

.bg-blue-600 {
    background-color: #2563eb !important;
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8 !important;
}

.bg-green-600 {
    background-color: #16a34a !important;
}

.hover\:bg-green-700:hover {
    background-color: #15803d !important;
}

.bg-purple-600 {
    background-color: #9333ea !important;
}

.hover\:bg-purple-700:hover {
    background-color: #7e22ce !important;
}

.bg-gray-600 {
    background-color: #4b5563 !important;
}

.hover\:bg-gray-700:hover {
    background-color: #374151 !important;
}

.bg-red-600 {
    background-color: #dc2626 !important;
}

.hover\:bg-red-700:hover {
    background-color: #b91c1c !important;
}

.bg-yellow-600 {
    background-color: #ca8a04 !important;
}

.hover\:bg-yellow-700:hover {
    background-color: #a16207 !important;
}

.bg-orange-600 {
    background-color: #ea580c !important;
}

.hover\:bg-orange-700:hover {
    background-color: #c2410c !important;
}

/* Ensure text is white on colored buttons */
.bg-blue-600, .bg-emerald-600, .bg-green-600, .bg-purple-600,
.bg-gray-600, .bg-red-600, .bg-yellow-600, .bg-orange-600 {
    color: white !important;
}

/* ============ Additional Color Contrast Fixes ============ */

/* Dark mode toggle icons */
.dark .dark-icon {
    display: none;
}

.dark .light-icon {
    display: block !important;
    color: #fbbf24;
}

.light-icon {
    display: none;
}

/* Fix for inline status badges in dark mode */
.dark .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

.dark .bg-red-100 {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.dark .bg-yellow-100 {
    background-color: rgba(245, 158, 11, 0.2) !important;
}

.dark .bg-orange-100 {
    background-color: rgba(251, 146, 60, 0.2) !important;
}

.dark .bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

.dark .bg-purple-100 {
    background-color: rgba(139, 92, 246, 0.2) !important;
}

.dark .text-green-800 {
    color: #86efac !important;
}

.dark .text-red-800 {
    color: #fca5a5 !important;
}

.dark .text-yellow-800 {
    color: #fde047 !important;
}

.dark .text-orange-800 {
    color: #fdba74 !important;
}

.dark .text-blue-800 {
    color: #93c5fd !important;
}

.dark .text-purple-800 {
    color: #c4b5fd !important;
}

/* Better text contrast in tables */
.dark table tbody td {
    color: #e5e7eb;
}

.dark .font-medium {
    color: #f3f4f6;
}

.dark .font-semibold {
    color: #f9fafb;
}

.dark .font-bold {
    color: #ffffff;
}

/* Fix for gray text that's too dark in dark mode */
.dark .text-gray-300 {
    color: #d1d5db;
}

/* Better link contrast in dark mode */
.dark a.text-blue-600 {
    color: #60a5fa;
}

.dark a.text-blue-600:hover {
    color: #93c5fd;
}

/* Fix for indigo color in dark mode */
.dark .text-indigo-600 {
    color: #a5b4fc !important;
}

.dark .text-indigo-400 {
    color: #c4b5fd !important;
}

/* Better card text visibility */
.dark .card p,
.dark .card span {
    color: inherit;
}

/* Fix for the gradient card in pagamentos dark mode */
.dark .card[style*="linear-gradient(135deg, #ecfdf5"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.15)) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.dark .card[style*="linear-gradient(135deg, #ecfdf5"] .text-green-700 {
    color: #86efac !important;
}

.dark .card[style*="linear-gradient(135deg, #ecfdf5"] .text-green-600 {
    color: #4ade80 !important;
}

/* Fix for blue gradient card in pagamentos create */
.dark .card[style*="linear-gradient(135deg, #eff6ff"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.15)) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.dark .card[style*="linear-gradient(135deg, #eff6ff"] .text-blue-600 {
    color: #93c5fd !important;
}

.dark .card[style*="linear-gradient(135deg, #eff6ff"] .text-blue-800 {
    color: #bfdbfe !important;
}

/* Fix for green checkbox box in pagamentos */
.dark [style*="background-color: #f0fdf4"] {
    background-color: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.dark [style*="background-color: #f0fdf4"] .text-green-800 {
    color: #86efac !important;
}

/* Footer text in sidebar */
.dark .sidebar-footer .text-gray-500 {
    color: #6b7280 !important;
}

.dark .sidebar-footer .text-gray-400 {
    color: #9ca3af !important;
}

/* Better visibility for placeholder text */
.dark input::placeholder,
.dark textarea::placeholder,
.dark select::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* Better visibility for disabled elements */
.dark input:disabled,
.dark select:disabled,
.dark textarea:disabled {
    background-color: #1f2937 !important;
    color: #6b7280 !important;
    opacity: 0.7;
}

/* Fix for light mode toggle button visibility */
.toggle-btn {
    text-shadow: none;
}

.toggle-btn i,
.toggle-btn svg {
    stroke-width: 2.5;
}

/* Better hover state for action icons in dark mode */
.dark .action-icon {
    color: #9ca3af;
}

.dark .action-icon:hover {
    color: #e5e7eb;
}

/* Specific fixes for pagination and navigation */
.dark .page-item a,
.dark .page-item span {
    color: #d1d5db;
}

/* Fix for notification dropdown text */
.dark #notificationDropdown p {
    color: #9ca3af;
}

.dark #notificationDropdown h3 {
    color: #f3f4f6;
}

/* Fix for search dropdown */
.dark #searchDropdown .search-item {
    color: #e5e7eb;
}

.dark #searchDropdown .search-item:hover {
    background-color: #374151;
}

/* Better visibility for form sections */
.dark .border-t.border-gray-200 {
    border-color: #374151;
}

.dark .pt-6.border-t {
    border-color: #374151;
}

/* Fix visibility of "Voltar" links */
.dark .link-back {
    color: #60a5fa !important;
}

.dark .link-back:hover {
    color: #93c5fd !important;
}

/* Fix for table header visibility */
.dark thead th {
    color: #d1d5db !important;
    background-color: #374151;
}

/* Fix for numeric/value displays */
.dark .text-2xl,
.dark .text-3xl {
    color: #f9fafb;
}

/* Ensure consistent icon colors */
.dark [data-lucide] {
    color: inherit;
}

/* ============ Toast Notifications - Premium ============ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    min-width: 320px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.toast.toast-removing {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

.toast-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon i, .toast-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--slate-400);
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    background: transparent;
    border: none;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.toast-close i, .toast-close svg {
    width: 1rem;
    height: 1rem;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: toastProgress linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Toast Types */
.toast-success .toast-icon {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
.toast-success .toast-progress {
    background: linear-gradient(90deg, var(--success), var(--success-light));
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}
.toast-error .toast-progress {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.toast-warning .toast-progress {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.toast-info .toast-progress {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ============ Loading States - Premium ============ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-sm {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
}

.loading-spinner-lg {
    width: 4rem;
    height: 4rem;
    border-width: 4px;
}

/* Button loading state */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
}

.skeleton-card {
    height: 8rem;
    border-radius: var(--radius-lg);
}

/* ============ Mobile Responsiveness ============ */

/* Mobile menu toggle button */
.mobile-menu-btn {
    display: none;
    padding: 0.625rem;
    border-radius: var(--radius);
    color: var(--slate-400);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
}

.mobile-menu-btn:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-btn i, .mobile-menu-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 39;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tablet styles - 1024px */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 40;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
    }

    main {
        margin-left: 0 !important;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Adjust grid layouts */
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Notification dropdown */
    .notification-dropdown {
        width: 340px;
        right: -60px;
    }
}

/* Mobile styles - 768px */
@media (max-width: 768px) {
    /* Header adjustments */
    .topbar-premium .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hide search bar on small screens */
    .search-input {
        display: none;
    }

    /* Quick action buttons - smaller */
    .quick-action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    .quick-action-btn span {
        display: none;
    }

    /* Page content padding */
    .p-8 {
        padding: 1rem;
    }

    /* Page title */
    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.8125rem;
    }

    /* Cards */
    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.875rem 1rem;
    }

    /* Grid layouts */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .lg\:grid-cols-3,
    .lg\:grid-cols-4 {
        grid-template-columns: 1fr;
    }

    /* Tables - horizontal scroll */
    .overflow-x-auto {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .table {
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }

    /* Form groups */
    .form-group {
        margin-bottom: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    /* Notification dropdown */
    .notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 70vh;
    }

    /* Modal adjustments */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .modal-sm,
    .modal-lg {
        max-width: 100%;
    }

    /* Stats cards */
    .stats-card {
        padding: 1rem;
    }

    .stats-value {
        font-size: 1.5rem;
    }

    /* Filter bars - stack */
    .filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-bar .form-select,
    .filter-bar .form-input {
        width: 100%;
    }

    /* Link back */
    .link-back {
        font-size: 0.8125rem;
    }

    /* Toast notifications */
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    /* Action buttons in cards */
    .flex.gap-2 .btn,
    .flex.gap-3 .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Small mobile - 480px */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.25rem;
    }

    /* Hide some table columns */
    .table .hide-mobile {
        display: none;
    }

    /* Stack action buttons */
    .flex.justify-end.gap-3 {
        flex-direction: column;
    }

    .flex.justify-end.gap-3 .btn {
        width: 100%;
    }

    /* Sidebar */
    .sidebar {
        width: 100%;
    }

    /* Quick actions - icons only */
    .quick-action-btn i {
        margin: 0;
    }

    /* Modal */
    .modal-content {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 280px;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }

    .sidebar-link {
        padding: 0.875rem 1.25rem;
    }

    .table td,
    .table th {
        padding: 1rem 0.75rem;
    }

    /* Remove hover effects that don't work well on touch */
    .card:hover {
        transform: none;
    }

    .table tbody tr:hover {
        transform: none;
    }
}

/* ============ Icon & Color Picker Premium ============ */

/* Icon Picker Grid */
.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Icon Picker */
.icon-option {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--slate-500);
    flex-shrink: 0;
}

.icon-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--slate-300);
    transform: scale(1.1);
}

.icon-option.selected {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-color: var(--primary);
    color: var(--primary-light);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.icon-option i, .icon-option svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Color Picker */
.color-option {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 3px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.color-option:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.color-option.selected {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.color-dot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.color-option.selected .color-check {
    opacity: 1;
}

/* Preview card animation */
#previewCard {
    animation: none;
}

#previewCard.updating {
    animation: previewPulse 0.3s ease;
}

@keyframes previewPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Toggle Switch Premium */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 3.5rem;
    height: 2rem;
    background: rgba(100, 116, 139, 0.3);
    border-radius: 999px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(100, 116, 139, 0.4);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 1.375rem;
    height: 1.375rem;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(1.5rem);
}

.toggle-label {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 3.5rem;
    transition: color 0.2s ease;
}

.toggle-switch input:checked ~ .toggle-label {
    color: var(--success-light);
}

.toggle-switch input:not(:checked) ~ .toggle-label {
    color: var(--slate-500);
}

.toggle-label::before {
    content: attr(data-off);
}

.toggle-switch input:checked ~ .toggle-label::before {
    content: attr(data-on);
}

/* ============ Premium Select Modal ============ */
.select-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.select-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.select-modal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    width: 100%;
    max-width: 480px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.select-modal-overlay.active .select-modal {
    transform: scale(1) translateY(0);
}

.select-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.select-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.select-modal-title i {
    width: 1.25rem;
    height: 1.25rem;
    color: #6366f1;
}

.select-modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.select-modal-close i {
    width: 1rem;
    height: 1rem;
}

.select-modal-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.select-modal-search-input {
    width: 100%;
    height: 2.75rem;
    padding: 0 1rem 0 2.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.625rem;
    color: #f1f5f9;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.875rem center;
}

.select-modal-search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.select-modal-search-input::placeholder {
    color: #64748b;
}

.select-modal-options {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 200px;
    max-height: 350px;
}

.select-modal-options::-webkit-scrollbar {
    width: 6px;
}

.select-modal-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.select-modal-options::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.select-modal-options::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.select-modal-option {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 0.25rem;
    color: #e2e8f0;
    font-weight: 500;
    gap: 0.75rem;
}

.select-modal-option:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
}

.select-modal-option.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #fff;
}

.select-modal-option-check {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.select-modal-option.selected .select-modal-option-check {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
}

.select-modal-option.selected .select-modal-option-check i {
    width: 0.75rem;
    height: 0.75rem;
    color: #fff;
    stroke-width: 3;
}

.select-modal-option-text {
    flex: 1;
    min-width: 0;
}

.select-modal-option-label {
    font-size: 0.9375rem;
    line-height: 1.4;
}

.select-modal-option-desc {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.125rem;
}

.select-modal-empty {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.select-modal-empty i {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* Select Trigger Button */
.select-trigger {
    width: 100%;
    height: 2.75rem;
    padding: 0 2.75rem 0 1rem;
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(99, 102, 241, 0.25);
    border-radius: 0.75rem;
    color: #f1f5f9;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.25s ease;
    position: relative;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.select-trigger::after {
    content: '';
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

.select-trigger:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.2);
}

.select-trigger:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.select-trigger.placeholder {
    color: #64748b;
}

/* Responsive */
@media (max-width: 640px) {
    .select-modal {
        max-width: 100%;
        max-height: 80vh;
        margin: 0.5rem;
    }
    
    .select-modal-options {
        max-height: 50vh;
    }
}
