/* =============================================
   VISAD VAULT - ENTERPRISE PROFESSIONAL DESIGN
   Refined • Elegant • Premium Dashboard
   ============================================= */

/* --- PREMIUM TYPOGRAPHY --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Dancing+Script:wght@500;600;700&display=swap');

:root {
    /* Premium Color Palette */
    --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;
    
    /* Primary - Deep Indigo */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;
    
    /* Accent Colors */
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --violet-500: #8b5cf6;
    --cyan-500: #06b6d4;
    
    /* Semantic */
    --bg-primary: #fafbfc;
    --bg-secondary: #ffffff;
    --bg-elevated: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-default: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Legacy */
    --card-bg: #ffffff;
    --header-bg: #1e293b;
    --border-color: #e2e8f0;
    --text-color: #0f172a;
    --danger-color: #ef4444;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(16, 185, 129, 0.05), transparent);
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* === DARK THEME === */
body.dark-theme {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-elevated: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-default: #374151;
    --border-subtle: #1f2937;
    --card-bg: #1f2937;
    --header-bg: #111827;
    --border-color: #374151;
    --text-color: #f9fafb;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
    
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(16, 185, 129, 0.08), transparent);
}

/* === LOGIN === */
#login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Day Mode for Login */
#login-container.day-mode {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #e0f2fe 100%);
}

#login-container.day-mode #login-form {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

#login-container.day-mode #login-form h2 {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #2563eb 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#login-container.day-mode .login-input-group i:first-child {
    color: #64748b;
}

#login-container.day-mode #login-form input {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
    color: #1e293b;
}

#login-container.day-mode #login-form input::placeholder {
    color: #94a3b8;
}

#login-container.day-mode #login-form input:focus {
    background: #fff;
    border-color: #3b82f6;
}

#login-container.day-mode .password-toggle {
    color: #94a3b8;
}

#login-container.day-mode .password-toggle:hover {
    color: #64748b;
}

#login-container.day-mode .login-footer {
    color: #64748b;
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Theme toggle button */
.login-theme-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.login-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(15deg);
}

#login-container.day-mode .login-theme-toggle {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
    color: #f59e0b;
}

#login-container.day-mode .login-theme-toggle:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Trail canvas for running stars */
#trail-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Galaxy Warp Effect */
.galaxy-warp {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, #0f172a 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 9998;
    transition: opacity 0.3s ease;
}

.galaxy-warp.active {
    opacity: 1;
    animation: warpSpeed 1.5s ease-in forwards;
}

@keyframes warpSpeed {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

/* Static stars background - disabled for white background */
#login-container::before {
    display: none;
}

#login-container.day-mode::before {
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Interactive canvas for mouse effect */
#star-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

#login-form {
    width: 380px;
    padding: 48px 40px;
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    animation: formAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

#login-form h2 {
    margin: 0 0 32px 0;
    color: #1e293b;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.login-logo {
    text-align: center;
    margin-bottom: 10px;
}

.login-logo h2 {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #3b82f6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-footer a:hover {
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.login-input-group {
    position: relative;
    margin-bottom: 20px;
}

.login-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    transition: color var(--transition-base);
}

.login-input-group:focus-within i:first-child {
    color: #3b82f6;
}

/* Password toggle eye button */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.password-toggle i {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    font-size: 16px;
    color: inherit;
}

.password-toggle:hover {
    color: #64748b;
}

.password-toggle.visible {
    color: #3b82f6;
}

.password-toggle.visible i {
    color: #3b82f6;
}

#login-form input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    background: #f8fafc;
    color: #1e293b;
    transition: all var(--transition-base);
}

#login-form input:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

#login-form input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#login-form input::placeholder {
    color: #94a3b8;
}

#login-form button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    margin-top: 8px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

#login-form button[type="submit"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

#login-form button[type="submit"]:hover::before {
    opacity: 1;
}

#login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

#login-form button[type="submit"]:active {
    transform: translateY(0);
}

#login-form button[type="submit"] span {
    position: relative;
    z-index: 1;
}

.login-error-message {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    display: none;
}

/* === MAIN APP === */
#app-container {
    padding: 12px 20px 20px 20px;
    max-width: 1800px;
    margin: 0 auto;
}

/* =============================================
   TWO-ROW PROFESSIONAL HEADER
   Row 1: Sort + Search | Actions
   Row 2: Refresh + Filters
   ============================================= */

/* === PAGE HEADER === */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.dark-theme .page-header {
    background: #1e293b;
    border-color: var(--border-default);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* === TOP ROW === */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* === LEFT SIDE - SORT + SEARCH === */
.search-and-filter-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* === SORT BUTTONS === */
#sort-by-td-btn, #sort-by-doc-date-btn {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

#sort-by-td-btn:hover, #sort-by-doc-date-btn:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-700);
}

body.dark-theme #sort-by-td-btn,
body.dark-theme #sort-by-doc-date-btn {
    background: var(--bg-elevated);
    border-color: var(--border-default);
    color: var(--text-secondary);
}

body.dark-theme #sort-by-td-btn:hover,
body.dark-theme #sort-by-doc-date-btn:hover {
    background: var(--primary-900);
    border-color: var(--primary-600);
    color: var(--primary-300);
}

/* === SEARCH INPUT === */
#search-input {
    width: 220px;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 11px center;
}

#search-input::placeholder {
    color: var(--text-muted);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: var(--bg-secondary);
}

body.dark-theme #search-input {
    background-color: var(--bg-elevated);
    border-color: var(--border-default);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

body.dark-theme #search-input:focus {
    background-color: var(--bg-secondary);
    border-color: var(--primary-400);
}

/* === RIGHT SIDE - ACTIONS === */
.header-actions-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* === HEADER BUTTONS BASE === */
.header-btn {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.header-btn:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-700);
}

body.dark-theme .header-btn {
    background: var(--bg-elevated);
    border-color: var(--border-default);
    color: var(--text-secondary);
}

body.dark-theme .header-btn:hover {
    background: var(--primary-900);
    border-color: var(--primary-600);
    color: var(--primary-300);
}

/* === BLINKING NOTIFICATION ICON === */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.blink-icon {
    animation: blink 1.5s ease-in-out infinite;
}

/* === ADMIN PANEL BUTTON === */
#admin-panel-btn i {
    color: var(--primary-500);
    font-size: 12px;
}

body.dark-theme #admin-panel-btn i {
    color: var(--primary-400);
}

/* === CLOCK === */
#uk-time-container {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--primary-700);
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border: 1px solid var(--primary-200);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-align: center;
}

body.dark-theme #uk-time-container {
    background: linear-gradient(135deg, var(--primary-900), rgba(67, 56, 202, 0.4));
    border-color: var(--primary-700);
    color: var(--primary-200);
}

/* === THEME TOGGLE === */
#theme-toggle-btn {
    padding: 0;
    width: 34px;
    height: 34px;
    font-size: 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--slate-500);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle-btn:hover {
    border-color: var(--amber-400);
    background: #fef9e7;
    color: var(--amber-500);
}

body.dark-theme #theme-toggle-btn {
    background: var(--bg-elevated);
    border-color: var(--border-default);
    color: var(--amber-400);
}

body.dark-theme #theme-toggle-btn:hover {
    background: rgba(251, 191, 36, 0.12);
    border-color: var(--amber-500);
}

/* === ADD NEW BUTTON === */
.add-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--emerald-500) 0%, #0891b2 100%);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.add-btn i {
    font-size: 10px;
}

/* === LOGOUT BUTTON === */
.logout-btn {
    padding: 0;
    width: 34px;
    height: 34px;
    font-size: 13px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.25);
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

/* === BOTTOM ROW - FILTERS === */
.header-filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.filter-left-section {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

body.dark-theme .header-filter-row {
    border-top-color: var(--border-default);
}

/* === COUNTRY SCROLLER === */
.country-scroller-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--border-subtle);
    position: relative;
}

body.dark-theme .country-scroller-wrapper {
    border-top-color: var(--border-default);
}

.country-scroller-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--border-subtle);
    position: relative;
}

body.dark-theme .country-scroller-container {
    border-top-color: var(--border-default);
}

/* === DOC/APPW VIEW SECTION === */
.country-view-section {
    border-top: 1px solid var(--border-subtle);
    padding: 10px 0;
}

body.dark-theme .country-view-section {
    border-top-color: var(--border-default);
}

.view-toggle-container {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.view-toggle-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
}

.view-toggle-btn:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-700);
    transform: translateY(-1px);
}

.view-toggle-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.view-toggle-btn.active:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: #ffffff;
}

body.dark-theme .view-toggle-btn {
    background: var(--bg-elevated);
    border-color: var(--border-default);
    color: var(--text-secondary);
}

body.dark-theme .view-toggle-btn:hover {
    background: var(--primary-900);
    border-color: var(--primary-600);
    color: var(--primary-300);
}

body.dark-theme .view-toggle-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #ffffff;
}

.country-scroller {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    padding: 5px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.country-scroller::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.country-scroll-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1px solid var(--border-default);
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 12px;
}

