/* FlexyStaff web dashboard - the app's look: dark navy, gold accents, Flexy Blue links. */
:root {
  --ink: #0A0E14; --surface: #121821; --surface-alt: #1A2230; --input: #141A24; --line: #263041; --line-strong: #334055;
  --blue: #0E75BC; --sky: #4DA8EA; --sky-soft: #7CC0F2; --gold: #C5A46D; --gold-light: #E4CFA3; --gold-deep: #9A7B45; --on-gold: #1B1405;
  --text: #F4F1EA; --text-soft: #C9CFD8; --text-muted: #A3ACBA; --text-dim: #8A94A3; --placeholder: #6B7585;
  --danger: #E5484D; --danger-soft: rgba(229,72,77,.16); --ok: #34C77B; --orange: #F5A524;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px;
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--text); font-family: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.ico { width: 18px; height: 18px; vertical-align: -3px; flex: 0 0 auto; }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: 0 0 var(--side); background: #0D121A; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; color: #fff; font-weight: 900; font-style: italic; font-size: 22px; letter-spacing: -.4px; }
.brand .dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--blue); box-shadow: inset 0 0 0 3px var(--gold); }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md); color: var(--text-soft); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.nav a:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.nav a.on { background: var(--surface-alt); color: var(--gold-light); box-shadow: inset 3px 0 0 var(--gold); }
.nav .ico { width: 20px; height: 20px; flex: 0 0 20px; }
.nav .badge { margin-left: auto; background: var(--gold); color: var(--on-gold); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 7px; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-dim); }
.side-foot .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text); font-weight: 600; }
.main { flex: 1; min-width: 0; }
.page { max-width: 1080px; margin: 0 auto; padding: 28px 28px 80px; }
.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 20; background: rgba(10,14,20,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; font-size: 19px; }
  .page { padding: 18px 16px 110px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #0D121A; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--text-dim); padding: 6px 0; border-radius: 12px; }
  .tabbar a.on { color: var(--gold-light); }
  .tabbar a.hi { color: var(--on-gold); background: var(--gold); margin: 0 4px; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ico { width: 22px; height: 22px; }
}

/* ---------- type ---------- */
h1, .h1 { font-size: 30px; font-weight: 800; font-style: italic; letter-spacing: -.5px; margin: 0 0 6px; line-height: 1.15; }
h2, .h2 { font-size: 21px; font-weight: 800; font-style: italic; margin: 0 0 12px; }
h3, .h3 { font-size: 17px; font-weight: 700; margin: 0; }
.label { font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-muted); }
.lead { color: var(--text-soft); font-size: 16px; line-height: 1.55; margin: 0 0 22px; }
.small { font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.gold { color: var(--gold-light); }
.money { color: var(--gold-light); font-weight: 800; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .lead { margin: 0; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; }
.card.gold { border-color: var(--gold-deep); background: linear-gradient(180deg, #17150F, var(--surface)); }
.card.tight { padding: 14px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; color: var(--gold); flex: 0 0 38px; }
.card-head .ic .ico { width: 20px; height: 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2, .g3 { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--gold-light); margin-top: 6px; }
.stat span { color: var(--text-muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.divider { border-top: 1px solid var(--line); margin: 14px 0; }
.hero { position: relative; border-radius: var(--r-xl); overflow: hidden; padding: 26px; margin-bottom: 20px; background: radial-gradient(120% 140% at 100% 0%, rgba(14,117,188,.35), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(197,164,109,.22), transparent 60%), var(--surface); border: 1px solid var(--line); }
.hero h1 { font-size: 32px; }

/* ---------- list rows ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 16px; }
.item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--text); }
.item:first-child { border-top: 0; }
a.item:hover { background: #151C27; text-decoration: none; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-alt); flex: 0 0 52px; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--surface-alt); flex: 0 0 46px; border: 2px solid var(--gold-deep); }
.avatar.lg { width: 64px; height: 64px; flex-basis: 64px; }
.chev { color: var(--text-dim); width: 18px; height: 18px; flex: 0 0 18px; }
.empty { text-align: center; padding: 34px 18px; color: var(--text-muted); }
.empty .ico { width: 34px; height: 34px; color: var(--text-dim); margin-bottom: 8px; }

/* ---------- pills, tabs, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; background: rgba(197,164,109,.16); color: var(--gold-light); white-space: nowrap; }
.pill.blue { background: rgba(14,117,188,.2); color: var(--sky-soft); }
.pill.grey { background: var(--surface-alt); color: var(--text-soft); }
.pill.green { background: rgba(52,199,123,.16); color: #7EE2AC; }
.pill.red { background: var(--danger-soft); color: #FF8A8D; }
.pill.orange { background: rgba(245,165,36,.16); color: #FFC56A; }
.pill.solid { background: var(--gold); color: var(--on-gold); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { border: 1px solid var(--line-strong); background: transparent; color: var(--text-soft); border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 14px; }
.tab.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.chip { display: inline-block; border: 1px solid var(--line-strong); background: var(--surface-alt); color: var(--text-soft); border-radius: 999px; padding: 6px 12px; margin: 0 6px 6px 0; font-size: 13px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-md); padding: 13px 20px; font-weight: 800; font-size: 15px; cursor: pointer; background: var(--gold); color: var(--on-gold); text-decoration: none; transition: transform .05s, opacity .15s; }
.btn:hover { text-decoration: none; opacity: .93; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.outline { background: transparent; color: var(--sky); border: 1px solid var(--sky); }
.btn.ghost { background: var(--surface-alt); color: var(--text); }
.btn.danger { background: transparent; color: #FF8A8D; border: 1px solid var(--danger); }
.btn.sm { padding: 9px 14px; font-size: 14px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--sky); font-weight: 700; cursor: pointer; }
.link.red { color: #FF8A8D; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-soft); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.field .err { font-size: 13px; color: #FF8A8D; margin-top: 6px; }
.input, select.input, textarea.input { width: 100%; background: var(--input); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 14px; color: var(--text); outline: none; font-size: 15px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,164,109,.18); }
.input::placeholder { color: var(--placeholder); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
input[type="date"].input, input[type="time"].input { color-scheme: dark; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-child { border-top: 0; }
.switch { position: relative; width: 46px; height: 28px; flex: 0 0 46px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(18px); }
.date-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 560px) { .date-row { grid-template-columns: 1fr 1fr; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; } .date-row input[type=date] { grid-column: span 2; } .date-row .x { grid-column: span 2; } .date-head { display: none !important; } }

/* ---------- code, timeline, misc ---------- */
.code { font-size: 40px; font-weight: 900; letter-spacing: 12px; color: var(--sky); background: var(--ink); border: 1px solid var(--sky); border-radius: var(--r-md); padding: 14px 18px 14px 30px; display: inline-block; font-variant-numeric: tabular-nums; }
.roster .r { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.roster .r:first-child { border-top: 0; }
.lines .l { display: flex; justify-content: space-between; padding: 7px 0; color: var(--text-soft); }
.lines .l.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--text); font-weight: 800; font-size: 18px; }
.traffic { display: flex; gap: 8px; margin: 10px 0 4px; }
.traffic i { width: 14px; height: 14px; border-radius: 50%; background: var(--line-strong); display: block; }
.progress { height: 7px; border-radius: 4px; background: var(--surface-alt); overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 7px; background: var(--gold); }
.notice { display: flex; gap: 12px; background: rgba(197,164,109,.1); border: 1px solid var(--gold-deep); border-radius: var(--r-md); padding: 14px; margin-bottom: 16px; color: var(--text-soft); }
.notice.blue { background: rgba(14,117,188,.12); border-color: var(--blue); }
.notice.red { background: var(--danger-soft); border-color: var(--danger); }
.notice .ico { width: 20px; height: 20px; flex: 0 0 20px; color: var(--gold-light); margin-top: 1px; }
.app-cta { display: flex; align-items: center; gap: 14px; background: linear-gradient(90deg, rgba(14,117,188,.25), rgba(197,164,109,.18)); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.app-cta .grow { flex: 1; }
.stars { color: var(--gold); letter-spacing: 1px; }
.pay-box { background: #fff; color: #111; border-radius: var(--r-md); padding: 16px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(80% 60% at 100% 0%, rgba(14,117,188,.28), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(197,164,109,.18), transparent 60%), var(--ink); }
.auth-card { width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; }
.auth-card .brand { padding: 0 0 18px; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1F2836; border: 1px solid var(--line-strong); color: var(--text); padding: 12px 18px; border-radius: 12px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 32px); font-weight: 600; }
.toast.err { border-color: var(--danger); }
@media (max-width: 900px) { .toast { bottom: 96px; } }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-xl); padding: 22px; }
.loading-row { display: flex; justify-content: center; padding: 30px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
