/**
 * ============================================
 * E-RETRIBUSI - MAIN STYLESHEET
 * ============================================
 * 
 * Main application styles
 * Organized by sections for easy maintenance
 * 
 * Table of Contents:
 * 1. CSS Variables
 * 2. Reset & Base Styles
 * 3. Layout
 * 4. Navigation
 * 5. Forms
 * 6. Buttons
 * 7. Alerts
 * 8. Auth Pages
 * 9. Utilities
 * 10. Responsive
 */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    /* Colors - White & Blue Theme */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;

    /* Glassmorphism Colors - White Theme */
    --glass-white: rgba(255, 255, 255, 0.7);
    --glass-white-strong: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(37, 99, 235, 0.1);
    --glass-shadow: rgba(37, 99, 235, 0.08);

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Typography */
    --font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;

    /* Shadows - Enhanced for Glassmorphism */
    --shadow-sm: 0 1px 3px 0 rgba(37, 99, 235, 0.1);
    --shadow-md: 0 4px 12px -2px rgba(37, 99, 235, 0.15);
    --shadow-lg: 0 10px 25px -5px rgba(37, 99, 235, 0.2);
    --shadow-xl: 0 20px 40px -10px rgba(37, 99, 235, 0.25);
    --shadow-glass: 0 8px 32px 0 rgba(37, 99, 235, 0.12);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.2);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #dbeafe 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(
            at 20% 30%,
            rgba(59, 130, 246, 0.15) 0px,
            transparent 50%
        ),
        radial-gradient(
            at 80% 70%,
            rgba(37, 99, 235, 0.1) 0px,
            transparent 50%
        ),
        radial-gradient(
            at 50% 50%,
            rgba(96, 165, 250, 0.08) 0px,
            transparent 50%
        );
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   3. LAYOUT
   ============================================ */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.main-content {
    flex: 1;
    padding: var(--spacing-xl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   4. NAVIGATION
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: var(--shadow-glass);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: none;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.brand-icon {
    font-size: var(--font-size-2xl);
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--gray-700);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

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

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle::after {
    content: " ▼";
    font-size: var(--font-size-xs);
    margin-left: var(--spacing-xs);
    transition: transform var(--transition-fast);
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    padding: var(--spacing-sm) 0;
    list-style: none;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity var(--transition-base),
        transform var(--transition-base);
    pointer-events: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: fadeInDown 0.3s ease-out;
}

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

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
}

.dropdown-item {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--gray-700);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding-left: calc(var(--spacing-md) + 4px);
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(37, 99, 235, 0.1);
    margin: var(--spacing-sm) 0;
}

.dropdown-header {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
    pointer-events: none;
}

.dropdown-wide {
    min-width: 320px;
}

/* User Menu */
.navbar-user {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.user-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(102, 102, 246, 0.4);
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
    text-shadow: none;
}

.user-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: var(--spacing-sm) 0;
    margin-top: var(--spacing-xs);
    list-style: none;
    z-index: 1001;
}

.user-menu.show {
    display: block;
}

.user-info {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.user-info strong {
    display: block;
    color: var(--gray-800);
    margin-bottom: var(--spacing-xs);
}

.user-info small {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

.menu-divider {
    height: 1px;
    background-color: var(--gray-200);
    margin: var(--spacing-sm) 0;
}

.logout-btn {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    text-align: left;
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--gray-700);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--gray-700);
    left: 0;
    transition: all var(--transition-fast);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* ============================================
   5. FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--gray-700);
    font-size: var(--font-size-sm);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--gray-800);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
}

.form-input::placeholder,
.form-select::placeholder,
.form-textarea::placeholder {
    color: var(--gray-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-glow);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: var(--error-color);
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    display: block;
    margin-top: var(--spacing-xs);
    color: var(--error-color);
    font-size: var(--font-size-sm);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--gray-500);
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--gray-700);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
    color: var(--gray-700);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-group-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   6. BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-base);
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 102, 246, 0.4);
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 102, 246, 0.6);
}

.btn-primary:hover:not(:disabled)::before {
    left: 100%;
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--gray-300);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-error {
    background-color: var(--error-color);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

/* ============================================
   7. ALERTS
   ============================================ */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid;
}

.alert ul {
    margin: 0;
    padding-left: var(--spacing-lg);
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: var(--error-color);
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-info {
    background-color: #cffafe;
    border-color: var(--info-color);
    color: #164e63;
}

/* ============================================
   8. AUTH PAGES
   ============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
}

/* Left Panel - Branding */
.auth-left-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 60%,
        #1e3a8a 100%
    );
    padding: var(--spacing-2xl);
    position: relative;
    overflow: hidden;
}

.auth-left-panel::before {
    content: "";
    position: absolute;
    top: -30%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.auth-left-panel::after {
    content: "";
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.auth-branding {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    max-width: 400px;
    animation: slideUp 0.7s ease-out;
}

.auth-brand-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 24px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3)) brightness(1.1);
    margin-bottom: var(--spacing-xl);
    animation: logoFloat 3s ease-in-out infinite;
}