.country-scroll-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.country-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 1px solid #c5d4f7;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #3b5998;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: fit-content;
}

.chip-main {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.chip-name {
    font-weight: 600;
}

.chip-centers {
    font-size: 10px;
    font-weight: 400;
    color: rgba(59, 89, 152, 0.7);
    white-space: nowrap;
    line-height: 1.2;
}

.country-chip:hover {
    background: linear-gradient(135deg, #e0e8ff 0%, #d0dcff 100%);
    border-color: #a0b4e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 89, 152, 0.15);
}

.country-chip.active {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
    border-color: #2d4373;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 89, 152, 0.3);
}

.country-chip.active .chip-centers {
    color: rgba(255, 255, 255, 0.7);
}

.country-chip .count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 11px;
}

.country-chip.active .count {
    background: rgba(255, 255, 255, 0.25);
}

body.dark-theme .country-chip {
    background: linear-gradient(135deg, #2a3a5c 0%, #1e2d4d 100%);
    border-color: #3a4a6c;
    color: #a0c4ff;
}

body.dark-theme .chip-centers {
    color: rgba(160, 196, 255, 0.6);
}

body.dark-theme .country-chip:hover {
    background: linear-gradient(135deg, #3a4a6c 0%, #2e3e5c 100%);
    border-color: #4a5a7c;
}

body.dark-theme .country-chip.active {
    background: linear-gradient(135deg, #4a7fff 0%, #3366cc 100%);
    border-color: #5588ff;
    color: #fff;
}

body.dark-theme .country-chip.active .chip-centers {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-theme .country-chip .count {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-theme .country-chip.active .count {
    background: rgba(255, 255, 255, 0.2);
}

#filter-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* === REFRESH BUTTON === */
#refresh-btn {
    padding: 7px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 12px;
}

#refresh-btn:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-600);
}

#refresh-btn:active i {
    animation: spin 0.5s ease;
}

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

body.dark-theme #refresh-btn {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

body.dark-theme #refresh-btn:hover {
    background: var(--primary-900);
    border-color: var(--primary-600);
    color: var(--primary-400);
}

/* === FILTER DROPDOWNS === */
.filter-select {
    padding: 7px 28px 7px 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    background-color: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 100px;
    height: 32px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    text-indent: 0;
    display: inline-block;
}

.filter-select option {
    color: #334155;
    background: #ffffff;
    padding: 8px 10px;
    font-size: 12px;
}

.filter-select option:first-child {
    color: #64748b;
}

.filter-select option[value=""]:first-child {
    color: #64748b;
}

.filter-select:hover {
    border-color: #94a3b8;
}

.filter-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
    color: #334155;
}

body.dark-theme .filter-select {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
}

body.dark-theme .filter-select option {
    color: #e2e8f0;
    background: #1e293b;
}

body.dark-theme .filter-select option:first-child {
    color: #94a3b8;
}

body.dark-theme .filter-select:hover {
    border-color: #64748b;
}

/* === FILTER ACTIVE STATE === */
.filter-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    background-color: #4f46e5 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25) !important;
}

.filter-select.filter-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    background-image: linear-gradient(135deg, #6366f1, #4f46e5), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: 0 0, right 8px center !important;
    background-size: auto, 10px !important;
}

.filter-select.filter-active option:checked,
.filter-select option:checked {
    color: #334155 !important;
    background-color: #ffffff !important;
}

body.dark-theme .filter-select.filter-active option:checked,
body.dark-theme .filter-select option:checked {
    color: #e2e8f0 !important;
    background-color: #1e293b !important;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .header-top-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .search-and-filter-container {
        flex: 1;
        min-width: 280px;
    }
    
    .header-actions-container {
        flex: 1;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 12px 14px;
    }
    
    #search-input {
        width: 160px;
        flex: 1;
    }
    
    #admin-panel-btn span {
        display: none;
    }
    
    #admin-panel-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }
    
    .add-btn span {
        display: none;
    }
    
    .add-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }
    
    #uk-time-container {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .filter-select {
        flex: 1;
        min-width: calc(33% - 6px);
    }
}

@media (max-width: 480px) {
    .search-and-filter-container {
        width: 100%;
        min-width: auto;
    }
    
    #search-input {
        width: auto;
        min-width: 100px;
    }
    
    .header-actions-container {
        width: 100%;
        justify-content: center;
    }
    
    .filter-select {
        min-width: calc(50% - 4px);
    }
}

/* === RECORDS CONTAINER === */
#records-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* === RECORD CARDS === */
.traveler-group-wrapper {
    margin-bottom: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.traveler-group-wrapper:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-200);
}

body.dark-theme .traveler-group-wrapper {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

body.dark-theme .traveler-group-wrapper:hover {
    border-color: var(--primary-700);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--primary-800);
}

.record-container {
    border-bottom: 1px solid var(--border-subtle);
}

.record-container:last-child {
    border-bottom: none;
}

/* === RECORD HEADER === */
.record-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    position: relative;
    transition: background var(--transition-fast);
}

.traveler-header {
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--primary-50) 100%);
    border-left: 3px solid var(--primary-500);
}

.dependent-header {
    background: linear-gradient(135deg, var(--emerald-50, #ecfdf5) 0%, rgba(209, 250, 229, 0.5) 100%);
    border-left: 3px solid var(--emerald-500);
}

body.dark-theme .traveler-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.04) 100%);
    border-left-color: var(--primary-500);
}

body.dark-theme .dependent-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-left-color: var(--emerald-500);
}

/* === STATUS-BASED STYLING === */
.traveler-header.status-wait-app, .dependent-header.status-wait-app {
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--slate-100) 100%);
    border-left: 3px solid var(--slate-400);
}

.traveler-header.status-doc, .dependent-header.status-doc {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 3px solid var(--sky-500);
}

.traveler-header.status-hold, .dependent-header.status-hold {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 3px solid var(--amber-500);
}

.traveler-header.status-reschedule, .dependent-header.status-reschedule {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-left: 3px solid var(--orange-500);
}

.traveler-header.status-refund, .dependent-header.status-refund {
    background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-200) 100%);
    border-left: 3px solid var(--slate-500);
}

.traveler-header.status-approved, .dependent-header.status-approved {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 3px solid var(--emerald-500);
}

/* Dark theme status */
body.dark-theme .traveler-header.status-wait-app,
body.dark-theme .dependent-header.status-wait-app {
    background: linear-gradient(135deg, var(--slate-800) 0%, var(--slate-700) 100%);
    border-left-color: var(--slate-500);
}

body.dark-theme .traveler-header.status-doc,
body.dark-theme .dependent-header.status-doc {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0.06) 100%);
    border-left-color: var(--sky-500);
}

body.dark-theme .traveler-header.status-hold,
body.dark-theme .dependent-header.status-hold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.06) 100%);
    border-left-color: var(--amber-500);
}

body.dark-theme .traveler-header.status-reschedule,
body.dark-theme .dependent-header.status-reschedule {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(249, 115, 22, 0.06) 100%);
    border-left-color: var(--orange-500);
}

body.dark-theme .traveler-header.status-refund,
body.dark-theme .dependent-header.status-refund {
    background: linear-gradient(135deg, var(--slate-800) 0%, var(--slate-700) 100%);
    border-left-color: var(--slate-500);
}

body.dark-theme .traveler-header.status-approved,
body.dark-theme .dependent-header.status-approved {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-left-color: var(--emerald-500);
}

/* === HEADER GRID === */
.header-content-wrapper {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 200px 0.8fr 2fr 0.6fr 0.6fr;
    grid-template-rows: auto auto;
    gap: 4px 6px;
    align-items: center;
}

.header-item {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.header-item .editable {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    width: 100%;
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 3px;
}

.travel-date { grid-column: 1 / 2; font-weight: 600; font-size: 13px; }
.header-name { grid-column: 2 / 3; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.header-details { grid-column: 3 / 4; font-weight: 500; font-size: 12px; }
.status-group { grid-column: 4 / 5; font-weight: 600; display: flex; align-items: center; gap: 6px; font-size: 12px; }
.contact { grid-column: 5 / 6; justify-content: flex-end; font-weight: 600; font-size: 12px; }
.remark { grid-column: 1 / 2; font-weight: 500; font-size: 12px; }
.priority-family-group { grid-column: 2 / 3; font-weight: 500; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.url { grid-column: 3 / 4; font-weight: 500; font-size: 11px; }
.username { grid-column: 4 / 5; font-weight: 500; font-size: 12px; }
.password { grid-column: 5 / 6; justify-content: flex-end; font-weight: 500; font-size: 12px; }

.dependent-count {
    font-weight: 700;
    font-size: 11px;
    color: var(--primary-600);
    background: var(--primary-100);
    padding: 1px 8px;
    border-radius: 20px;
    margin-left: 4px;
}

body.dark-theme .dependent-count {
    background: var(--primary-900);
    color: var(--primary-300);
}

/* === DEPENDENTS CONTAINER === */
.dependents-container {
    padding: 8px 8px 4px 28px;
    position: relative;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(6, 182, 212, 0.02) 100%);
}

.dependents-container::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--emerald-400), var(--cyan-500));
    border-radius: 2px;
}

