:root{
  --ts-teal:#007a76;
  --ts-teal-2:#0b8d88;
  --ts-teal-soft:#eaf5f2;
  --ts-teal-soft-2:#dcefeb;
  --ts-ink:#102a36;
  --ts-muted:#71878f;
  --ts-line:#dbe7e9;
  --ts-bg:#eef4f6;
  --ts-card:#ffffff;
  --ts-amber:#f7bf36;
  --ts-amber-soft:#fff7df;
  --ts-red:#ef6674;
  --ts-red-soft:#fff0f2;
  --ts-green:#2cb67d;
  --ts-green-soft:#ebf8f1;
  --shadow:0 8px 24px rgba(23,54,67,.06);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ts-ink);background:var(--ts-bg);font-size:13px}
body{background:linear-gradient(90deg,#f8faf9 0,#eef4f6 9%,#edf4f6 100%)}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button{cursor:pointer}
.app{min-height:100vh;display:grid;grid-template-columns:42px 1fr}
.rail{position:fixed;inset:0 auto 0 0;width:42px;background:rgba(255,255,255,.97);border-right:1px solid #edf2f2;display:flex;flex-direction:column;align-items:center;z-index:30;padding:11px 6px 12px;gap:11px}
.brand{width:28px;height:28px;border-radius:50%;overflow:hidden;margin-bottom:4px;box-shadow:0 0 0 1px #e7efef}
.brand img{width:100%;height:100%;object-fit:cover}
.rail-link{width:28px;height:28px;border:1px solid var(--ts-line);border-radius:7px;display:grid;place-items:center;color:#78939a;background:#fff;transition:.16s ease;position:relative}
.rail-link:hover{border-color:#b8d5d4;color:var(--ts-teal)}
.rail-link.active{background:var(--ts-teal);color:#fff;border-color:var(--ts-teal);box-shadow:0 5px 14px rgba(0,122,118,.17)}
.rail-link .tip{display:none;position:absolute;left:36px;top:50%;transform:translateY(-50%);background:#17343f;color:white;font-size:9px;padding:5px 7px;border-radius:5px;white-space:nowrap;box-shadow:0 6px 18px rgba(0,0,0,.12)}
.rail-link:hover .tip{display:block}
.rail-bottom{margin-top:auto}
.ico{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.shell{grid-column:2;padding:11px 16px 30px 18px;min-width:0}
.topbar{height:37px;display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-bottom:12px}
.top-pill{height:31px;border:1px solid var(--ts-line);background:#fff;border-radius:8px;padding:0 10px;display:flex;align-items:center;gap:7px;box-shadow:0 3px 9px rgba(18,45,54,.04);color:#405962;font-size:12px;font-weight:600}
.top-pill .dot{width:7px;height:7px;border-radius:50%;background:#40c78b;box-shadow:0 0 0 4px #edf9f3}
.avatar{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#1f3945;color:white;font-size:11px;font-weight:700}
.user-pill{padding:2px 9px 2px 4px;gap:7px}
.user-meta{line-height:1.05}.user-meta b{display:block;font-size:11px}.user-meta span{font-size:9px;color:#8aa0a7;font-weight:500}
.head{display:flex;justify-content:space-between;align-items:flex-start;margin:0 0 12px 1px;gap:18px}
.eyebrow{font-size:9px;letter-spacing:.12em;color:var(--ts-teal);font-weight:800;text-transform:uppercase;margin-bottom:4px}
h1{font-size:20px;line-height:1.06;margin:0 0 5px;font-weight:800;letter-spacing:-.025em}
.sub{color:#748991;font-size:11px;max-width:760px;line-height:1.45}
.btn{height:34px;border-radius:8px;border:1px solid var(--ts-line);background:#fff;color:#39545e;padding:0 11px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:10px;font-weight:800;box-shadow:0 3px 9px rgba(18,45,54,.04)}
.btn:hover{border-color:#aacdca;color:var(--ts-teal)}
.btn-primary{background:var(--ts-teal);border-color:var(--ts-teal);color:#fff;box-shadow:0 6px 16px rgba(0,122,118,.16)}
.btn-primary:hover{background:#096d69;color:#fff}
.btn-ghost{background:transparent;box-shadow:none}
.btn-small{height:28px;padding:0 8px;font-size:9px}
.head-actions{display:flex;gap:7px}
.grid{display:grid;gap:10px}.kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:10px}
.card{background:rgba(255,255,255,.96);border:1px solid var(--ts-line);border-radius:10px;box-shadow:var(--shadow)}
.kpi{padding:11px 12px;min-height:92px;display:flex;flex-direction:column;justify-content:space-between}
.kpi-top{display:flex;align-items:center;justify-content:space-between;color:#6f858e;font-size:9px;font-weight:800}
.kpi-icon{width:26px;height:26px;border-radius:7px;display:grid;place-items:center;background:var(--ts-teal-soft);color:var(--ts-teal)}
.kpi-value{font-size:23px;line-height:1;font-weight:800;letter-spacing:-.03em;color:#17343f}
.kpi-note{font-size:8.5px;color:#8aa0a7;display:flex;align-items:center;gap:5px}.kpi-note strong{color:#4b6a72}
.content-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(285px,.72fr);gap:10px;align-items:start}
.section-head{padding:10px 12px 8px;border-bottom:1px solid #edf1f1;display:flex;align-items:center;justify-content:space-between;gap:10px}
.section-title-wrap{display:flex;align-items:center;gap:8px}.section-title{font-size:11px;font-weight:800}.section-note{font-size:8.5px;color:#8ea0a5;margin-top:1px}
.section-icon{width:25px;height:25px;border-radius:7px;background:var(--ts-teal-soft);color:var(--ts-teal);display:grid;place-items:center}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:780px}
th,td{padding:9px 10px;border-bottom:1px solid #edf1f1;text-align:left;vertical-align:middle}
th{font-size:8px;text-transform:uppercase;letter-spacing:.04em;color:#8ca0a6;font-weight:800;background:#fbfcfc}
td{font-size:9.5px;color:#34515b}
tr:last-child td{border-bottom:0}.row-main{font-weight:800;color:#1c3a44}.row-sub{font-size:8px;color:#91a1a6;margin-top:2px}
.flight-chip{display:inline-flex;align-items:center;gap:6px;font-weight:800}.airline-badge{width:24px;height:24px;border-radius:6px;background:#eef4f4;color:#17343f;display:grid;place-items:center;font-size:8px;border:1px solid #e0eaea}
.status{display:inline-flex;align-items:center;gap:5px;border-radius:10px;padding:3px 7px;font-size:8px;font-weight:800;border:1px solid transparent;white-space:nowrap}.status:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.status-green{background:var(--ts-green-soft);border-color:#d5efe2;color:#2d8e65}.status-amber{background:var(--ts-amber-soft);border-color:#f3e0aa;color:#9a7414}.status-red{background:var(--ts-red-soft);border-color:#f6d8de;color:#b44e5a}.status-teal{background:var(--ts-teal-soft);border-color:#d1ebe6;color:#277d78}.status-grey{background:#f2f5f5;border-color:#e5ecec;color:#748a91}
.mini-progress{height:5px;border-radius:5px;background:#edf2f2;overflow:hidden;width:80px}.mini-progress span{display:block;height:100%;border-radius:5px;background:var(--ts-teal)}
.link-btn{border:0;background:transparent;color:var(--ts-teal);font-size:8.5px;font-weight:800;padding:4px 0}
.link-btn:hover{text-decoration:underline}
.side-stack{display:flex;flex-direction:column;gap:10px}.summary-list{padding:6px 11px 9px}.summary-row{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid #edf1f1}.summary-row:last-child{border-bottom:0}.summary-ico{width:24px;height:24px;border-radius:7px;background:#f3f8f7;color:var(--ts-teal);display:grid;place-items:center}.summary-label{font-size:8px;color:#83979d}.summary-value{font-size:10px;font-weight:800;color:#29444f;text-align:right}.summary-value small{display:block;font-size:7.5px;color:#98a8ad;font-weight:500;margin-top:1px}
.alerts{padding:5px 10px 9px}.alert{display:grid;grid-template-columns:28px 1fr auto;gap:8px;align-items:start;padding:9px 1px;border-bottom:1px solid #edf1f1}.alert:last-child{border-bottom:0}.alert-icon{width:26px;height:26px;border-radius:7px;background:var(--ts-amber-soft);color:#ad7c12;display:grid;place-items:center}.alert.alert-red .alert-icon{background:var(--ts-red-soft);color:#b44e5a}.alert-title{font-size:9px;font-weight:800;color:#2d4953}.alert-copy{font-size:8px;color:#8b9ea4;line-height:1.35;margin-top:2px}.alert-time{font-size:7.5px;color:#a0adb1;white-space:nowrap}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px}.quick{border:1px solid #dde8e9;border-radius:8px;background:#fbfcfc;min-height:60px;padding:9px;display:flex;flex-direction:column;justify-content:space-between}.quick:hover{border-color:#a6cfcb;background:#f8fbfa}.quick b{font-size:9px}.quick span{font-size:7.5px;color:#92a4a9}.quick .q-ico{color:var(--ts-teal)}
.filters{display:flex;gap:6px;align-items:center}.filter{height:28px;border:1px solid #dce6e7;border-radius:7px;background:#fff;color:#567078;font-size:8.5px;padding:0 8px}
.footer-note{margin-top:10px;color:#93a4a9;font-size:8px;text-align:right}
.dialog-backdrop{position:fixed;inset:0;background:rgba(15,42,54,.26);z-index:60;display:none;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(1px)}.dialog-backdrop.open{display:flex}.dialog{width:min(620px,96vw);max-height:90vh;overflow:auto;background:white;border:1px solid #d9e6e7;border-radius:12px;box-shadow:0 24px 70px rgba(18,45,54,.18)}.dialog-head{padding:12px 13px;border-bottom:1px solid #edf1f1;display:flex;justify-content:space-between;align-items:flex-start}.dialog-head b{font-size:12px}.dialog-head span{font-size:8.5px;color:#8ea1a6}.dialog-close{width:26px;height:26px;border-radius:7px;border:1px solid var(--ts-line);background:#fff;color:#738b92}.dialog-body{padding:12px}.dialog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.field label{display:block;font-size:8px;color:#748a92;margin:0 0 4px;font-weight:700}.control{height:36px;border:1px solid #d8e3e4;border-radius:7px;background:#fff;display:flex;align-items:center;padding:0 9px;gap:7px;color:#29444f;font-size:11px;min-width:0}.control input,.control select{border:0;outline:0;background:transparent;width:100%;color:#1c3742;font-size:11px}.dialog-actions{padding:10px 12px;border-top:1px solid #edf1f1;display:flex;justify-content:flex-end;gap:7px}.summary-box{border:1px solid #dfe9ea;background:#fbfcfc;border-radius:8px;padding:10px;margin-bottom:8px}.summary-box h3{font-size:10px;margin:0 0 7px}.kv{display:grid;grid-template-columns:1fr auto;gap:10px;padding:5px 0;border-bottom:1px solid #edf1f1;font-size:8.5px}.kv:last-child{border-bottom:0}.kv span{color:#84989e}.kv b{font-size:9px}
.popup-page{min-height:100vh;display:grid;place-items:center;padding:24px}.popup-page .dialog{display:block;width:min(680px,96vw)}
@media(max-width:1050px){.kpis{grid-template-columns:repeat(2,1fr)}.content-grid{grid-template-columns:1fr}.side-stack{display:grid;grid-template-columns:1fr 1fr}.hide-md{display:none}}
@media(max-width:720px){.app{grid-template-columns:1fr}.rail{display:none}.shell{grid-column:1;padding:12px}.head{flex-direction:column}.head-actions{width:100%}.head-actions .btn{flex:1}.kpis{grid-template-columns:1fr 1fr}.side-stack{display:flex}.topbar{justify-content:flex-start;overflow:auto}.hide-sm{display:none}.dialog-grid{grid-template-columns:1fr}.filters{display:none}}

/* FlightServe API-based frontend additions */
[data-loading="true"]{opacity:.55;pointer-events:none}
.bc-status{display:inline-flex;align-items:center;gap:5px;font-size:7.5px;color:#8aa0a7}
.bc-status:before{content:"";width:5px;height:5px;border-radius:50%;background:#9babb0}
.bc-status.ready:before{background:var(--ts-green)}
.bc-status.warn:before{background:var(--ts-amber)}
.api-error{display:none;margin:0 0 10px;padding:9px 11px;border:1px solid #f2ced4;border-radius:8px;background:var(--ts-red-soft);color:#9f4250;font-size:9px}.api-error.open{display:block}
.skeleton{position:relative;overflow:hidden;background:#eef3f3!important;color:transparent!important;border-radius:5px;min-width:34px}.skeleton:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent);animation:fs-shimmer 1.25s infinite}@keyframes fs-shimmer{to{transform:translateX(100%)}}
.empty-state{padding:20px;text-align:center;color:#8ca0a6;font-size:9px}
.demo-accounts{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.demo-account{border:1px solid #dce7e8;background:#fbfcfc;border-radius:8px;padding:8px;text-align:left;color:#45606a}.demo-account:hover{border-color:#a9cfcc;background:#f7fbfa}.demo-account b{display:block;font-size:9px}.demo-account span{display:block;font-size:7.5px;color:#8ca0a6;margin-top:2px}
@media(max-width:560px){.demo-accounts{grid-template-columns:1fr}}
