﻿:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #0f3460;
    --gold: #c9a227;
    --gold-light: #d4b84a;
    --text: #2d2d2d;
    --text-light: #6b7280;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.5;
}

.login-page {
    display: flex; min-height: 100vh; background: #0f172a;
    position: relative; overflow: hidden;
}
.login-page::before {
    content: ''; position: absolute; top: -40%; right: -10%; width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%); border-radius: 50%;
}
.login-page::after {
    content: ''; position: absolute; bottom: -30%; left: -5%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(201,162,39,0.1) 0%, transparent 60%); border-radius: 50%;
}
.login-left {
    flex: 1; display: flex; flex-direction: column; justify-content: space-between;
    padding: 40px 48px; position: relative; z-index: 1;
    background: linear-gradient(135deg, rgba(15,23,42,0.95) 0%, rgba(30,41,59,0.9) 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand-icon {
    width: 42px; height: 42px; background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.login-brand-icon svg { width: 22px; height: 22px; stroke: #fff; }
.login-brand-text { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.login-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 48px; }
.login-headline {
    font-size: 36px; font-weight: 800; color: #fff; line-height: 1.15;
    letter-spacing: -1px; margin-bottom: 16px;
}
.login-subtitle { font-size: 15px; color: #94a3b8; line-height: 1.6; max-width: 380px; }
.login-badge {
    display: inline-flex; align-items: center; padding: 6px 14px;
    background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3);
    border-radius: 20px; font-size: 11px; font-weight: 600; color: #a5b4fc;
    text-transform: uppercase; letter-spacing: 1px; width: fit-content;
    margin-bottom: 16px;
}
.login-headline {
    font-size: 40px; font-weight: 800; color: #fff; line-height: 1.1;
    letter-spacing: -1.5px; margin-bottom: 16px;
}
.login-features { display: flex; flex-direction: column; gap: 16px; }
.login-feature {
    display: flex; align-items: center; gap: 16px; padding: 16px 20px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; transition: all 0.3s;
}
.login-feature:hover { background: rgba(255,255,255,0.06); border-color: rgba(99,102,241,0.3); transform: translateX(4px); }
.login-feature-icon {
    width: 44px; height: 44px; background: rgba(99,102,241,0.12);
    border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.login-feature-icon svg { width: 20px; height: 20px; stroke: #818cf8; }
.login-feature-title { font-size: 14px; font-weight: 600; color: #e2e8f0; margin-bottom: 2px; }
.login-feature-desc { font-size: 12px; color: #64748b; }

.login-footer-text { font-size: 12px; color: #475569; }
.login-right {
    width: 520px; display: flex; align-items: center; justify-content: center;
    padding: 48px; position: relative; z-index: 1;
}
.login-form-wrapper {
    width: 100%; max-width: 380px;
}
.login-form-header { margin-bottom: 36px; }
.login-form-header h2 {
    font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.5px; margin-bottom: 8px;
}
.login-form-header p { font-size: 14px; color: #64748b; }
.login-form-body { display: flex; flex-direction: column; gap: 24px; }
.login-input-group {
    position: relative; height: 56px;
}
.login-input-group input {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    padding: 16px 16px 16px 48px; background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1); border-radius: 12px;
    font-size: 15px; font-family: inherit; color: #fff; outline: none;
    transition: all 0.3s; z-index: 1;
}
.login-input-group input::placeholder { color: transparent; }
.login-input-group input:focus {
    border-color: #6366f1; background: rgba(99,102,241,0.05);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.login-input-group label {
    position: absolute; left: 48px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: #64748b; pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2;
}
.login-input-group input:focus + label,
.login-input-group input:not(:placeholder-shown) + label {
    top: 8px; transform: translateY(0);
    font-size: 10px; font-weight: 600; color: #818cf8; text-transform: uppercase; letter-spacing: 0.5px;
}
.login-input-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    z-index: 2; display: flex; align-items: center;
}
.login-input-icon svg { width: 18px; height: 18px; stroke: #475569; transition: stroke 0.3s; }
.login-input-group input:focus ~ .login-input-icon svg { stroke: #818cf8; }
.login-input-line {
    position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    transition: all 0.3s; transform: translateX(-50%); border-radius: 1px; z-index: 3;
}
.login-input-group input:focus ~ .login-input-line { width: 100%; }
.login-btn {
    position: relative; width: 100%; height: 52px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none; border-radius: 12px; cursor: pointer;
    font-size: 15px; font-weight: 600; font-family: inherit; color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    overflow: hidden; transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.login-btn:hover {
    transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.5);
    background: linear-gradient(135deg, #818cf8, #6366f1);
}
.login-btn:active { transform: translateY(0); }
.login-btn-loader svg {
    width: 20px; height: 20px; animation: spin 1s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.login-form-footer { text-align: center; margin-top: 32px; }
.login-form-footer p { font-size: 11px; color: #475569; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; margin-bottom: 8px; color: var(--text);
    font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
    border-radius: var(--radius); font-size: 15px; font-family: inherit;
    transition: all 0.2s; background: var(--card); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.2s; letter-spacing: 0.3px;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(26,26,46,0.25); }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(26,26,46,0.3); }
.btn-gold { background: var(--gold); color: var(--primary); box-shadow: 0 4px 12px rgba(201,162,39,0.3); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.btn-success:hover { background: #dcfce7; }
.btn-secondary { background: #f3f4f6; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e5e7eb; }
.btn-ghost { background: transparent; color: var(--text-light); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text); background: #f3f4f6; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-xs { padding: 6px 12px; font-size: 12px; }

.app-container { display: none; }
.app-header {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 0 32px; height: 64px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
}
.app-header-left { display: flex; align-items: center; gap: 24px; }
.brand {
    display: flex; align-items: center; gap: 12px;
    font-size: 18px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px;
}
.brand-icon {
    width: 36px; height: 36px; background: var(--primary); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
}
.brand-icon svg { width: 18px; height: 18px; stroke: var(--gold); }

.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
    padding: 8px 16px; border: none; background: none; cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--text-light);
    border-radius: var(--radius); transition: all 0.2s; font-family: inherit;
}
.nav-tab:hover { color: var(--primary); background: #f3f4f6; }
.nav-tab.active { color: var(--primary); background: #f3f4f6; font-weight: 600; }

.app-header-right { display: flex; align-items: center; gap: 16px; }
.user-pill {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px; background: #f3f4f6; border-radius: 20px;
    font-size: 13px; font-weight: 500;
}
.user-avatar {
    width: 28px; height: 28px; background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 12px; font-weight: 700;
}
.user-role {
    font-size: 11px; color: var(--gold); background: rgba(201,162,39,0.1);
    padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}

.toolbar {
    padding: 24px 32px; display: flex; gap: 12px;
    align-items: center; justify-content: space-between;
}
.toolbar-left { display: flex; gap: 12px; align-items: center; }
.toolbar-right { display: flex; gap: 12px; align-items: center; }
.search-box {
    padding: 10px 16px 10px 40px; border: 1.5px solid var(--border);
    border-radius: var(--radius); font-size: 14px; width: 320px; font-family: inherit;
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center;
    transition: all 0.2s;
}
.search-box:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,0.1); }
.filter-group { display: flex; gap: 4px; }
.filter-btn {
    padding: 6px 12px; border: 1px solid var(--border); background: var(--card);
    border-radius: var(--radius); font-size: 11px; font-weight: 500; cursor: pointer;
    transition: all 0.2s; color: var(--text-light); white-space: nowrap;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.custom-date-filter { display: flex; gap: 6px; align-items: center; }
.custom-date-filter input[type="date"] {
    padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 11px; font-family: inherit;
}
.custom-date-filter span { font-size: 11px; color: var(--text-light); }
.btn-xs { padding: 4px 10px; font-size: 11px; }
.tfn-filter-wrap { position: relative; }
.tfn-filter-btn { border: 1px solid var(--border); }
.tfn-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tfn-filter-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 1100;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15); width: 280px; max-height: 320px; overflow: hidden;
}
.tfn-filter-search { padding: 10px; border-bottom: 1px solid var(--border); }
.tfn-filter-search input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; font-family: inherit; outline: none;
}
.tfn-filter-search input:focus { border-color: var(--gold); }
.tfn-filter-list { max-height: 220px; overflow-y: auto; }
.tfn-filter-item {
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
.tfn-filter-item:hover { background: #f8fafc; }
.tfn-filter-item.active { background: #f0f4ff; }
.tfn-filter-num { font-size: 13px; font-weight: 600; color: var(--text); }
.tfn-filter-name { font-size: 11px; color: var(--text-light); }
.tfn-filter-empty { padding: 20px; text-align: center; color: var(--text-light); font-size: 13px; }
.tfn-filter-actions { padding: 8px 10px; border-top: 1px solid var(--border); }
.tfn-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; }
.tfn-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.blurred-text {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.2s;
}
.reveal-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.reveal-field-wrap input {
  flex: 1;
  padding-right: 36px;
}
.reveal-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.reveal-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: #f0f4ff;
}
.reveal-btn.revealed {
  color: #10b981;
  border-color: #10b981;
  background: #ecfdf5;
}
.stats-row { display: flex; gap: 12px; padding: 0 32px 16px; flex-wrap: wrap; }
.stat-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 12px 16px; flex: 1; min-width: 120px; box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-card .stat-change { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.stat-card-highlight { background: #d1fae5; border-color: #059669; }
.stat-card-highlight .stat-value { color: #047857; }

.table-container {
    margin: 0 32px 32px; background: var(--card);
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    box-shadow: var(--shadow); overflow: hidden;
}
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1200px; }
thead { background: #f8fafc; }
th {
    padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--border);
    font-size: 10px; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap;
}
td {
    padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0;
    font-size: 13px; color: var(--text); white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: inherit; }

.col-id { font-family: 'SF Mono', monospace; font-weight: 700; color: var(--primary); font-size: 12px; letter-spacing: 0.5px; }
.col-customer { font-weight: 500; font-size: 13px; }
.col-phone { color: var(--text-light); font-size: 12px; }
.col-email { color: var(--text-light); font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-agent { font-size: 12px; }
.col-pnr { font-family: 'SF Mono', monospace; font-size: 11px; color: var(--text-light); background: #f3f4f6; padding: 3px 6px; border-radius: 3px; }
.col-flight-date { font-size: 12px; line-height: 1.4; }
.col-flight-date .dep { font-weight: 500; color: var(--text); }
.col-flight-date .ret { font-size: 11px; color: var(--text-light); }
.col-locations { font-size: 12px; }
.col-airline { font-size: 12px; color: var(--text-light); }
.col-tfn { font-family: 'SF Mono', monospace; font-size: 11px; color: var(--text-light); background: #f3f4f6; padding: 3px 6px; border-radius: 3px; }
.col-price { font-weight: 600; font-size: 13px; }
.col-fare { font-weight: 700; color: var(--primary); font-size: 13px; }
.col-created { font-size: 11px; color: var(--text-light); line-height: 1.4; }

.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
}
.status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-pending::before { background: #f59e0b; }
.status-confirmed { background: #d1fae5; color: #065f46; }
.status-confirmed::before { background: #10b981; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-cancelled::before { background: #ef4444; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-processing::before { background: #3b82f6; }
.status-followup { background: #f3f4f6; color: #374151; }
.status-followup::before { background: #6b7280; }
.status-chargeback { background: #fce7f3; color: #9d174d; }
.status-chargeback::before { background: #ec4899; }
.status-failed { background: #e5e7eb; color: #1f2937; }
.status-failed::before { background: #374151; }
.status-hold { background: #fff7ed; color: #9a3412; }
.status-hold::before { background: #f97316; }
.status-customerservice { background: #ede9fe; color: #5b21b6; }
.status-customerservice::before { background: #8b5cf6; }

.status-row { border-radius: 0; }
.status-row-pending { background: #fef3c7; }
.status-row-confirmed { background: #dbeafe; }
.status-row-completed { background: #d1fae5; }
.status-row-cancelled { background: #fee2e2; }
.status-row-processing { background: #dbeafe; }
.status-row-followup { background: #f3f4f6; }
.status-row-chargeback { background: #fce7f3; }
.status-row-failed { background: #e5e7eb; }
.status-row-hold { background: #fff7ed; }
.status-row-customerservice { background: #ede9fe; }

.price-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
}
.price-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.price-unpaid { background: #fee2e2; color: #991b1b; }
.price-unpaid::before { background: #ef4444; }
.price-paid { background: #d1fae5; color: #065f46; }
.price-paid::before { background: #10b981; }
.price-customerservice { background: #ede9fe; color: #5b21b6; }
.price-customerservice::before { background: #8b5cf6; }

.col-pnr { font-family: 'SF Mono', monospace; font-size: 11px; color: var(--text-light); background: #f3f4f6; padding: 3px 6px; border-radius: 3px; }
.col-price { font-weight: 600; font-size: 13px; }

.actions { display: flex; gap: 4px; }
.actions .btn { padding: 4px 8px; font-size: 11px; }

.confirm-popup {
    position: fixed; top: 80px; right: 32px; z-index: 3000;
    background: var(--card); border-radius: var(--radius-lg); padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); border: 1px solid var(--border);
    width: 360px; transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.confirm-popup.show { transform: translateX(0); }
.confirm-popup h4 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.confirm-popup p { font-size: 13px; color: var(--text-light); margin-bottom: 20px; line-height: 1.5; }
.confirm-popup .btn-group { display: flex; gap: 10px; }

.ist-clock {
    font-size: 13px; color: var(--text-light); font-weight: 500;
    display: flex; align-items: center; gap: 6px;
}
.ist-clock .time-dot {
    width: 6px; height: 6px; background: #10b981; border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.actions { display: flex; gap: 6px; }
.actions .btn { padding: 6px 12px; font-size: 12px; }

.empty-state { text-align: center; padding: 80px 40px; color: var(--text-light); }
.empty-state-icon {
    width: 64px; height: 64px; margin: 0 auto 24px; background: #f3f4f6;
    border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center;
}
.empty-state-icon svg { width: 32px; height: 32px; stroke: var(--text-light); }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 1000; justify-content: center;
    align-items: center; padding: 24px; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--card); border-radius: var(--radius-lg); width: 100%; max-width: 720px;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
    border: 1px solid var(--border); animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    padding: 24px 28px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { font-size: 18px; font-weight: 600; color: var(--primary); }
.modal-close {
    background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light);
    width: 32px; height: 32px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.modal-close:hover { background: #f3f4f6; color: var(--text); }
.modal-body { padding: 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row .form-group { margin-bottom: 0; }
.form-full { grid-column: 1 / -1; }
.required { color: #dc2626; }

.admin-panel { display: none; padding: 24px 32px; }
.admin-panel.active { display: block; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; }
.admin-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow);
}
.admin-card h3 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 24px; }
.user-list { margin-top: 24px; }
.user-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.user-item:last-child { border-bottom: none; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-info .avatar {
    width: 36px; height: 36px; background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 13px; font-weight: 700;
}
.user-info .name { font-weight: 600; font-size: 14px; }
.user-info .role-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.role-admin { background: #fef3c7; color: #92400e; }
.role-agent { background: #dbeafe; color: #1e40af; }

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

.toast {
    position: fixed; bottom: 32px; right: 32px; background: var(--primary); color: white;
    padding: 14px 24px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    transform: translateY(100px); opacity: 0; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2000; font-size: 14px; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast-icon { width: 20px; height: 20px; }

/* ==================== 403 ACCESS DENIED ==================== */
.access-denied-page {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    background: #f8fafc; z-index: 9999;
}
.access-denied-box {
    text-align: center; padding: 48px;
    background: #fff; border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.access-denied-code {
    font-size: 72px; font-weight: 800; color: #ef4444;
    line-height: 1; margin-bottom: 12px;
}
.access-denied-box h2 { font-size: 20px; color: #0f172a; margin-bottom: 8px; }
.access-denied-box p { font-size: 14px; color: #64748b; margin-bottom: 20px; }

/* ==================== ADMIN FORM ==================== */
.admin-form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.admin-form-grid .form-full { grid-column: 1 / -1; }

/* ==================== USER LIST ==================== */
.user-meta {
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px;
}
.user-username { font-size: 11px; color: #94a3b8; }
.user-email { font-size: 11px; color: #94a3b8; }
.user-status-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; }
.user-actions { display: flex; gap: 4px; flex-shrink: 0; }
.role-tag {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 10px; font-weight: 600; text-transform: capitalize;
}
.user-item {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 12px; border-bottom: 1px solid #f1f5f9;
}
.user-item:last-child { border-bottom: none; }
.user-info { display: flex; gap: 10px; align-items: flex-start; flex: 1; }
.user-info .avatar {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-info .name { font-size: 13px; font-weight: 600; color: #0f172a; }

/* ==================== USER ROLE BADGE IN HEADER ==================== */
.user-role {
    font-size: 10px; font-weight: 600; padding: 2px 8px;
    border-radius: 10px; text-transform: capitalize;
}

/* ==================== OTP MODAL ==================== */
.otp-modal {
    background: #fff; border-radius: 16px; padding: 40px; max-width: 420px; width: 90%;
    text-align: center; position: relative; box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}
.otp-modal-icon {
    width: 64px; height: 64px; border-radius: 16px; display: flex;
    align-items: center; justify-content: center; margin: 0 auto 16px;
    background: #eff6ff;
}
.otp-modal-icon svg { width: 32px; height: 32px; color: #3b82f6; }
.otp-modal h3 { font-size: 20px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.otp-modal-subtitle { font-size: 13px; color: #64748b; margin: 0 0 24px; }
.otp-input-group {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px;
}
.otp-digit {
    width: 48px; height: 56px; text-align: center; font-size: 24px; font-weight: 700;
    border: 2px solid #e2e8f0; border-radius: 12px; outline: none; color: #0f172a;
    font-family: 'SF Mono', 'Fira Code', monospace; transition: border-color 0.2s;
}
.otp-digit:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.otp-separator { font-size: 20px; color: #cbd5e1; margin: 0 2px; }
.otp-timer { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.otp-error { font-size: 12px; color: #ef4444; min-height: 18px; margin-bottom: 8px; }
.otp-actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.otp-resend { font-size: 12px; color: #94a3b8; }
.btn-link { background: none; border: none; color: #3b82f6; cursor: pointer; font-size: 12px; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-link:disabled { color: #94a3b8; cursor: not-allowed; }

/* ==================== PASSWORD MODAL ==================== */
#passwordModal .otp-modal-icon { background: #fef2f2; }
#passwordModal .otp-modal-icon svg { color: #ef4444; }
.btn-danger { background: #ef4444; color: #fff; border: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-danger:hover { background: #dc2626; }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 768px) {
    .login-page { flex-direction: column; }
    .login-left { padding: 32px 24px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); min-height: auto; }
    .login-hero { gap: 32px; }
    .login-headline { font-size: 28px; }
    .login-features { display: none; }
    .login-right { width: 100%; padding: 32px 24px; }
    .login-form-wrapper { max-width: 100%; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left { flex-wrap: wrap; }
    .search-box { width: 100%; }
    .filter-group { flex-wrap: wrap; }
    .custom-date-filter { flex-wrap: wrap; }
    .form-row { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .stats-row { flex-direction: column; }
    .admin-form-grid { grid-template-columns: 1fr; }
}