.dependents-container .record-container {
    margin: 0 0 8px 0;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    position: relative;
    background: var(--bg-secondary);
    overflow: hidden;
}

.dependents-container .record-container::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 18px;
    width: 18px;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald-400), var(--cyan-500));
    border-radius: 3px;
}

body.dark-theme .dependents-container {
    background: rgba(16, 185, 129, 0.03);
}

body.dark-theme .dependents-container .record-container {
    background: var(--bg-elevated);
    border-color: rgba(16, 185, 129, 0.2);
}

/* === RECORD BODY === */
.record-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 20px;
    gap: 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

body.dark-theme .record-body {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

.traveler-container > .record-body {
    border-bottom: 1px solid var(--border-subtle);
}

.body-left, .body-center, .body-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-group {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
}

.record-body label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 4px;
}

/* === EDITABLE FIELDS === */
.editable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    min-height: 24px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    line-height: 1.5;
    font-weight: 500;
}

.editable:hover {
    background: var(--slate-100);
}

body.dark-theme .editable:hover {
    background: var(--slate-700);
}

.pre-wrap {
    white-space: pre-wrap;
    word-break: break-word;
}

.editable.placeholder-highlight:not(.remark-text),
.editable.placeholder-highlight a {
    color: var(--rose-500);
    opacity: 0.85;
    font-style: italic;
}

body.dark-theme .editable.placeholder-highlight:not(.remark-text),
body.dark-theme .editable.placeholder-highlight a {
    color: var(--rose-400);
}

.remark-text.has-content {
    color: var(--rose-600);
    font-weight: 600;
    background: rgba(244, 63, 94, 0.08);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

body.dark-theme .remark-text.has-content {
    color: var(--rose-400);
    background: rgba(244, 63, 94, 0.12);
}

.remark-text.placeholder-highlight {
    color: var(--text-muted);
    opacity: 0.7;
    font-weight: normal;
    font-style: normal;
}

.editable.is-editing { padding: 0; }

.editable input, .editable select, .editable textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--bg-secondary);
    border: 2px solid var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    padding: 6px 10px;
    margin: 0;
    color: var(--text-primary);
}

.editable textarea {
    resize: vertical;
    min-height: 80px;
}

body.dark-theme .editable input,
body.dark-theme .editable select,
body.dark-theme .editable textarea {
    background: var(--bg-secondary);
    border-color: var(--primary-400);
    color: var(--text-primary);
}

/* === EDITABLE LINKS === */
.editable a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.editable a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

body.dark-theme .editable a {
    color: var(--primary-400);
}

body.dark-theme .editable a:hover {
    color: var(--primary-300);
}

/* App Form placeholders */
.editable[data-field^="application_form_"].placeholder-highlight,
.editable[data-field^="application_form_"].placeholder-highlight a {
    color: var(--text-muted);
    opacity: 0.8;
    font-style: normal;
}

/* === ACTION BUTTONS === */
.delete-traveler-btn, .delete-dependent-btn,
.expand-btn, .expand-dependent-btn,
.add-dependent-btn-header {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    width: 26px;
    height: 26px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-fast);
}

.delete-traveler-btn:hover, .delete-dependent-btn:hover {
    background: rgba(244, 63, 94, 0.1);
}

.delete-traveler-btn i, .delete-dependent-btn i {
    color: var(--rose-500);
    font-size: 12px;
}

.add-dependent-btn-header:hover {
    background: var(--primary-50);
}

body.dark-theme .add-dependent-btn-header:hover {
    background: rgba(99, 102, 241, 0.15);
}

.add-dependent-btn-header i {
    color: var(--primary-500);
    font-size: 12px;
}

.expand-btn:hover, .expand-dependent-btn:hover {
    background: var(--slate-100);
}

body.dark-theme .expand-btn:hover, body.dark-theme .expand-dependent-btn:hover {
    background: var(--slate-700);
}

.expand-btn i, .expand-dependent-btn i {
    color: var(--text-muted);
    font-size: 10px;
    transition: transform var(--transition-base);
}

.record-container.expanded .expand-btn i,
.record-container.expanded .expand-dependent-btn i {
    transform: rotate(90deg);
}

/* === DOC DATE === */
.doc-date-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-date-wrapper label {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
}

/* === CONTACT & WHATSAPP === */
.contact-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.contact-wrapper .editable {
    flex-grow: 1;
    font-size: 12px;
}

.whatsapp-link {
    color: #25D366;
    font-size: 1.1em;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 3px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-link:hover {
    transform: scale(1.1);
    color: #128C7E;
    background: rgba(37, 211, 102, 0.1);
}

/* === RECORD META INFO === */
.record-meta-info {
    grid-column: 1 / -1;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -2px;
    padding-left: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.record-meta-info .history-btn {
    cursor: pointer;
    color: var(--primary-600);
    font-weight: 600;
    transition: all var(--transition-fast);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.record-meta-info .history-btn:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

body.dark-theme .record-meta-info .history-btn {
    color: var(--primary-400);
}

body.dark-theme .record-meta-info .history-btn:hover {
    color: var(--primary-300);
    background: rgba(99, 102, 241, 0.1);
}

/* === DOCUMENT VERIFICATION & INVOICE BUTTONS === */
.doc-verified-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin-left: 8px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    color: #065f46;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.doc-verified-btn i {
    color: var(--emerald-500);
    font-size: 12px;
}

.doc-verified-btn:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

body.dark-theme .doc-verified-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.dark-theme .doc-verified-btn i {
    color: var(--emerald-400);
}

.invoice-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin-left: 6px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    color: #92400e;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.invoice-btn i {
    color: var(--amber-500);
    font-size: 12px;
}

.invoice-btn:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

body.dark-theme .invoice-btn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

body.dark-theme .invoice-btn i {
    color: var(--amber-400);
}

/* === PASSPORT & AUTOFILL === */
.passport-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.passport-wrapper .editable {
    flex-grow: 1;
}

.passport-field-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.autofill-btn {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    color: var(--primary-700);
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.autofill-btn:hover {
    background: linear-gradient(135deg, var(--primary-200), var(--primary-300));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

body.dark-theme .autofill-btn {
    background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
    color: var(--primary-300);
    border-color: var(--primary-700);
}

/* === POSTCODE LOOKUP BUTTON === */
.postcode-field-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.postcode-lookup-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.postcode-lookup-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.postcode-lookup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

body.dark-theme .postcode-lookup-btn {
    background: linear-gradient(135deg, #065f46, #064e3b);
    color: #a7f3d0;
}

/* === UPLOAD PASSPORT BUTTON === */
.upload-passport-btn {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    flex-shrink: 0;
}

.upload-passport-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.upload-passport-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.upload-passport-btn i {
    font-size: 11px;
}

body.dark-theme .upload-passport-btn {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

body.dark-theme .upload-passport-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
}

/* === PROGRESS CIRCLE === */
.progress-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--emerald-500) var(--p, 0%), var(--slate-200) 0);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all var(--transition-base);
    box-shadow: inset 0 0 0 3px var(--bg-secondary);
}

body.dark-theme .progress-circle {
    background: conic-gradient(var(--emerald-400) var(--p, 0%), var(--slate-700) 0);
    box-shadow: inset 0 0 0 3px var(--bg-elevated);
}

/* === FAMILY CHECKBOX === */
.family-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.family-checkbox-wrapper:hover {
    background: var(--primary-50);
}

body.dark-theme .family-checkbox-wrapper:hover {
    background: rgba(99, 102, 241, 0.1);
}

.family-checkbox {
    cursor: pointer;
    accent-color: var(--primary-600);
    width: 16px;
    height: 16px;
}

/* === PAID STAMP === */
.record-header.paid-header::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 45px;
    transform: translateY(-50%) rotate(-12deg);
    width: 60px;
    height: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120'%3E%3Cdefs%3E%3Cfilter id='roughen'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.05' numOctaves='3' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='3' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23roughen)'%3E%3Crect x='8' y='8' width='184' height='104' fill='none' stroke='%23166534' stroke-width='6' rx='8'/%3E%3Crect x='16' y='16' width='168' height='88' fill='none' stroke='%23166534' stroke-width='3' rx='4'/%3E%3Ctext x='100' y='75' font-family='Arial Black, sans-serif' font-size='48' font-weight='900' fill='%23166534' text-anchor='middle' letter-spacing='4'%3EPAID%3C/text%3E%3Cline x1='20' y1='30' x2='180' y2='30' stroke='%23166534' stroke-width='2'/%3E%3Cline x1='20' y1='92' x2='180' y2='92' stroke='%23166534' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-50%) rotate(-12deg) scale(0.8); }
    to { opacity: 0.35; transform: translateY(-50%) rotate(-12deg) scale(1); }
}

/* === PUBLIC LINK === */
.public-link-wrapper {
    display: flex;
    align-items: center;
}

