/* Same palette as the MTR booking page. */
:root {
  --navy: #00173f;
  --navy-deep: #000d2b;
  --panel: #09111d;
  --panel-2: #0d1625;
  --line: #1d2a3d;
  --gold: #d7a92f;
  --gold-bright: #f0c54b;
  --white: #f7f7f4;
  --muted: #929995;
  --red: #ff6b6b;
  --red-bg: #2a0e12;
  --green: #6fd38a;
  --radius: 15px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--white);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--navy);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: 0.04em; color: var(--gold); }
.brand span { color: var(--white); font-weight: 600; }

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.narrow { max-width: 420px; margin: 40px auto; }

h1 { font-size: 1.4rem; margin: 0 0 8px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; color: var(--gold); }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }

label { display: block; margin: 14px 0 0; font-weight: 600; font-size: 0.9rem; }
input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--white);
  font: inherit;
}
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
input:disabled { color: var(--muted); }

button { font: inherit; cursor: pointer; }
.primary {
  margin-top: 16px;
  padding: 11px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: #111;
  font-weight: 700;
}
.primary:hover:not(:disabled) { background: var(--gold-bright); }
.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.danger { background: var(--red); color: #1a0000; }
.danger:hover:not(:disabled) { background: #ff8a8a; }
.secondary {
  margin-top: 16px;
  margin-left: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
}
.link-button { background: none; border: 0; color: var(--gold); padding: 6px 0; margin-top: 10px; text-decoration: underline; }
.icon-button { background: var(--panel-2); border: 1px solid var(--line); color: var(--white); border-radius: 8px; width: 36px; height: 36px; font-size: 1.2rem; }

.message { min-height: 1.5em; margin: 12px 0 0; }
.message.error { color: var(--red); }
.message.ok { color: var(--green); }

/* Layout */
.grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

/* Calendar */
.calendar { margin-top: 12px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekdays span { text-align: center; font-size: 0.75rem; color: var(--muted); padding-bottom: 4px; }
.day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--white);
  font-size: 0.9rem;
}
.day:disabled { opacity: 0.3; cursor: default; }
.day.empty { visibility: hidden; }
.day.today { border-color: var(--gold); }
.day.full { background: var(--red-bg); border-color: var(--red); }
.day.partial { background: linear-gradient(135deg, var(--red-bg) 50%, var(--panel-2) 50%); border-color: #7a2a33; }
.day.in-range { background: rgba(215, 169, 47, 0.25); border-color: var(--gold); }
.day.range-end { background: var(--gold); color: #111; font-weight: 700; }
.day .dot { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--gold-bright); }
.day.range-end .dot { background: #111; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw-full { background: var(--red-bg); border: 1px solid var(--red); }
.sw-partial { background: linear-gradient(135deg, var(--red-bg) 50%, var(--panel-2) 50%); border: 1px solid #7a2a33; }
.sw-booked { background: var(--gold-bright); border-radius: 50%; }

.selected-range { margin: 18px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-weight: 600; }

/* Review panel */
.review { margin-top: 18px; padding: 16px; border-radius: 12px; border: 1px solid var(--gold); background: var(--panel-2); }
.review.has-conflicts { border-color: var(--red); }
.review h3 { margin: 0 0 6px; font-size: 1rem; }
.warn { color: var(--red); font-weight: 700; }
.conflict {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  background: var(--red-bg);
  border-radius: 6px;
  font-size: 0.9rem;
}
.conflict a { color: var(--gold-bright); }

/* Lists */
.block-list { list-style: none; margin: 0; padding: 0; }
.block-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.block-list li:last-child { border-bottom: 0; }
.block-list .remove { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 4px 10px; height: fit-content; }
.block-list .remove:hover { color: var(--red); border-color: var(--red); }
.item-title { font-weight: 600; }
.detail-item { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--white); }
.detail-item:last-child { border-bottom: 0; }

.test-banner { background: #5a3d00; color: #ffe2a0; text-align: center; padding: 8px 16px; font-weight: 700; font-size: 0.9rem; }
.booking-id { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 6px; background: var(--red); color: #1a0000; font-weight: 800; }

/* ---------- Admin sections (2026-10-04) ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-weight: 700;
}
.tab.active { background: var(--gold); color: #111; border-color: var(--gold); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--red); color: #1a0000; font-size: 0.75rem; line-height: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat.alert { border-color: var(--red); background: var(--red-bg); }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--gold-bright); }
.stat.alert .stat-value { color: var(--red); }
.stat-label { font-weight: 700; margin-top: 2px; }
.stat-sub { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }

.chart svg { width: 100%; height: auto; display: block; }
.bar-visits { fill: rgba(215, 169, 47, 0.35); }
.bar-leads { fill: #6fb7ff; }
.bar-bookings { fill: var(--green); }
.axis { fill: var(--muted); font-size: 11px; }
.axis-line { stroke: var(--line); }
.sw-visits { background: rgba(215, 169, 47, 0.35); }
.sw-leads { background: #6fb7ff; }
.sw-bookings { background: var(--green); }

.meter { height: 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 10px; }
.meter span { display: block; height: 100%; background: var(--green); }
.meter.warn span { background: var(--gold); }
.meter.danger span { background: var(--red); }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { padding: 8px 12px; background: var(--panel-2); color: var(--muted); border: 0; border-right: 1px solid var(--line); font-weight: 600; }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--gold); color: #111; }

.item-list { margin-top: 10px; }
.item { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item-main { min-width: 0; flex: 1; }
.item-main a { color: var(--gold-bright); }
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.item-amount { font-weight: 800; font-size: 1.1rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.small-btn { margin: 0 !important; padding: 7px 12px !important; font-size: 0.85rem; }
.danger-text { color: var(--red) !important; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }
.pill.ok { color: var(--green); border-color: rgba(111, 211, 138, 0.5); }
.pill.warn { color: var(--gold-bright); border-color: rgba(240, 197, 75, 0.5); }
.pill.danger { color: var(--red); border-color: var(--red); }
details summary { cursor: pointer; color: var(--gold); margin-top: 4px; }
.editing-banner { margin: 18px 0 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--gold); color: var(--gold-bright); font-weight: 600; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 0.85rem; word-break: break-all; }
.narrow-left { max-width: 520px; }
.block-list .edit:hover { color: var(--gold); border-color: var(--gold); }
@media (max-width: 640px) {
  .item { flex-direction: column; }
  .item-side { align-items: flex-start; text-align: left; }
  .row-actions { justify-content: flex-start; }
  .tab { flex: 1 1 30%; padding: 9px 8px; font-size: 0.85rem; }
}

select { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--white); font: inherit; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
label.check input { width: auto; margin: 0; }
a.small-btn { display: inline-block; text-decoration: none; }

/* cleaner portal (2026-10-08) */
.job-line { margin-top:6px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.job-line select { padding:4px 8px; border-radius:8px; }
.photo-strip { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.photo-strip a { display:flex; flex-direction:column; align-items:center; font-size:11px; text-decoration:none; }
.photo-strip img { width:96px; height:96px; object-fit:cover; border-radius:8px; }
.link-box { width:100%; margin-top:6px; font-size:12px; }
.inline-form { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.ok-pill { background:#123a22; color:#3fb950; } .warn-pill { background:#3a2f10; color:#e3b341; }
/* Team tab (2026-10-09) */
.team-h2 { margin-top: 22px; }
.stack-form { display: grid; gap: 10px; max-width: 460px; }
.pw-row { display: flex; gap: 8px; align-items: center; } .pw-row input { flex: 1; }
.item.faded { opacity: .55; }
#job-view { margin: 4px 0 12px; }
.practice-pill { background: #2a1f3d; color: #c4a7ff; }
.job-detail { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.job-detail h3 { font-size: 13px; margin: 12px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.check-list { list-style: none; padding: 0; margin: 0; font-size: 13px; } .check-list li { padding: 2px 0; }
.check-list .yes { color: #3fb950; } .check-list .no { color: var(--muted); }
.activity-list { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.activity-list li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.act-row { display: grid; grid-template-columns: 130px 140px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.act-time { color: var(--muted); white-space: nowrap; } .act-who { font-weight: 600; }
.act-done { color: #3fb950; } .act-login_failed, .act-removed { color: #f85149; } .act-photo { color: #8ab4ff; }
@media (max-width: 640px) { .act-row { grid-template-columns: 1fr; gap: 2px; } }
.inline-label { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 8px; }
#checklist-text { width: 100%; font: inherit; margin-bottom: 10px; }
.howto { padding-left: 18px; margin: 0; } .howto li { margin: 6px 0; }
.big-link { display: inline-block; margin-top: 10px; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; }
#practice-who { width: 100%; margin: 6px 0 10px; }
textarea.link-box { background: var(--panel-2); color: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-family: ui-monospace, monospace; }
.job-item .row-actions { align-self: flex-start; }
.pay-ok { color: #3fb950; }

/* 2026-10-15 How people find MTR (SEO + GEO) */
.sample-flag { display:inline-block; margin:6px 0 0; padding:6px 12px; border-radius:8px; background:rgba(201,162,74,.15); color:#e7cf8f; font-size:13px; }
.stat-grid .stat { display:flex; flex-direction:column; gap:4px; }
.stat-label { font-size:13px; color:#a9b4c8; } .stat strong { font-size:26px; }
.seo-table { width:100%; border-collapse:collapse; font-size:14px; margin:8px 0 12px; }
.seo-table th, .seo-table td { text-align:left; padding:8px 6px; border-bottom:1px solid rgba(255,255,255,.08); }
.seo-table th { color:#a9b4c8; font-weight:600; } .seo-table td:nth-child(n+2), .seo-table th:nth-child(n+2) { text-align:right; }
.check-list { list-style:none; margin:8px 0; padding:0; } .check-list li { display:flex; gap:10px; align-items:center; margin:7px 0; font-size:14.5px; }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; flex:none; }
.dot.done { background:#4caf7a; } .dot.wait { background:#c9a24a; } .dot.todo { background:#5b6b86; } .dot.no { background:#c25b5b; }

/* 2026-10-15 Dashboard Simple / Full switch */
.view-switch { display:inline-flex; gap:0; margin:0 0 14px; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.view-switch .vs { font:inherit; font-weight:700; font-size:14px; padding:8px 16px; background:transparent; color:#a9b4c8; border:0; cursor:pointer; }
.view-switch .vs.active { background:#c9a24a; color:#111; }
.cf-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:12px 0 16px; }
.cf { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; font-size:12px; color:#a9b4c8; }
.cf b { font-size:18px; color:#fff; margin:2px 0; } .cf i { font-style:normal; font-size:11px; }
@media (max-width:800px) { .cf-grid { grid-template-columns:1fr 1fr; } }

/* 2026-11-04 secretary chat panel + requests tab */
.sec-fab { position: fixed; right: 18px; bottom: 18px; z-index: 30; background: var(--gold); color: #1a1200; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.sec-panel { position: fixed; right: 18px; bottom: 18px; z-index: 31; width: min(380px, calc(100vw - 24px)); height: min(520px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--gold); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.sec-panel[hidden] { display: none; }
.sec-panel header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--gold-bright); }
.sec-panel header button { background: none; border: 0; color: var(--white); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.sec-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sec-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; white-space: pre-wrap; }
.sec-msg.bot { background: var(--panel-2); border: 1px solid var(--line); align-self: flex-start; }
.sec-msg.me { background: var(--navy); border: 1px solid var(--gold); align-self: flex-end; }
#sec-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
#sec-form textarea { flex: 1; resize: none; background: var(--panel-2); color: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
.req { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.req .st { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; margin-right: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.req .st.approved, .req .st.done { color: var(--green); border-color: var(--green); }
.req .st.declined { color: var(--red); border-color: var(--red); }
.req .st.new { color: var(--gold-bright); border-color: var(--gold); }
.req .own { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
