/* ============================================================
   Assya Voyage — Plateforme Administration
   CSS extrait à l'identique du prototype admin.html validé
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #0d2b4e;
  --navy-2: #133e6d;
  --navy-3: #1c4a7e;
  --navy-soft: #f5f8fc;
  --orange: #f08300;
  --orange-light: #ffa133;
  --orange-soft: #fff4e5;
  --green: #19a974;
  --green-soft: #e6f7ef;
  --red: #e63946;
  --red-soft: #ffe4e7;
  --blue: #2563eb;
  --blue-soft: #e8f1fb;
  --purple: #7c3aed;
  --purple-soft: #f3e8ff;
  --gray-50: #fafbfc;
  --gray-100: #f4f5f7;
  --gray-150: #ebedf0;
  --gray-200: #e4e6ea;
  --gray-300: #d3d6db;
  --gray-400: #a8acb3;
  --gray-500: #6e737a;
  --gray-600: #4a4f56;
  --gray-700: #2c2f36;
  --gray-900: #14161a;
  --shadow-sm: 0 1px 2px rgba(13,43,78,.06);
  --shadow: 0 4px 14px rgba(13,43,78,.06);
  --shadow-lg: 0 14px 40px rgba(13,43,78,.1);
}
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-700);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
button { font-family: inherit; cursor: pointer; border: none; }
a { text-decoration: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* ==================== LOGIN ==================== */
#login-screen { width: 100%; min-height: 100vh; display: flex; flex-direction: row; }
.login-left {
  flex: 1.2;
  background:
    radial-gradient(800px 500px at 30% 10%, rgba(240,131,0,.15) 0%, transparent 60%),
    radial-gradient(700px 600px at 80% 90%, rgba(28,74,126,.4) 0%, transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, #08182f 100%);
  color: #fff; padding: 50px 60px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.login-left::after {
  content: ''; position: absolute;
  bottom: -100px; right: -100px;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,131,0,.18) 0%, transparent 70%);
}
.ll-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 60px; }
.ll-logo {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #fff 0%, #ffe0b8 100%);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins'; font-weight: 800; font-size: 30px;
  color: var(--navy);
}
.ll-name { font-family: 'Poppins'; font-size: 22px; font-weight: 700; }
.ll-name span { color: var(--orange); }
.ll-sub { font-size: 12px; opacity: .7; margin-top: 2px; letter-spacing: .5px; }
.ll-content { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 480px; }
.ll-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(240,131,0,.15); border: 1px solid rgba(240,131,0,.3);
  color: var(--orange-light); font-size: 12px; font-weight: 500;
  width: fit-content; margin-bottom: 22px;
}
.ll-pill svg { width: 14px; height: 14px; }
.ll-content h1 { font-family: 'Poppins', sans-serif; font-size: 42px; font-weight: 700; line-height: 1.15; margin-bottom: 18px; }
.ll-content h1 span { color: var(--orange); }
.ll-content p { font-size: 15px; line-height: 1.6; opacity: .8; margin-bottom: 36px; max-width: 440px; }
.ll-features { display: grid; gap: 18px; position: relative; z-index: 2; }
.ll-feat { display: flex; align-items: flex-start; gap: 14px; }
.ll-feat-icon { width: 42px; height: 42px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ll-feat-icon svg { width: 20px; height: 20px; color: var(--orange); }
.ll-feat .t { font-weight: 600; font-size: 14px; }
.ll-feat .d { font-size: 12px; opacity: .7; margin-top: 4px; line-height: 1.5; }
.ll-foot { margin-top: 40px; font-size: 11px; opacity: .5; position: relative; z-index: 2; }

.login-right { flex: 1; background: #fff; display: flex; flex-direction: column; padding: 60px; position: relative; }
.lr-top { display: flex; justify-content: flex-end; gap: 12px; }
.lr-top span { font-size: 12px; color: var(--gray-500); }
.lr-top a { color: var(--orange); font-weight: 600; font-size: 12px; }
.lr-content { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; width: 100%; }
.lr-title { font-family: 'Poppins'; font-size: 30px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.lr-sub { font-size: 14px; color: var(--gray-500); margin-bottom: 32px; }
.field { margin-bottom: 18px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; display: block; }
.field-input { width: 100%; padding: 14px 16px; border: 2px solid var(--gray-200); background: var(--gray-50); border-radius: 12px; font-size: 14px; transition: all .2s; color: var(--gray-700); }
.field-input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(240,131,0,.1); }
.input-wrap { position: relative; }
.input-wrap .icon-l { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.input-wrap .icon-l svg { width: 18px; height: 18px; }
.input-wrap .field-input.with-icon { padding-left: 44px; }
.input-wrap .icon-r { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-400); cursor: pointer; }
.row-flex { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--gray-600); }
.checkbox input { display: none; }
.checkbox .box { width: 18px; height: 18px; border: 2px solid var(--gray-300); border-radius: 5px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.checkbox input:checked + .box { background: var(--orange); border-color: var(--orange); }
.checkbox input:checked + .box::after { content: ''; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.forgot { font-size: 13px; color: var(--orange); font-weight: 600; }
.btn-primary { width: 100%; padding: 14px; background: var(--orange); color: #fff; border-radius: 12px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 18px rgba(240,131,0,.4); transition: all .2s; }
.btn-primary:hover { background: var(--orange-light); transform: translateY(-1px); }
.demo-creds { margin-top: 22px; padding: 12px 14px; background: var(--blue-soft); border-radius: 10px; font-size: 12px; color: var(--blue); display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.demo-creds svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.demo-creds b { color: #1d4ed8; }
.lr-foot { text-align: center; font-size: 12px; color: var(--gray-400); margin-top: 36px; }

/* ==================== ADMIN SHELL ==================== */
#admin-screen { width: 100%; min-height: 100vh; display: flex; flex-direction: row; }
.sidebar { width: 260px; background: var(--navy); color: #fff; flex-shrink: 0; height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar::-webkit-scrollbar { width: 0; }
.sb-brand { padding: 22px 22px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sb-logo { width: 40px; height: 40px; background: linear-gradient(135deg, var(--orange), var(--orange-light)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: 'Poppins'; font-weight: 800; font-size: 22px; color: #fff; }
.sb-name { font-family: 'Poppins'; font-weight: 700; font-size: 16px; }
.sb-name span { color: var(--orange); }
.sb-sub { font-size: 10px; opacity: .6; letter-spacing: 1px; text-transform: uppercase; }
.sb-nav { flex: 1; padding: 16px 12px; }
.sb-section { font-size: 10px; opacity: .4; text-transform: uppercase; letter-spacing: 1.5px; padding: 14px 12px 6px; font-weight: 600; }
.sb-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.65); cursor: pointer; margin-bottom: 2px; transition: all .15s; position: relative; }
.sb-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-item.active { background: linear-gradient(90deg, rgba(240,131,0,.18) 0%, rgba(240,131,0,.05) 100%); color: #fff; }
.sb-item.active::before { content: ''; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 3px; background: var(--orange); border-radius: 0 4px 4px 0; }
.sb-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sb-item .badge-nav { margin-left: auto; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.sb-item .badge-nav.green { background: var(--green); }
.sb-item .badge-nav.red { background: var(--red); }
.sb-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.06); margin-top: auto; }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); cursor: pointer; }
.sb-user .av { width: 38px; height: 38px; background: linear-gradient(135deg, var(--orange), var(--orange-light)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.sb-user .info { flex: 1; min-width: 0; }
.sb-user .info .n { font-size: 13px; font-weight: 600; }
.sb-user .info .e { font-size: 11px; opacity: .6; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

/* ==================== MAIN ==================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 70px; background: #fff; border-bottom: 1px solid var(--gray-150); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 30; }
.topbar .menu-toggle { display: none; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-500); }
.breadcrumb b { color: var(--navy); font-weight: 600; }
.breadcrumb svg { width: 14px; height: 14px; opacity: .4; }
.topbar-search { flex: 1; max-width: 460px; position: relative; margin: 0 24px; }
.topbar-search input { width: 100%; padding: 10px 14px 10px 40px; background: var(--gray-100); border: 1px solid var(--gray-150); border-radius: 10px; font-size: 13px; transition: all .2s; }
.topbar-search input:focus { outline: none; background: #fff; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(240,131,0,.1); }
.topbar-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--gray-400); }
.topbar-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #fff; border: 1px solid var(--gray-200); border-radius: 5px; padding: 2px 6px; font-size: 10px; color: var(--gray-500); font-family: monospace; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tb-icon-btn { width: 40px; height: 40px; background: var(--gray-50); border: 1px solid var(--gray-150); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: all .15s; }
.tb-icon-btn:hover { background: var(--gray-100); }
.tb-icon-btn svg { width: 18px; height: 18px; color: var(--gray-600); }
.tb-icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }
.tb-divider { width: 1px; height: 28px; background: var(--gray-200); }
.tb-user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--gray-50); border: 1px solid var(--gray-150); cursor: pointer; position: relative; }
.tb-user .av { width: 32px; height: 32px; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.tb-user .nm { font-size: 12px; font-weight: 600; color: var(--gray-700); }
.tb-user-menu { position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-150); min-width: 200px; padding: 6px; display: none; z-index: 60; }
.tb-user-menu.open { display: block; }
.tb-user-menu a { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--gray-700); }
.tb-user-menu a:hover { background: var(--gray-50); color: var(--orange); }
.tb-user-menu a svg { width: 16px; height: 16px; }
.tb-user-menu .sep { height: 1px; background: var(--gray-150); margin: 4px 0; }

.content { flex: 1; padding: 28px; overflow-x: hidden; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title { font-family: 'Poppins'; font-size: 26px; font-weight: 700; color: var(--navy); }
.page-sub { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.ph-actions { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: all .15s; text-decoration: none; }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 4px 12px rgba(240,131,0,.3); }
.btn-orange:hover { background: var(--orange-light); transform: translateY(-1px); color: #fff; }
.btn-outline { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-outline:hover { background: var(--gray-50); }
.btn-ghost { background: var(--gray-100); color: var(--gray-700); }
.btn-danger { background: var(--red); color: #fff; }
.btn svg { width: 16px; height: 16px; }

.card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-150); }
.card-head { padding: 18px 20px; border-bottom: 1px solid var(--gray-150); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.card-title { font-family: 'Poppins'; font-size: 15px; font-weight: 700; color: var(--navy); }
.card-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.card-body { padding: 20px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: #fff; border-radius: 16px; padding: 18px; border: 1px solid var(--gray-150); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.kpi::before { content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100px; border-radius: 50%; opacity: .08; transform: translate(40px, -40px); }
.kpi.k-orange::before { background: var(--orange); }
.kpi.k-green::before { background: var(--green); }
.kpi.k-blue::before { background: var(--blue); }
.kpi.k-purple::before { background: var(--purple); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.kpi-icon svg { width: 22px; height: 22px; }
.k-orange .kpi-icon { background: var(--orange-soft); color: var(--orange); }
.k-green .kpi-icon { background: var(--green-soft); color: var(--green); }
.k-blue .kpi-icon { background: var(--blue-soft); color: var(--blue); }
.k-purple .kpi-icon { background: var(--purple-soft); color: var(--purple); }
.kpi-trend { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.kpi-trend.up { background: var(--green-soft); color: var(--green); }
.kpi-trend.down { background: var(--red-soft); color: var(--red); }
.kpi-trend svg { width: 12px; height: 12px; }
.kpi-label { font-size: 12px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.kpi-value { font-family: 'Poppins'; font-size: 28px; font-weight: 800; color: var(--navy); margin: 4px 0 6px; line-height: 1; }
.kpi-foot { font-size: 11px; color: var(--gray-500); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }
.dash-grid.equal { grid-template-columns: 1fr 1fr; }
.chart-canvas-wrap { padding: 8px; height: 280px; }
.chart-canvas-wrap canvas { max-height: 100%; }
.legend-row { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.legend-row .item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-600); }
.legend-row .dot { width: 10px; height: 10px; border-radius: 3px; }

.tbl-wrap { overflow-x: auto; }
.tbl-wrap::-webkit-scrollbar { height: 8px; }
.tbl-wrap::-webkit-scrollbar-track { background: var(--gray-100); }
.tbl-wrap::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
.tbl { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { text-align: left; padding: 12px 16px; background: var(--gray-50); color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; border-bottom: 1px solid var(--gray-150); border-top: 1px solid var(--gray-150); white-space: nowrap; }
.tbl th:first-child { padding-left: 20px; }
.tbl th:last-child { padding-right: 20px; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--gray-150); color: var(--gray-700); vertical-align: middle; }
.tbl td:first-child { padding-left: 20px; }
.tbl td:last-child { padding-right: 20px; }
.tbl tr:hover td { background: var(--gray-50); }
.tbl .pnr { font-family: 'Poppins'; font-weight: 700; color: var(--navy); }
.tbl .pax { display: flex; align-items: center; gap: 10px; }
.tbl .pax-av { width: 34px; height: 34px; border-radius: 10px; background: var(--gray-100); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.tbl .pax .info .n { font-weight: 600; color: var(--navy); }
.tbl .pax .info .e { font-size: 11px; color: var(--gray-500); }
.tbl code { font-size: 11px; color: var(--gray-600); background: var(--gray-100); padding: 3px 8px; border-radius: 5px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success { background: var(--green-soft); color: var(--green); }
.badge.pending { background: var(--orange-soft); color: var(--orange); }
.badge.failed { background: var(--red-soft); color: var(--red); }
.badge.cancelled { background: var(--gray-150); color: var(--gray-600); }
.badge.processing { background: var(--blue-soft); color: var(--blue); }

.row-action { display: inline-flex; gap: 6px; }
.row-action a, .row-action button { width: 30px; height: 30px; background: var(--gray-50); border: 1px solid var(--gray-150); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--gray-600); transition: all .15s; }
.row-action a:hover, .row-action button:hover { background: var(--orange-soft); color: var(--orange); border-color: rgba(240,131,0,.2); }
.row-action svg { width: 14px; height: 14px; }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--gray-150); background: var(--gray-50); }
.fr-search { flex: 1; min-width: 200px; position: relative; }
.fr-search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; font-size: 13px; }
.fr-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--gray-400); }
.select { padding: 9px 32px 9px 12px; background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; font-size: 13px; color: var(--gray-700); cursor: pointer; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e737a' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; appearance: none; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--gray-150); font-size: 12px; color: var(--gray-500); }
.pgn-buttons { display: flex; gap: 4px; }
.pgn-buttons a, .pgn-buttons span { width: 32px; height: 32px; background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; color: var(--gray-600); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.pgn-buttons .active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pgn-buttons .disabled { opacity: .4; cursor: not-allowed; }

.activity-feed { padding: 6px 20px 14px; }
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-150); }
.activity-item:last-child { border-bottom: none; }
.ai-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-icon svg { width: 16px; height: 16px; }
.ai-icon.success { background: var(--green-soft); color: var(--green); }
.ai-icon.alert { background: var(--red-soft); color: var(--red); }
.ai-icon.info { background: var(--blue-soft); color: var(--blue); }
.ai-icon.warn { background: var(--orange-soft); color: var(--orange); }
.ai-content { flex: 1; min-width: 0; }
.ai-content .t { font-size: 13px; color: var(--navy); font-weight: 600; }
.ai-content .d { font-size: 12px; color: var(--gray-500); margin-top: 2px; line-height: 1.4; }
.ai-content .time { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

.ranked-list { padding: 6px 20px 14px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-150); }
.rank-row:last-child { border-bottom: none; }
.rank-num { width: 26px; height: 26px; background: var(--orange-soft); color: var(--orange); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.rank-row:nth-child(1) .rank-num { background: linear-gradient(135deg, #f59e0b, #f08300); color: #fff; }
.rank-info { flex: 1; min-width: 0; }
.rank-info .city { font-size: 13px; font-weight: 600; color: var(--navy); }
.rank-info .meta { font-size: 11px; color: var(--gray-500); }
.rank-bar { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.rank-bar > div { height: 100%; background: linear-gradient(90deg, var(--orange-light), var(--orange)); border-radius: 3px; }
.rank-pct { font-size: 12px; font-weight: 700; color: var(--navy); white-space: nowrap; }

.modal-bg { position: fixed; inset: 0; background: rgba(13, 22, 38, .55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal-bg.show { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 720px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; animation: modalIn .25s cubic-bezier(.5,1.4,.5,1); }
@keyframes modalIn { from { transform: translateY(20px) scale(.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--gray-150); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-family: 'Poppins'; font-size: 17px; font-weight: 700; color: var(--navy); }
.modal-close { width: 34px; height: 34px; background: var(--gray-100); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--gray-600); border: none; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--gray-150); display: flex; gap: 10px; justify-content: flex-end; background: var(--gray-50); }

.det-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.det-block { padding: 16px; background: var(--gray-50); border-radius: 12px; border: 1px solid var(--gray-150); }
.det-block h5 { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; margin-bottom: 10px; }
.det-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--gray-200); }
.det-row:last-child { border-bottom: none; }
.det-row .k { color: var(--gray-500); }
.det-row .v { font-weight: 600; color: var(--navy); }

.tabs-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-150); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs-bar::-webkit-scrollbar { display: none; }
.tab-btn { padding: 10px 18px; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--gray-500); font-weight: 600; font-size: 13px; white-space: nowrap; transition: all .15s; text-decoration: none; }
.tab-btn:hover { color: var(--gray-700); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }

.toggle { width: 42px; height: 24px; background: var(--gray-300); border-radius: 999px; position: relative; cursor: pointer; transition: all .2s; flex-shrink: 0; border: none; padding: 0; }
.toggle::after { content:''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: all .2s; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.toggle.on { background: var(--orange); }
.toggle.on::after { left: 20px; }
.setting-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--gray-150); }
.setting-row:last-child { border-bottom: none; }
.setting-row .info { flex: 1; }
.setting-row .info .t { font-weight: 600; color: var(--navy); font-size: 14px; }
.setting-row .info .d { font-size: 12px; color: var(--gray-500); margin-top: 4px; line-height: 1.5; max-width: 460px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.pay-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 20px; background: linear-gradient(135deg, #fafbfc 0%, #fff 100%); border-bottom: 1px solid var(--gray-150); }
.ps-mini { background: #fff; border: 1px solid var(--gray-150); border-radius: 12px; padding: 14px; }
.ps-mini .l { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.ps-mini .v { font-family: 'Poppins'; font-size: 20px; font-weight: 800; color: var(--navy); margin-top: 4px; }
.ps-mini .s { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

.support-list { display: flex; flex-direction: column; gap: 0; }
.ticket-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--gray-150); cursor: pointer; transition: background .15s; text-decoration: none; color: inherit; }
.ticket-row:hover { background: var(--gray-50); }
.ticket-row:last-child { border-bottom: none; }
.tr-prio { width: 4px; height: 36px; border-radius: 2px; }
.tr-prio.high { background: var(--red); }
.tr-prio.med { background: var(--orange); }
.tr-prio.low { background: var(--blue); }
.tr-info .subj { font-size: 13px; font-weight: 600; color: var(--navy); }
.tr-info .meta { font-size: 11px; color: var(--gray-500); margin-top: 3px; }
.tr-user { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray-600); }
.tr-user .av { width: 28px; height: 28px; background: var(--gray-100); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: var(--navy); }

.notif-list-admin { display: flex; flex-direction: column; }
.notif-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--gray-150); cursor: pointer; text-decoration: none; color: inherit; }
.notif-row.unread { background: linear-gradient(90deg, rgba(240,131,0,.04), transparent); }
.nr-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nr-icon svg { width: 18px; height: 18px; }
.nr-info { flex: 1; }
.nr-info .t { font-size: 13px; font-weight: 600; color: var(--navy); }
.nr-info .d { font-size: 12px; color: var(--gray-600); margin-top: 3px; line-height: 1.4; }
.nr-time { font-size: 11px; color: var(--gray-400); white-space: nowrap; }

.company-card { background: #fff; border: 1px solid var(--gray-150); border-radius: 14px; padding: 16px; transition: all .15s; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.company-card:hover { box-shadow: var(--shadow); border-color: var(--orange); }
.cc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cc-logo { width: 48px; height: 48px; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: 'Poppins'; font-weight: 800; font-size: 14px; }
.cc-info { flex: 1; min-width: 0; }
.cc-info .n { font-weight: 700; color: var(--navy); font-size: 14px; }
.cc-info .c { font-size: 11px; color: var(--gray-500); }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px dashed var(--gray-150); }
.cc-stat .v { font-family: 'Poppins'; font-weight: 800; color: var(--navy); font-size: 16px; }
.cc-stat .l { font-size: 10px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .3px; }

.empty-state { padding: 60px 20px; text-align: center; }
.empty-state svg { width: 60px; height: 60px; color: var(--gray-300); margin-bottom: 12px; }
.empty-state .t { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.empty-state .d { font-size: 13px; color: var(--gray-500); }

/* Toast */
.toast-stack { position: fixed; top: 90px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); animation: toastIn .3s cubic-bezier(.5,1.4,.5,1); }
@keyframes toastIn { from { transform: translateX(120%); } to { transform: translateX(0); } }
.toast svg { width: 16px; height: 16px; }
.toast.success svg { color: var(--green); }
.toast.error svg { color: var(--red); }
.toast.warning svg { color: var(--orange); }
.toast.info svg { color: var(--blue); }

/* Forms (Django) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: span 2; }
textarea.field-input { min-height: 100px; resize: vertical; }
select.field-input { background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e737a' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; appearance: none; padding-right: 36px; }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.field-help { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.required-mark { color: var(--red); }

/* Responsive */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid.equal { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  #login-screen { flex-direction: column; }
  .login-left { display: none; }
  .login-right { padding: 30px 22px; min-height: 100vh; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-100%); z-index: 90; transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .topbar .menu-toggle { display: flex; }
  .topbar-search { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .det-grid-2 { grid-template-columns: 1fr; }
  .pay-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: span 1; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .topbar { padding: 0 16px; }
}