.public-link-wrapper input {
    flex-grow: 1;
    padding: 6px 10px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.copy-link-btn {
    height: 34px;
    width: 38px;
    border: 2px solid var(--border-default);
    border-left: none;
    background: var(--bg-secondary);
    cursor: pointer;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-link-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
}

.copy-link-btn i {
    color: var(--text-muted);
    font-size: 13px;
}

body.dark-theme .public-link-wrapper input {
    background: var(--bg-secondary);
    border-color: var(--border-default);
}

body.dark-theme .copy-link-btn {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

/* === FORM DATA BUTTON === */
.form-data-btn {
    background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-left: 6px;
    transition: all var(--transition-fast);
}

.form-data-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

body.dark-theme .form-data-btn {
    background: linear-gradient(135deg, var(--emerald-600), var(--cyan-600));
}

/* === MESSAGES === */
.no-records {
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
    color: var(--text-muted);
}

.loading-records {
    text-align: center;
    padding: 80px 20px;
    font-size: 16px;
    color: var(--primary-500);
    font-weight: 500;
}

.loading-records i {
    margin-right: 10px;
    font-size: 20px;
}

/* Skeleton Loading Styles */
.skeleton-container {
    padding: 15px;
}

.skeleton-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-default);
    opacity: 0;
    animation: skeleton-fade-in 0.4s ease forwards;
}

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

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.skeleton-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-title {
    flex: 1;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    margin-bottom: 8px;
}

.skeleton-line:last-child {
    margin-bottom: 0;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 65%;
}

.skeleton-line.long {
    width: 85%;
}

.skeleton-badges {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.skeleton-badge {
    width: 80px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.skeleton-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

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

/* Dark theme skeleton */
body.dark-theme .skeleton-card {
    background: var(--slate-800);
    border-color: var(--slate-700);
}

body.dark-theme .skeleton-avatar,
body.dark-theme .skeleton-line,
body.dark-theme .skeleton-badge,
body.dark-theme .skeleton-btn {
    background: linear-gradient(90deg, var(--slate-700) 25%, var(--slate-600) 50%, var(--slate-700) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 30px 20px;
}

.load-more-btn {
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.load-more-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn i {
    margin-right: 8px;
}

.load-more-info {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 8px;
}

body.dark-theme .load-more-btn {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

.load-all-btn {
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 12px;
}

.load-all-btn:hover {
    background: var(--slate-100);
    border-color: var(--primary-400);
    color: var(--primary-600);
}

.load-all-btn i {
    margin-right: 6px;
}

body.dark-theme .load-all-btn {
    border-color: var(--slate-600);
    color: var(--slate-400);
}

body.dark-theme .load-all-btn:hover {
    background: var(--slate-800);
    border-color: var(--primary-500);
    color: var(--primary-400);
}

/* Search Dropdown Menu */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper #search-input {
    padding-right: 40px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-menu-wrapper {
    position: relative;
}

.search-menu-btn {
    height: 38px;
    width: 36px;
    border: 1px solid var(--border-default);
    border-left: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-menu-btn:hover {
    background: var(--slate-100);
    color: var(--primary-600);
}

.search-menu-btn.active {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.search-dropdown.show {
    display: block;
    animation: dropdown-fade-in 0.2s ease;
}

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

.search-dropdown-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.search-dropdown-item:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.search-dropdown-item i {
    width: 18px;
    color: var(--text-muted);
}

.search-dropdown-item:hover i {
    color: var(--primary-500);
}

.shortcut-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    background: var(--slate-200);
    color: var(--text-muted);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

body.dark-theme .shortcut-badge {
    background: var(--slate-700);
    color: var(--slate-400);
}

.search-dropdown-divider {
    height: 1px;
    background: var(--border-default);
    margin: 4px 0;
}

.search-dropdown-info {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--slate-50);
}

/* Dark theme dropdown */
body.dark-theme .search-menu-btn {
    background: var(--slate-800);
    border-color: var(--slate-600);
    color: var(--slate-400);
}

body.dark-theme .search-menu-btn:hover {
    background: var(--slate-700);
    color: var(--primary-400);
}

body.dark-theme .search-dropdown {
    background: var(--slate-800);
    border-color: var(--slate-700);
}

body.dark-theme .search-dropdown-item {
    color: var(--slate-200);
}

body.dark-theme .search-dropdown-item:hover {
    background: var(--slate-700);
    color: var(--primary-400);
}

body.dark-theme .search-dropdown-info {
    background: var(--slate-900);
    color: var(--slate-500);
}

/* Search Results Header */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-md);
    margin: 15px 15px 15px 15px;
    color: var(--primary-700);
    font-size: 14px;
    font-weight: 500;
}

.search-results-header i {
    margin-right: 8px;
}

.clear-search-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    background: white;
    color: var(--primary-600);
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.clear-search-btn:hover {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: var(--text-secondary);
}

.no-results p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

.no-results .clear-search-btn {
    background: var(--primary-500);
    color: white;
    border: none;
    padding: 12px 24px;
}

.no-results .clear-search-btn:hover {
    background: var(--primary-600);
}

/* Dark theme search results */
body.dark-theme .search-results-header {
    background: var(--slate-800);
    border-color: var(--slate-700);
    color: var(--primary-400);
}

body.dark-theme .clear-search-btn {
    background: var(--slate-700);
    color: var(--primary-400);
    border-color: var(--slate-600);
}

body.dark-theme .clear-search-btn:hover {
    background: var(--primary-600);
    color: white;
}

body.dark-theme .no-results h3 {
    color: var(--slate-300);
}

.success-message, .warning-message {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    animation: messageSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.success-message {
    background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
}

.warning-message {
    background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
}

/* === MODALS BASE === */
#admin-modal-backdrop, #history-modal-backdrop, #form-data-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: backdropFade 0.2s ease;
}

@keyframes backdropFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

#admin-modal, #history-modal, #form-data-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

body.dark-theme #admin-modal,
body.dark-theme #history-modal,
body.dark-theme #form-data-modal {
    background: var(--bg-elevated);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-default);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-default);
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

#modal-close-btn, #history-modal-close-btn, #form-data-modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

#modal-close-btn:hover, #history-modal-close-btn:hover, #form-data-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* === MODAL TABS === */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-default);
    margin-bottom: 24px;
    gap: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

.tab-btn.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
    background: var(--primary-50);
}

body.dark-theme .tab-btn:hover {
    color: var(--primary-400);
    background: rgba(99, 102, 241, 0.1);
}

body.dark-theme .tab-btn.active {
    color: var(--primary-400);
    border-bottom-color: var(--primary-400);
    background: rgba(99, 102, 241, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

/* === USER MANAGEMENT === */
.user-management-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.user-list-container, .add-user-container {
    padding: 24px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
}

body.dark-theme .user-list-container,
body.dark-theme .add-user-container {
    background: var(--bg-secondary);
}

#add-user-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#add-user-form input, #add-user-form select {
    padding: 12px 14px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

#add-user-form input:focus, #add-user-form select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

body.dark-theme #add-user-form input,
body.dark-theme #add-user-form select {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

#add-user-form button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

#add-user-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.user-item:hover {
    background: var(--bg-secondary);
}

body.dark-theme .user-item:hover {
    background: var(--bg-elevated);
}

.delete-user-btn {
    background: var(--rose-500);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 12px;
}

.delete-user-btn:hover {
    background: var(--rose-600);
    transform: scale(1.1);
}

#add-user-message.success { color: var(--emerald-600); font-weight: 600; }
#add-user-message.error { color: var(--rose-600); font-weight: 600; }

/* === LOG TABLE === */
.log-container {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

body.dark-theme .log-container {
    background: var(--bg-secondary);
}

#log-table, #history-log-table {
    width: 100%;
    border-collapse: collapse;
}

#log-table th, #log-table td,
#history-log-table th, #history-log-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
}

#log-table th, #history-log-table th {
    background: var(--slate-100);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    z-index: 1;
}

body.dark-theme #log-table th,
body.dark-theme #history-log-table th {
    background: var(--slate-800);
}

#log-table tbody tr:hover,
#history-log-table tbody tr:hover {
    background: var(--primary-50);
}

body.dark-theme #log-table tbody tr:hover,
body.dark-theme #history-log-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

.log-value {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.revert-btn {
    background: linear-gradient(135deg, var(--orange-500), var(--orange-400));
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.revert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

/* === URL MANAGEMENT === */
.url-management-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.url-list-container, .add-url-container {
    padding: 24px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
}

body.dark-theme .url-list-container,
body.dark-theme .add-url-container {
    background: var(--bg-secondary);
}

#add-url-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#add-url-form input, #add-url-form select {
    padding: 12px 14px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

#add-url-form input:focus, #add-url-form select:focus {
    outline: none;
    border-color: var(--primary-500);
}

body.dark-theme #add-url-form input,
body.dark-theme #add-url-form select {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

#add-url-form .form-actions {
    display: flex;
    gap: 10px;
}

#add-url-form button {
    padding: 12px;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    flex-grow: 1;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition-fast);
}

#url-submit-btn {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

#url-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