.brand-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.brand-desc {
    font-size: var(--font-size-base);
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: var(--spacing-2xl);
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: left;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 12px;
    font-size: var(--font-size-sm);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-feature-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Right Panel - Form */
.auth-right-panel {
    width: 480px;
    min-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    background: #f8fafc;
    overflow-y: auto;
}

.auth-card {
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

/* Mobile logo (hidden on desktop) */
.auth-logo-mobile {
    display: none;
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-logo-mobile .logo-image {
    width: 90px;
    height: 90px;
    object-fit: contain;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

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

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    text-shadow: none;
}

.auth-subtitle {
    color: var(--gray-600);
    font-size: var(--font-size-base);
}

.auth-form {
    margin-bottom: var(--spacing-lg);
}

.auth-footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(37, 99, 235, 0.1);
    color: var(--gray-700);
}

.link-forgot,
.link-register {
    color: var(--primary-color);
    font-weight: 500;
    text-shadow: none;
}

.link-forgot:hover,
.link-register:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
    .auth-left-panel {
        padding: var(--spacing-xl);
    }
    .brand-title {
        font-size: 2rem;
    }
    .auth-brand-logo {
        width: 90px;
        height: 90px;
    }
    .auth-right-panel {
        width: 400px;
        min-width: 400px;
        padding: var(--spacing-xl) var(--spacing-lg);
    }
}

/* Mobile: max 768px */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: var(--spacing-lg);
        background: linear-gradient(
            135deg,
            var(--primary-color) 0%,
            #1e3a8a 100%
        );
    }
    .auth-left-panel {
        display: none;
    }
    .auth-right-panel {
        width: 100%;
        min-width: unset;
        max-width: 440px;
        padding: 0;
        background: transparent;
    }
    .auth-card {
        padding: var(--spacing-xl);
        border-radius: 16px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    }
    .auth-logo-mobile {
        display: block;
    }
    .auth-title {
        font-size: var(--font-size-2xl);
    }
}

/* ============================================
   9. UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}
.mt-2 {
    margin-top: var(--spacing-md);
}
.mt-3 {
    margin-top: var(--spacing-lg);
}
.mt-4 {
    margin-top: var(--spacing-xl);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}
.mb-2 {
    margin-bottom: var(--spacing-md);
}
.mb-3 {
    margin-bottom: var(--spacing-lg);
}
.mb-4 {
    margin-bottom: var(--spacing-xl);
}

.hidden {
    display: none;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(37, 99, 235, 0.1);
    padding: var(--spacing-lg) 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-content {
    text-align: center;
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

.footer-version {
    margin-top: var(--spacing-xs);
    color: var(--gray-500);
}

/* Spinner Loading */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ============================================
   CUSTOM PAGINATION
   ============================================ */
.glass-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(37, 99, 235, 0.08);
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.pagination-info strong {
    color: var(--primary-color);
    font-weight: 700;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-item {
    display: flex;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.625rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(37, 99, 235, 0.15);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-link:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.page-link.page-nav {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.page-link.page-current {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    cursor: default;
}

.page-link.page-dots {
    border-color: transparent;
    background: transparent;
    cursor: default;
    color: var(--gray-400);
    letter-spacing: 0.1em;
}

.page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jump-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.jump-input {
    width: 52px;
    height: 36px;
    padding: 0 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.jump-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.jump-input::-webkit-inner-spin-button,
.jump-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Legacy .pagination-wrapper support */
.pagination-wrapper {
    padding: 0;
}

/* ============================================
   10. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-content {
        padding: var(--spacing-md);
    }

    .auth-card {
        padding: var(--spacing-lg);
    }

    .user-name {
        display: none;
    }

    .glass-pagination {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .pagination-pages {
        flex-wrap: wrap;
    }

    .pagination-jump {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    pointer-events: none;
    max-width: 400px;
    width: calc(100vw - 2.5rem);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06);
    pointer-events: all;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(calc(100% + 1.5rem));
    transition:
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast.toast-hide {
    opacity: 0;
    transform: translateX(calc(100% + 1.5rem));
    transition:
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Type variants */
.toast-success {
    border-left: 4px solid #22c55e;
}
.toast-error {
    border-left: 4px solid #ef4444;
}
.toast-warning {
    border-left: 4px solid #f59e0b;
}
.toast-info {
    border-left: 4px solid #3b82f6;
}

/* Icon */
.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-success .toast-icon {
    color: #22c55e;
}
.toast-error .toast-icon {
    color: #ef4444;
}
.toast-warning .toast-icon {
    color: #f59e0b;
}
.toast-info .toast-icon {
    color: #3b82f6;
}

/* Body */
.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-message {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.45;
    word-break: break-word;
}

/* Close button */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition:
        color 0.15s,
        background 0.15s;
    margin-top: 1px;
}

.toast-close:hover {
    color: #475569;
    background: rgba(0, 0, 0, 0.06);
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 0 0 0.875rem 0.875rem;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: toast-shrink linear forwards;
}

.toast-success .toast-progress-bar {
    background: #22c55e;
}
.toast-error .toast-progress-bar {
    background: #ef4444;
}
.toast-warning .toast-progress-bar {
    background: #f59e0b;
}
.toast-info .toast-progress-bar {
    background: #3b82f6;
}

@keyframes toast-shrink {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@media (max-width: 480px) {
    #toast-container {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-width: 100%;
    }

    .toast {
        transform: translateY(calc(100% + 1rem));
    }

    .toast.toast-show {
        transform: translateY(0);
    }

    .toast.toast-hide {
        transform: translateY(calc(100% + 1rem));
    }
}
