/*
 * Ookkee Match. Ookkee house style: slate does the heavy lifting, one green
 * accent per view, Century Gothic, lower-case titles, generous space.
 */

:root {
  --slate: #3c566f;
  --slate-deep: #2f4458;
  --green: #01d639;
  --green-dark: #00a82d;
  --sky: #a9d2de;
  --mauve: #bb6daa;
  --ink: #22323f;
  --grey: #5a6b7b;
  --mist: #eaf1f4;
  --line: #d6dee4;
  --white: #ffffff;
  --bad: #b3261e;
  --bad-bg: #fbeaea;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --ok: #0b6b2c;
  --ok-bg: #e6f7ec;
  --radius: 10px;
  --font: "Century Gothic", CenturyGothic, "Questrial", "Poppins", "Avenir Next", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 700; color: var(--slate); margin: 0; line-height: 1.2; }
p { margin: 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }
.muted { color: var(--grey); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.booting { padding: 32px; color: var(--grey); }

/* ---- controls ---- */

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input:not([type]), select {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 2px;
}
input.code { font-family: ui-monospace, Menlo, monospace; font-size: 24px; letter-spacing: 0.4em; text-align: center; }

.reveal-wrap { position: relative; }
.reveal-wrap input { padding-right: 70px; }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: 13px; color: var(--slate); background: none; border: 0;
  padding: 6px 10px; cursor: pointer; border-radius: 6px;
}
.reveal:hover { background: var(--mist); }

.btn {
  font: inherit; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--white); color: var(--slate); cursor: pointer;
}
.btn:hover { background: var(--mist); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--slate); border-color: var(--slate); color: var(--white); }
.btn-primary:hover { background: var(--slate-deep); }
.btn-quiet { border-color: transparent; color: var(--grey); }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

.link {
  font: inherit; font-size: 14px; background: none; border: 0; padding: 4px 0;
  color: var(--slate); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  align-self: flex-start;
}
.link-light { color: var(--sky); }

.check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; white-space: nowrap; }

.banner { border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.banner-error { background: var(--bad-bg); color: var(--bad); }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.banner-ok { background: var(--ok-bg); color: var(--ok); }

.chip {
  display: inline-block; font-size: 12px; font-weight: 700; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; background: var(--mist); color: var(--grey);
}
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }

/* ---- split-screen sign-in ---- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }

.split-brand {
  position: relative; overflow: hidden;
  background: var(--slate); color: var(--white);
  padding: 48px 56px;
  display: flex; flex-direction: column;
}
.split-logo { width: 190px; }
.split-stripe { width: 120px; height: 5px; background: var(--green); margin-top: 28px; border-radius: 3px; }
.split-hero { margin-top: auto; margin-bottom: auto; max-width: 480px; }
.split-title { color: var(--white); font-weight: 400; font-size: 56px; letter-spacing: -0.5px; }
.split-title strong { font-weight: 700; }
.split-sub { margin-top: 12px; font-size: 18px; color: var(--mist); }
.split-points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.split-points li { position: relative; padding-left: 26px; color: var(--sky); }
.split-points li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--green);
}
.split-tagline { font-size: 13px; color: var(--sky); max-width: 70%; }
.split-eyes { position: absolute; right: 48px; bottom: -14px; width: 56px; }

.split-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; background: var(--white);
}
.split-logo-small { display: none; width: 150px; margin-bottom: 32px; }
.split-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.split-card h2 { font-size: 30px; }

.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink); }
.qr { align-self: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.qr img { width: 180px; height: 180px; }
.manual summary { cursor: pointer; color: var(--slate); font-size: 14px; }
.manual code { display: block; margin-top: 8px; padding: 10px; background: var(--mist); border-radius: 6px; word-break: break-all; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-brand { display: none; }
  .split-logo-small { display: block; }
  .split-panel { justify-content: flex-start; padding: 40px 16px; }
}

/* ---- app shell ---- */

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--slate); color: var(--white);
  padding: 28px 18px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { width: 130px; margin-left: 8px; }
.sidebar-product { margin: 2px 0 0 10px; font-size: 20px; font-weight: 700; color: var(--green); letter-spacing: 0.5px; }
.sidebar-practice { margin: 14px 8px 8px; font-size: 13px; color: var(--sky); }
.practice-switch { margin: 14px 0 8px; background: var(--slate-deep); color: var(--white); border-color: transparent; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav a {
  color: var(--mist); text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 14px;
  border-left: 3px solid transparent;
}
.nav a:hover { background: var(--slate-deep); color: var(--white); }
.nav a.active { background: var(--slate-deep); color: var(--white); font-weight: 700; border-left-color: var(--green); }

.sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.15); display: grid; gap: 6px; }
.who { display: grid; font-size: 13px; }
.who span { color: var(--sky); }

.main { padding: 36px 40px 64px; background: var(--mist); min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; }
.page-head p { margin-top: 4px; }

.card { background: var(--white); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; }
.card-head input[type="search"] { width: 240px; }
.card-soon { border-top: 3px solid var(--green); }
.card-soon .chip { align-self: flex-start; }

.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.4em; width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid var(--slate);
}

/* ---- clients ---- */

.client-list { display: flex; flex-direction: column; }
.client { border-top: 1px solid var(--line); }
.client:first-child { border-top: 0; }
.client-line { display: flex; align-items: center; gap: 14px; padding: 12px 0; flex-wrap: wrap; }
.client-name { flex: 1; min-width: 160px; font-weight: 700; }
.client-detail { padding: 4px 0 20px 58px; max-width: 620px; }
.empty { padding: 16px 0; }

.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch-ui { width: 42px; height: 24px; border-radius: 12px; background: var(--line); transition: background 0.15s; position: relative; }
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--white); transition: transform 0.15s;
}
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--slate); outline-offset: 2px; }

/* ---- tables ---- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--grey); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table select, .table input { min-height: 36px; padding: 6px 10px; }
.table input[type="number"] { width: 130px; }
.table select { min-width: 130px; }
select.fit { width: auto; min-width: 260px; }
.table .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.row-off td { color: var(--grey); }

.roles, .facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.roles dt, .facts dt { font-weight: 700; color: var(--slate); }
.roles dd, .facts dd { margin: 0; }

.dialog {
  border: 0; border-radius: var(--radius); padding: 28px; width: min(460px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(34, 50, 63, 0.25);
}
.dialog::backdrop { background: rgba(34, 50, 63, 0.45); }
.dialog h2 { font-size: 22px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin-top: 8px; }
  .main { padding: 20px 16px 48px; }
  .client-detail { padding-left: 0; }
  .card-head input[type="search"] { width: 100%; }
}