#url-cancel-btn {
    background: var(--slate-500);
}

#url-cancel-btn:hover {
    background: var(--slate-600);
}

.url-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.url-item:hover {
    background: var(--bg-secondary);
}

.url-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.url-details strong {
    font-weight: 600;
    color: var(--text-primary);
}

.url-details small {
    color: var(--text-muted);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.url-actions button {
    background: transparent;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.url-actions .edit-url-btn {
    color: var(--primary-600);
}

.url-actions .edit-url-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
}

.url-actions .delete-url-btn {
    color: var(--rose-500);
}

.url-actions .delete-url-btn:hover {
    background: rgba(244, 63, 94, 0.1);
    border-color: var(--rose-400);
}

#add-url-message.success { color: var(--emerald-600); font-weight: 600; }
#add-url-message.error { color: var(--rose-600); font-weight: 600; }

.form-separator {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 8px 0;
    font-weight: 500;
}

.or-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 4px 0;
}

/* === FORM DATA MODAL === */
#form-data-modal .log-container {
    max-height: 70vh;
    padding: 20px;
}

.form-data-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-200);
}

.form-data-heading:first-child {
    margin-top: 0;
}

body.dark-theme .form-data-heading {
    border-bottom-color: var(--primary-800);
}

.form-data-item {
    margin-bottom: 10px;
    line-height: 1.5;
}

.form-data-item .form-data-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-data-item .form-data-value {
    font-weight: 500;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: block;
    margin-top: 2px;
    transition: background var(--transition-fast);
}

.form-data-item .form-data-value:hover {
    background: var(--slate-100);
}

body.dark-theme .form-data-item .form-data-value:hover {
    background: var(--slate-700);
}

/* === DOC VERIFY MODAL === */
#doc-verify-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

#doc-verify-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-theme #doc-verify-modal {
    background: var(--bg-elevated);
}

.doc-verify-header {
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-verify-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.doc-verify-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.action-btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-btn {
    background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.35);
}

.email-btn {
    background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
    color: white;
}

.email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

#doc-verify-modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    line-height: 1;
}

#doc-verify-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.doc-verify-container {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Email Template */
.email-template-container {
    font-family: inherit;
    line-height: 1.7;
    color: var(--text-primary);
}

.email-header {
    margin-bottom: 28px;
}

.email-header p {
    margin: 6px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.email-footer {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-50), var(--slate-50));
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-500);
}

body.dark-theme .email-footer {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.04));
    border-left-color: var(--primary-400);
}

.email-footer p {
    margin: 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.email-footer strong {
    color: var(--text-primary);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.info-table tr {
    border-bottom: 1px solid var(--border-subtle);
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 14px 18px;
    font-size: 14px;
}

.info-table .info-label {
    font-weight: 600;
    color: var(--text-muted);
    width: 180px;
    background: var(--bg-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-table .info-value {
    color: var(--text-primary);
    font-weight: 500;
}

body.dark-theme .info-table {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

body.dark-theme .info-table .info-label {
    background: var(--bg-secondary);
}

.info-list {
    margin: 16px 0;
    padding-left: 28px;
}

.info-list li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-list strong {
    color: var(--text-primary);
}

.verification-section {
    margin-bottom: 32px;
}

.verification-section h3 {
    color: var(--primary-600);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-default);
}

body.dark-theme .verification-section h3 {
    color: var(--primary-400);
    border-bottom-color: var(--border-default);
}

.verification-section p {
    margin: 12px 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.verification-section strong {
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.info-item {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-500);
}

body.dark-theme .info-item {
    background: var(--bg-secondary);
    border-left-color: var(--primary-400);
}

.info-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.info-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

.important-notice {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border-left: 4px solid var(--amber-500);
    padding: 18px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

body.dark-theme .important-notice {
    background: rgba(245, 158, 11, 0.1);
}

.important-notice p {
    margin: 10px 0;
    color: #92400e;
    font-size: 14px;
    line-height: 1.6;
}

body.dark-theme .important-notice p {
    color: var(--amber-400);
}

.important-notice strong {
    color: #78350f;
}

body.dark-theme .important-notice strong {
    color: var(--amber-300);
}

.section-list {
    margin: 16px 0;
    padding-left: 24px;
}

.section-list li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.verification-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-default);
    text-align: center;
}

.verification-footer p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 6px 0;
}

/* === INVOICE MODAL === */
.history-display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    margin-right: 16px;
}

.history-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    line-height: 1.5;
}

body.dark-theme .history-item {
    color: var(--text-muted);
}

#invoice-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

#invoice-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

body.dark-theme #invoice-modal {
    background: var(--bg-elevated);
}

#invoice-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-default);
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

#invoice-modal .modal-header h2 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.invoice-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.invoice-actions .action-btn {
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.invoice-actions .save-btn {
    background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
    color: white;
}

.invoice-actions .save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.invoice-actions .email-btn {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
}

.invoice-actions .email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.invoice-actions .action-btn i {
    font-size: 14px;
}

#invoice-modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    line-height: 1;
}

#invoice-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#invoice-modal .modal-content {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.invoice-modal-container {
    background: var(--slate-100);
    padding: 20px;
    min-height: 400px;
}

body.dark-theme .invoice-modal-container {
    background: var(--bg-primary);
}

/* Invoice Design - A4 Size (210mm x 297mm) */
.invoice-modal-container .container {
    width: 210mm;
    min-height: 297mm;
    max-height: 297mm;
    margin: 0 auto;
    background: white;
    padding: 15mm 18mm;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    overflow: hidden;
    font-size: 11px;
}

body.dark-theme .invoice-modal-container .container {
    background: var(--bg-elevated);
}

.invoice-modal-container .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.invoice-modal-container .invoice-title {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.invoice-modal-container .logo-img {
    width: 100px;
    margin-bottom: 12px;
}

.invoice-modal-container .company-info {
    text-align: right;
    line-height: 1.6;
}

.invoice-modal-container .company-info .company-name {
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 4px;
    font-size: 13px;
}

body.dark-theme .invoice-modal-container .company-info .company-name {
    color: var(--primary-400);
}

.invoice-modal-container .company-info p {
    font-size: 10px;
    color: var(--text-muted);
    margin: 0;
}

.invoice-modal-container .invoice-number-section {
    text-align: center;
    margin: 18px 0;
    position: relative;
}

.invoice-modal-container .invoice-number-section::before,
.invoice-modal-container .invoice-number-section::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-default);
}

.invoice-modal-container .invoice-number-section::before { left: 0; }
.invoice-modal-container .invoice-number-section::after { right: 0; }

.invoice-modal-container .invoice-number-box {
    display: inline-block;
    border: 2px solid var(--text-primary);
    border-radius: var(--radius-md);
    padding: 10px 30px;
    background: white;
    position: relative;
    z-index: 1;
}

body.dark-theme .invoice-modal-container .invoice-number-box {
    background: var(--bg-elevated);
    border-color: var(--border-default);
}

.invoice-modal-container .invoice-number-label {
    font-size: 9px;
    color: var(--text-muted);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.invoice-modal-container .invoice-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.invoice-modal-container .info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.invoice-modal-container .bill-to h3 {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.invoice-modal-container .bill-to .customer-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.invoice-modal-container .bill-to p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.invoice-modal-container .invoice-details {
    text-align: right;
}

.invoice-modal-container .detail-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    font-size: 11px;
}

.invoice-modal-container .detail-label {
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 16px;
}

.invoice-modal-container .detail-value {
    color: var(--text-primary);
    min-width: 90px;
    text-align: right;
    font-weight: 600;
}

.invoice-modal-container .items-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.invoice-modal-container .items-table thead {
    border-bottom: 2px solid var(--border-default);
}

.invoice-modal-container .items-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 700;
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.invoice-modal-container .items-table td {
    padding: 12px 8px;
    font-size: 11px;
    color: var(--text-primary);
    vertical-align: top;
}

.invoice-modal-container .item-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.invoice-modal-container .item-description {
    font-size: 10px;
    color: var(--text-muted);
}

.invoice-modal-container .totals {
    margin-left: auto;
    width: 280px;
    margin-top: 15px;
}

.invoice-modal-container .total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 11px;
    color: var(--text-secondary);
}

.invoice-modal-container .total-row.discount {
    color: var(--emerald-600);
    background: rgba(16, 185, 129, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
}

.invoice-modal-container .total-row.discount span:last-child {
    font-weight: 700;
}

/* Discount Editor Styles - Compact Right-Aligned */
.invoice-modal-container .totals-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.invoice-modal-container .totals {
    min-width: 280px;
}

.invoice-modal-container .discount-editor-compact {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-default);
}

.invoice-modal-container .discount-editor-compact .discount-editor-title {
    font-size: 10px;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-modal-container .discount-type-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.invoice-modal-container .discount-type-btn {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.invoice-modal-container .discount-type-btn:hover {
    border-color: #10b981;
    color: #10b981;
}

.invoice-modal-container .discount-type-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: white;
}

.invoice-modal-container .discount-value-row {
    display: flex;
    gap: 6px;
}

.invoice-modal-container .discount-value-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 100%;
}

.invoice-modal-container .discount-value-row input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.invoice-modal-container .discount-apply-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.invoice-modal-container .discount-apply-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.invoice-modal-container .total-row.discount {
    color: var(--emerald-600);
    background: rgba(16, 185, 129, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
}

.invoice-modal-container .total-row.discount span:last-child {
    font-weight: 700;
}

/* Refund Editor Styles */
.invoice-modal-container .refund-editor-compact {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-default);
}

.invoice-modal-container .refund-editor-compact .refund-editor-title {
    font-size: 10px;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-modal-container .refund-type-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.invoice-modal-container .refund-type-btn {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.invoice-modal-container .refund-type-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.invoice-modal-container .refund-type-btn.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
    color: white;
}

.invoice-modal-container .refund-type-btn[data-type="full"].active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
}

.invoice-modal-container .refund-type-btn[data-type="partial"].active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
}

.invoice-modal-container .refund-amount-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.invoice-modal-container .refund-amount-row .refund-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.invoice-modal-container .refund-amount-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 100%;
    max-width: 100px;
}

.invoice-modal-container .refund-amount-row input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.invoice-modal-container .refund-apply-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    width: 100%;
}

.invoice-modal-container .refund-apply-row {
    margin-top: 8px;
}

.invoice-modal-container .refund-apply-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.invoice-modal-container .total-row.refund-info {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
}

.invoice-modal-container .total-row.refund-info span:last-child {
    font-weight: 700;
}

.invoice-modal-container .refund-amount-display {
    color: #ef4444;
    font-weight: 700;
}

/* Refund Notice in Footer */
.invoice-modal-container .refund-notice {
    color: #f59e0b;
    font-weight: 600;
}

body.dark-theme .invoice-modal-container .refund-notice {
    color: #fbbf24;
}

.invoice-modal-container .total-row.final {
    border-top: 2px solid var(--text-primary);
    padding-top: 12px;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

body.dark-theme .invoice-modal-container .total-row.final {
    border-top-color: var(--border-default);
}

.invoice-modal-container .footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-default);
    text-align: center;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.6;
}

.invoice-modal-container .payment-received {
    color: var(--emerald-600);
    font-weight: 600;
}

body.dark-theme .invoice-modal-container .payment-received {
    color: var(--emerald-400);
}

/* === NEW INVOICE DESIGN STYLES === */
.invoice-modal-container .invoice-header-compact {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-default);
}

.invoice-modal-container .header-left {
    flex: 0 0 auto;
}

.invoice-modal-container .header-left img,
.invoice-modal-container .header-left svg {
    height: 40px;
    width: auto;
}

.invoice-modal-container .header-center {
    flex: 1;
    text-align: center;
}

.invoice-modal-container .invoice-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.invoice-modal-container .invoice-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.invoice-modal-container .invoice-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.invoice-modal-container .header-right {
    text-align: right;
}

.invoice-modal-container .header-right .company-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-modal-container .header-right .company-details {
    font-size: 10px;
    color: var(--text-muted);
}

.invoice-modal-container .invoice-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.invoice-modal-container .info-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

body.dark-theme .invoice-modal-container .info-card {
    background: rgba(255, 255, 255, 0.03);
}

.invoice-modal-container .info-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.dark-theme .invoice-modal-container .info-card-header {
    background: rgba(255, 255, 255, 0.05);
}

.invoice-modal-container .info-card-header i {
    font-size: 11px;
    color: var(--primary-500);
}

.invoice-modal-container .info-card-body {
    padding: 12px;
}

.invoice-modal-container .customer-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.invoice-modal-container .customer-address {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.invoice-modal-container .customer-emails {
    font-size: 10px;
    color: var(--text-muted);
}

.invoice-modal-container .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.invoice-modal-container .detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invoice-modal-container .detail-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-modal-container .detail-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.invoice-modal-container .detail-value.amount-highlight {
    color: var(--primary-600);
}

.invoice-modal-container .payment-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.invoice-modal-container .payment-badge.status-badge-paid {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
}

.invoice-modal-container .payment-badge.status-badge-unpaid {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.invoice-modal-container .payment-badge.status-badge-refund {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.invoice-modal-container .payment-badge.status-badge-partial-refund {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Items Table */
.invoice-modal-container .items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 11px;
}

.invoice-modal-container .items-table thead {
    background: var(--bg-secondary);
}

body.dark-theme .invoice-modal-container .items-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.invoice-modal-container .items-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--primary-200);
}

body.dark-theme .invoice-modal-container .items-table th {
    color: var(--primary-400);
    border-bottom-color: var(--border-default);
}

.invoice-modal-container .items-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-default);
    vertical-align: top;
}

.invoice-modal-container .items-table .item-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.invoice-modal-container .items-table .item-meta {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
}

.invoice-modal-container .items-table .text-center {
    text-align: center;
}

.invoice-modal-container .items-table .text-right {
    text-align: right;
}

.invoice-modal-container .items-table .dependent-row {
    background: rgba(99, 102, 241, 0.03);
}

body.dark-theme .invoice-modal-container .items-table .dependent-row {
    background: rgba(99, 102, 241, 0.05);
}

/* Totals Section with Editors */
.invoice-modal-container .totals-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-top: 15px;
}

.invoice-modal-container .editors-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.invoice-modal-container .editor-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.invoice-modal-container .editor-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-modal-container .editor-label i {
    margin-right: 4px;
    color: var(--emerald-500);
}

.invoice-modal-container .editor-group:last-child .editor-label i {
    color: var(--amber-500);
}

.invoice-modal-container .editor-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.invoice-modal-container .btn-group {
    display: flex;
    gap: 2px;
}

.invoice-modal-container .discount-type-btn,
.invoice-modal-container .refund-type-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-default);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.invoice-modal-container .discount-type-btn:first-child,
.invoice-modal-container .refund-type-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.invoice-modal-container .discount-type-btn:last-child,
.invoice-modal-container .refund-type-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.invoice-modal-container .discount-type-btn:hover {
    border-color: var(--emerald-500);
    color: var(--emerald-600);
}

.invoice-modal-container .refund-type-btn:hover {
    border-color: var(--amber-500);
    color: var(--amber-600);
}

.invoice-modal-container .discount-type-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: white;
}

.invoice-modal-container .refund-type-btn.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
    color: white;
}

.invoice-modal-container .editor-controls input[type="number"] {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Refund amount input - wider for partial refund */
.invoice-modal-container .editor-controls input#invoice-refund-amount {
    width: 100px;
    margin-left: 6px;
}

.invoice-modal-container .editor-controls input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.invoice-modal-container .apply-btn {
    padding: 6px 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.invoice-modal-container .apply-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.invoice-modal-container .apply-btn.refund {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.invoice-modal-container .apply-btn.refund:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Discount preview text */
.invoice-modal-container .discount-preview-text {
    font-size: 11px;
    color: #1e9f91;
    margin-top: 4px;
    font-weight: 500;
}

.invoice-modal-container .discount-preview-text i {
    margin-right: 4px;
}

/* Invoice date input */
.invoice-modal-container .invoice-date-input {
    padding: 4px 8px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.invoice-modal-container .invoice-date-input:hover {
    border-color: var(--primary-500);
}

.invoice-modal-container .invoice-date-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Hide print-only elements on screen */
.invoice-modal-container .print-only {
    display: none;
}

/* Show screen-only elements and hide no-print on print */
@media print {
    .invoice-modal-container .no-print {
        display: none !important;
    }
    .invoice-modal-container .print-only {
        display: inline !important;
    }
}

/* Totals Box */
.invoice-modal-container .totals-box {
    min-width: 200px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px 15px;
}

body.dark-theme .invoice-modal-container .totals-box {
    background: rgba(255, 255, 255, 0.03);
}

.invoice-modal-container .total-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.invoice-modal-container .total-line.discount-line {
    color: var(--emerald-600);
}

.invoice-modal-container .total-line.final-line {
    border-top: 2px solid var(--text-primary);
    margin-top: 8px;
    padding-top: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

body.dark-theme .invoice-modal-container .total-line.final-line {
    border-top-color: var(--border-default);
}

.invoice-modal-container .total-line.refund-line {
    color: var(--amber-600);
    font-style: italic;
}

/* Invoice Footer */
.invoice-modal-container .invoice-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-default);
    text-align: center;
}

.invoice-modal-container .invoice-footer .status-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.invoice-modal-container .invoice-footer .status-msg.paid {
    color: var(--emerald-600);
}

.invoice-modal-container .invoice-footer .status-msg.pending {
    color: var(--amber-600);
}

.invoice-modal-container .invoice-footer .status-msg.refunded {
    color: var(--rose-600);
}

.invoice-modal-container .invoice-footer .contact-line {
    font-size: 10px;
    color: var(--text-muted);
    margin: 0;
}

.invoice-modal-container .invoice-footer .contact-line strong {
    color: var(--text-secondary);
}

/* Payment Status Badges */
.payment-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    min-width: 60px;
}

.status-badge-paid {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
}

.status-badge-unpaid {
    background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
    color: white;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}

.status-badge-refund {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.status-badge-partial-refund {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* =============================================
   ACCOUNTS MODAL STYLES
   ============================================= */
#accounts-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#accounts-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 1400px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

body.dark-theme #accounts-modal {
    background: var(--bg-elevated);
}

#accounts-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-default);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

#accounts-modal .modal-header h2 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#accounts-modal-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

#accounts-modal-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Accounts Toolbar */
.accounts-toolbar {
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-default);
}

body.dark-theme .accounts-toolbar {
    background: var(--bg-primary);
}

.accounts-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.accounts-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.accounts-filters .filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accounts-filters .filter-group input,
.accounts-filters .filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-width: 130px;
}

body.dark-theme .accounts-filters .filter-group input,
body.dark-theme .accounts-filters .filter-group select {
    background: var(--bg-elevated);
    border-color: var(--border-light);
}

.accounts-filters .filter-group input:focus,
.accounts-filters .filter-group select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.accounts-filters .search-group input {
    min-width: 200px;
}

.accounts-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.accounts-btn.primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
}

.accounts-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

body.dark-theme .accounts-btn.secondary {
    background: var(--slate-700);
    color: var(--slate-200);
}

.accounts-btn.secondary:hover {
    background: var(--slate-300);
}

body.dark-theme .accounts-btn.secondary:hover {
    background: var(--slate-600);
}

/* Summary Cards */
.accounts-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
}

body.dark-theme .accounts-summary {
    background: var(--bg-tertiary);
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
}

body.dark-theme .summary-card {
    background: var(--bg-elevated);
}

.summary-card .summary-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.summary-card.total .summary-icon {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    color: var(--primary-600);
}

.summary-card.revenue .summary-icon {
    background: linear-gradient(135deg, var(--cyan-100), var(--cyan-200));
    color: var(--cyan-600);
}

.summary-card.paid .summary-icon {
    background: linear-gradient(135deg, var(--emerald-100), var(--emerald-200));
    color: var(--emerald-600);
}

.summary-card.unpaid .summary-icon {
    background: linear-gradient(135deg, var(--rose-100), var(--rose-200));
    color: var(--rose-600);
}

body.dark-theme .summary-card.total .summary-icon {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-400);
}

body.dark-theme .summary-card.revenue .summary-icon {
    background: rgba(6, 182, 212, 0.2);
    color: var(--cyan-400);
}

body.dark-theme .summary-card.paid .summary-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-400);
}

body.dark-theme .summary-card.unpaid .summary-icon {
    background: rgba(244, 63, 94, 0.2);
    color: var(--rose-400);
}

.summary-info {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Accounts Table */
#accounts-modal .modal-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.accounts-table-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
}

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

.accounts-table thead {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

body.dark-theme .accounts-table thead {
    background: var(--bg-elevated);
}

.accounts-table th {
    padding: 14px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-default);
    white-space: nowrap;
}

.accounts-table th.sortable {
    cursor: pointer;
    transition: color 0.2s;
}

.accounts-table th.sortable:hover {
    color: var(--primary-500);
}

.accounts-table th.sortable i {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.5;
}

.accounts-table th.sortable.active i {
    opacity: 1;
    color: var(--primary-500);
}

.accounts-table td {
    padding: 14px 12px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-default);
    vertical-align: middle;
}

.accounts-table tbody tr {
    transition: background 0.2s;
}

.accounts-table tbody tr:hover {
    background: var(--slate-50);
}

body.dark-theme .accounts-table tbody tr:hover {
    background: var(--bg-primary);
}

.accounts-table .invoice-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--primary-600);
}

body.dark-theme .accounts-table .invoice-number {
    color: var(--primary-400);
}

.accounts-table .customer-name {
    font-weight: 600;
}

.accounts-table .amount {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.accounts-table .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.accounts-table .status-badge.paid {
    background: var(--emerald-100);
    color: var(--emerald-700);
}

.accounts-table .status-badge.unpaid {
    background: var(--rose-100);
    color: var(--rose-700);
}

body.dark-theme .accounts-table .status-badge.paid {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-400);
}

body.dark-theme .accounts-table .status-badge.unpaid {
    background: rgba(244, 63, 94, 0.2);
    color: var(--rose-400);
}

.accounts-table .action-btns {
    display: flex;
    gap: 6px;
}

.accounts-table .action-btns button {
    padding: 6px 10px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.accounts-table .view-btn {
    background: var(--primary-100);
    color: var(--primary-700);
}

.accounts-table .view-btn:hover {
    background: var(--primary-200);
}

body.dark-theme .accounts-table .view-btn {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-400);
}

/* Loading and Empty States */
.accounts-loading,
.accounts-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.accounts-loading i,
.accounts-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.accounts-empty p {
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.accounts-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-top: 1px solid var(--border-default);
    background: var(--bg-tertiary);
}

body.dark-theme .accounts-pagination {
    background: var(--bg-primary);
}

#accounts-showing {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

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

#accounts-page-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Invoice Detail Modal */
#invoice-detail-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#invoice-detail-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

body.dark-theme #invoice-detail-modal {
    background: var(--bg-elevated);
}

#invoice-detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-default);
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

#invoice-detail-modal .modal-header h2 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#invoice-detail-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

#invoice-detail-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

#invoice-detail-modal .modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Print Styles for A4 Invoice */
@media print {
    @page {
        size: A4;
        margin: 0;
    }
    
    body * {
        visibility: hidden;
    }
    
    .invoice-modal-container,
    .invoice-modal-container * {
        visibility: visible;
    }
    
    /* Hide discount editor in print */
    .discount-editor-compact,
    .no-print {
        display: none !important;
        visibility: hidden !important;
    }
    
    .invoice-modal-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        background: white !important;
    }
    
    .invoice-modal-container .container {
        width: 210mm;
        min-height: 297mm;
        max-height: 297mm;
        margin: 0;
        padding: 12mm 15mm;
        box-shadow: none;
        border-radius: 0;
        page-break-inside: avoid;
        page-break-after: avoid;
    }
    
    #invoice-modal-backdrop,
    #invoice-modal .modal-header,
    .invoice-actions {
        display: none !important;
    }
}

/* === SLIM SELECT === */
.ss-main {
    border: 2px solid var(--border-default) !important;
    border-radius: var(--radius-md) !important;
    background: var(--bg-secondary) !important;
    min-height: 38px !important;
    font-family: inherit !important;
}

.ss-main:focus {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}
.upload-passport-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.upload-passport-btn .fa-spinner {
    margin-right: 5px;
}

body.dark-theme .ss-main {
    background: var(--bg-elevated) !important;
    border-color: var(--border-default) !important;
}

.ss-content {
    border: 2px solid var(--border-default) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    background: var(--bg-secondary) !important;
    margin-top: 4px !important;
}

body.dark-theme .ss-content {
    background: var(--bg-elevated) !important;
    border-color: var(--border-default) !important;
}

.ss-option {
    padding: 10px 14px !important;
    font-size: 14px !important;
    transition: all var(--transition-fast) !important;
}

.ss-option:hover {
    background: var(--primary-50) !important;
    color: var(--primary-700) !important;
}

body.dark-theme .ss-option:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary-400) !important;
}

.ss-option.ss-selected {
    background: var(--primary-100) !important;
    color: var(--primary-700) !important;
}

body.dark-theme .ss-option.ss-selected {
    background: var(--primary-900) !important;
    color: var(--primary-300) !important;
}

body.dark-theme .ss-option {
    color: var(--text-primary) !important;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .header-content-wrapper {
        grid-template-columns: 180px 0.8fr 1.5fr 0.6fr 0.6fr;
    }
}

@media (max-width: 992px) {
    .header-content-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .travel-date { grid-column: 1; }
    .header-name { grid-column: 2; }
    .header-details { grid-column: 1 / -1; }
    .status-group { grid-column: 1; }
    .contact { grid-column: 2; justify-content: flex-start; }
    .remark { grid-column: 1 / -1; }
    .priority-family-group { grid-column: 1; }
    .url { grid-column: 1 / -1; }
    .username { grid-column: 1; }
    .password { grid-column: 2; justify-content: flex-start; }
    
    .user-management-grid,
    .url-management-grid {
        grid-template-columns: 1fr;
    }
    
    .record-body {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    #app-container {
        padding: 12px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .search-and-filter-container,
    .header-actions-container {
        width: 100%;
        justify-content: center;
    }
    
    #search-input {
        width: 100%;
    }
    
    .record-body {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    .invoice-modal-container .container {
        padding: 28px 20px;
    }
    
    .invoice-modal-container .info-section {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .invoice-modal-container .invoice-details {
        text-align: left;
    }
    
    .invoice-modal-container .detail-row {
        justify-content: flex-start;
    }
    
    #invoice-modal .modal-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
    }
    
    .invoice-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .invoice-actions .action-btn {
        flex: 1;
        justify-content: center;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .history-display {
        width: 100%;
        align-items: center;
        margin: 0 0 8px 0;
    }
}

@media (max-width: 480px) {
    .header-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .travel-date, .header-name, .header-details,
    .status-group, .contact, .remark,
    .priority-family-group, .url, .username, .password {
        grid-column: 1;
        justify-content: flex-start;
    }
    
    .field-group {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .record-body label {
        padding-top: 0;
    }
}

/* === UTILITY === */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === SIGN & VERIFY BUTTON === */
.sign-verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.sign-verify-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.sign-verify-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sign-verify-btn i {
    font-size: 14px;
}

/* Verified Status Badge */
.verified-status {
    display: flex;
    align-items: center;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    color: #065f46;
    font-size: 13px;
    font-weight: 500;
}

.verified-badge i {
    font-size: 16px;
}

body.dark-theme .verified-badge {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.dark-theme .sign-verify-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* === INLINE SIGN BUTTON (Record Body) === */
.sign-verify-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.sign-verify-btn-inline:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(59, 130, 246, 0.35);
}

.sign-verify-btn-inline:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sign-verify-btn-inline i {
    font-size: 11px;
}

/* Inline Verified Badge */
.verified-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-sm);
    color: #065f46;
}

.verified-badge-inline i {
    font-size: 16px;
    color: #10b981;
}

/* Signature Display */
.signature-display {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.verified-by-text {
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    color: #065f46;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}

.signature-name {
    font-family: 'Dancing Script', 'Brush Script MT', 'Segoe Script', cursive;
    font-size: 22px;
    font-weight: 600;
    color: #1e40af;
    letter-spacing: 0.5px;
    text-shadow: 0.5px 0.5px 0px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    display: inline-block;
    line-height: 1;
}

.signature-date {
    font-family: inherit;
    font-size: 10px;
    color: #047857;
    font-weight: 500;
    margin-top: 2px;
}

body.dark-theme .verified-badge-inline {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.dark-theme .verified-badge-inline i {
    color: #34d399;
}

body.dark-theme .verified-by-text {
    color: #a7f3d0;
}

body.dark-theme .signature-name {
    color: #93c5fd;
    text-shadow: 0.5px 0.5px 0px rgba(0,0,0,0.3);
}

body.dark-theme .signature-date {
    color: #a7f3d0;
}

/* === VISA INFO MODAL === */
#info-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#info-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(99, 102, 241, 0.15);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.info-modal-header {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-modal-header h2 i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.info-modal-header button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal-header button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.info-modal-content {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Info Sections */
.info-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all var(--transition-base);
}

.info-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.info-section-header {
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--slate-100) 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-default);
}

body.dark-theme .info-section-header {
    background: linear-gradient(135deg, var(--slate-800) 0%, var(--slate-700) 100%);
}

.info-section-header i {
    font-size: 1.25rem;
    color: var(--primary-500);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-100);
    border-radius: var(--radius-md);
}

body.dark-theme .info-section-header i {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-400);
}

.info-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-section-body {
    padding: 20px;
}

.info-section-body p {
    margin: 0 0 16px 0;
    line-height: 1.7;
    color: var(--text-secondary);
}

.info-section-body p:last-child {
    margin-bottom: 0;
}

/* Info Highlights */
.info-highlight {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.info-highlight i {
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-highlight span {
    line-height: 1.6;
}

.info-highlight.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    color: #92400e;
}

.info-highlight.warning i {
    color: #f59e0b;
}

.info-highlight.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.info-highlight.success i {
    color: #10b981;
}

.info-highlight.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.info-highlight.info i {
    color: #3b82f6;
}

body.dark-theme .info-highlight.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

body.dark-theme .info-highlight.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

body.dark-theme .info-highlight.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

/* Checklist Grid */
.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.checklist-item {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.checklist-item:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-sm);
}

.checklist-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.checklist-icon.passport {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.checklist-icon.travel {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
}

.checklist-icon.finance {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.checklist-icon.employment {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.checklist-icon.photos {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #6366f1;
}

body.dark-theme .checklist-icon.passport {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
}

body.dark-theme .checklist-icon.travel {
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.2) 0%, rgba(219, 39, 119, 0.15) 100%);
}

body.dark-theme .checklist-icon.finance {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
}

body.dark-theme .checklist-icon.employment {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
}

body.dark-theme .checklist-icon.photos {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.15) 100%);
}

.checklist-content h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.checklist-content ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
}

.checklist-content ul li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.checklist-content ul li:last-child {
    margin-bottom: 0;
}

/* Info Note */
.info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--slate-100);
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-note i {
    color: var(--amber-500);
    margin-top: 2px;
}

.info-note.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
}

.info-note.success i {
    color: #10b981;
}

body.dark-theme .info-note {
    background: var(--slate-800);
}

body.dark-theme .info-note.success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

/* Guidelines List */
.guidelines-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guidelines-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    line-height: 1.6;
}

.guidelines-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.guidelines-list li i {
    width: 36px;
    height: 36px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-theme .guidelines-list li i {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-400);
}

/* Duration Info */
.duration-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.duration-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.duration-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-200) 100%);
    color: var(--primary-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

body.dark-theme .duration-icon {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-400);
}

.duration-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.duration-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.duration-text span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Success Rate Container */
.success-rate-container {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.success-rate-card {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    padding: 24px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.rate-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-200) 100%);
    border: 3px solid var(--slate-300);
}

.rate-circle.highlight {
    background: linear-gradient(135deg, var(--emerald-400) 0%, var(--emerald-500) 100%);
    border-color: var(--emerald-600);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

body.dark-theme .rate-circle {
    background: linear-gradient(135deg, var(--slate-700) 0%, var(--slate-600) 100%);
    border-color: var(--slate-500);
}

body.dark-theme .rate-circle.highlight {
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
}

.rate-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rate-circle.highlight .rate-value {
    color: white;
}

.rate-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rate-sublabel {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Refusal Note */
.refusal-note {
    font-size: 0.95rem;
    margin-top: 16px;
}

/* Policy Link */
.policy-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--slate-100);
    border-radius: var(--radius-md);
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.policy-link i {
    color: var(--primary-500);
    font-size: 1.1rem;
}

.policy-link a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.policy-link a:hover {
    text-decoration: underline;
}

body.dark-theme .policy-link {
    background: var(--slate-800);
}

body.dark-theme .policy-link a {
    color: var(--primary-400);
}

/* Refund Options */
.refund-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.refund-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
    border-radius: var(--radius-md);
    color: white;
}

.refund-option:nth-child(2) {
    background: linear-gradient(135deg, var(--sky-500) 0%, var(--primary-500) 100%);
}

.refund-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.refund-text {
    font-weight: 500;
    line-height: 1.5;
}

/* Info Footer */
.info-footer {
    text-align: center;
    padding: 28px 20px;
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--slate-100) 100%);
    border-radius: var(--radius-lg);
    margin-top: 8px;
}

body.dark-theme .info-footer {
    background: linear-gradient(135deg, var(--slate-800) 0%, var(--slate-700) 100%);
}

.info-footer p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-footer .thank-you {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.info-footer .signature {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-footer .signature span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-footer .signature strong {
    color: var(--primary-600);
    font-size: 1rem;
}

body.dark-theme .info-footer .signature strong {
    color: var(--primary-400);
}

/* Info Button Header Style */
.info-btn-header {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%) !important;
    color: white !important;
    border: none !important;
}

.info-btn-header:hover {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    #info-modal {
        max-height: 95vh;
        margin: 10px;
    }
    
    .info-modal-content {
        padding: 20px 16px;
    }
    
    .info-section-body {
        padding: 16px;
    }
    
    .checklist-grid {
        grid-template-columns: 1fr;
    }
    
    .success-rate-container {
        flex-direction: column;
        align-items: center;
    }
    
    .success-rate-card {
        max-width: 100%;
        width: 100%;
    }
}

/* Details Verify Field */
.details-verify-field {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-default);
}

.verify-container {
    min-height: 28px;
    display: flex;
    align-items: center;
}

/* Cannot Verify Text */
.cannot-verify-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    padding: 6px 10px;
    background: var(--slate-100);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-default);
}

.cannot-verify-text i {
    font-size: 12px;
    color: var(--slate-400);
}

body.dark-theme .cannot-verify-text {
    background: var(--slate-800);
    border-color: var(--slate-600);
    color: var(--slate-400);
}

body.dark-theme .cannot-verify-text i {
    color: var(--slate-500);
}
/* === LOAD MORE === */
.load-more-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px 0;
    margin-top: 10px;
}

.load-more-btn, .load-all-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.load-more-btn:hover, .load-all-btn:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.load-all-btn {
    background: var(--bg-elevated);
    border-style: dashed;
}

body.dark-theme .load-more-btn, 
body.dark-theme .load-all-btn {
    background: var(--bg-elevated);
    border-color: var(--border-default);
    color: var(--text-secondary);
}

body.dark-theme .load-more-btn:hover,
body.dark-theme .load-all-btn:hover {
    background: var(--primary-900);
    border-color: var(--primary-600);
    color: var(--primary-300);
}
