/* DBM Practice Command Centre: shared styles.
   Every app can link this file so the header, buttons and forms match.
   Colours: if the Hiring Hub and Performance Hub use slightly different DBM
   orange and gold values, copy theirs into the variables below. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@600;700&family=Figtree:wght@400;500;600&display=swap");

:root {
  --bg: #f6f3ee;
  --card: #ffffff;
  --ink: #1f2a44;
  --muted: #667085;
  --line: #e6e0d6;
  --accent: #d9673f;
  --gold: #e9a23b;
  --accent-ink: #ffffff;
  --accent-soft: #fbeee7;
  --ok: #2f7d5b;
  --ok-soft: #e7f3ec;
  --warn: #9a6400;
  --warn-soft: #fdf3dc;
  --locked: #eeebe6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 14px;
  --grad: linear-gradient(135deg, var(--accent), var(--gold));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181f; --card: #1c222c; --ink: #eef0f4; --muted: #9aa3b2; --line: #2c3340;
    --accent: #ec8460; --gold: #f0b459; --accent-soft: #3a2820; --ok: #5cc092; --ok-soft: #1d3329;
    --warn: #f0c25a; --warn-soft: #3a3020; --locked: #232933; --danger: #f97066; --danger-soft: #3a2020;
  }
}
:root[data-theme="dark"] {
  --bg: #14181f; --card: #1c222c; --ink: #eef0f4; --muted: #9aa3b2; --line: #2c3340;
  --accent: #ec8460; --gold: #f0b459; --accent-soft: #3a2820; --ok: #5cc092; --ok-soft: #1d3329;
  --warn: #f0c25a; --warn-soft: #3a3020; --locked: #232933; --danger: #f97066; --danger-soft: #3a2020;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Figtree, system-ui, sans-serif; }
h1, h2, h3 { font-family: Archivo, system-ui, sans-serif; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hide { display: none !important; }

/* banners */
.banner { font-size: 14px; padding: 10px 16px; text-align: center; background: var(--accent-soft); color: var(--ink); }
.banner.warn { background: var(--warn-soft); }
.banner.ok { background: var(--ok-soft); }
.notice { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; background: var(--accent-soft); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice.ok { background: var(--ok-soft); }
.notice.warn { background: var(--warn-soft); }
.notice.error { background: var(--danger-soft); color: var(--danger); }

/* header and logo */
header.top { border-bottom: 1px solid var(--line); background: var(--card); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.ring { width: 36px; height: 36px; border-radius: 50%; border: 6px solid var(--accent); flex: 0 0 auto; }
.wordmark { font-family: Archivo, sans-serif; font-weight: 700; font-size: 11px; line-height: 1.15; letter-spacing: .08em; }
.brand .sep { width: 1px; height: 30px; background: var(--line); }
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.who select { width: auto; padding: 5px 8px; font-size: 13px; }

/* nav */
nav.tabs { display: flex; gap: 6px; margin: 22px 0 18px; flex-wrap: wrap; }
nav.tabs a { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 16px; text-decoration: none; font-size: 14px; }
nav.tabs a.on { background: var(--ink); color: var(--card); border-color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--grad); color: var(--accent-ink); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); font-weight: 500; }
.btn.link { background: none; border: 0; color: var(--accent); padding: 0; font-weight: 500; text-decoration: underline; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.full { width: 100%; }
.google { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; }

/* cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card h2 { font-size: 20px; margin-bottom: 6px; }
.center { max-width: 460px; margin: 48px auto; }
.center .card { padding: 30px 26px; }
.center h1 { font-size: 28px; margin-bottom: 6px; text-align: center; }
.center .lead { text-align: center; margin-top: 0; }
.stack > * + * { margin-top: 12px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 22px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.newhere { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; }
.newhere p { margin: 0 0 6px; }
.newhere .btn.link { font-size: inherit; }
.newhere .trydemo { margin-top: 14px; }
.switch-tabs { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 18px 0; }
.switch-tabs button { flex: 1; border: 0; background: var(--card); padding: 9px; font: inherit; cursor: pointer; color: var(--muted); }
.switch-tabs button.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* tiles */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 30px; }
.tile { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; min-height: 210px; }
.tile .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; font-size: 23px; font-weight: 700; color: var(--accent); }
.tile h3 { font-size: 17px; }
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.tile p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.tile .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tile .price { font-size: 13px; color: var(--muted); }
.tile.locked, .tile.soon, .tile.noaccess, .tile.processing { background: var(--locked); }
.tile.locked .icon, .tile.soon .icon, .tile.noaccess .icon, .tile.processing .icon { filter: grayscale(1); opacity: .55; }
.tile.locked h3, .tile.locked p, .tile.soon h3, .tile.soon p, .tile.noaccess h3, .tile.noaccess p { opacity: .7; }
.tile .badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; gap: 4px; }
.tile.open .badge { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tile.pastdue .badge, .tile.processing .badge { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tile.open:hover { border-color: var(--accent); }
.tile .tile-note { font-size: 13px; line-height: 1.45; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; }
.tile .tile-note a { color: inherit; font-weight: 600; }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: var(--card); color: var(--ink);
}
textarea { min-height: 70px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label, label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 0; }
label.check input { margin-top: 4px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
td.c, th.c { text-align: center; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
td select { min-width: 140px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.pill.off { background: var(--locked); color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { background: var(--card); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { font-size: 21px; margin-bottom: 8px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-size: 13px; }
.agreement-text { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 14px; background: var(--bg); }
.modal.wide { max-width: 760px; }
.modal .agreement-text { max-height: calc(100vh - 220px); }
/* The Terms of Use and the Privacy Policy */
.legal { max-width: 820px; margin: 22px auto 0; line-height: 1.55; }
.legal h1 { font-size: 26px; margin-bottom: 6px; }
.legal h3, .agreement-text h3 { font-size: 16px; margin: 20px 0 6px; }
.legal p, .agreement-text p { margin: 0 0 10px; }
.legal ul, .agreement-text ul { margin: 0 0 12px; padding-left: 22px; }
.legal li, .agreement-text li { margin-bottom: 6px; }
.legal-updated { color: var(--muted); font-size: 13px; }
.legal-table td, .legal-table th { vertical-align: top; font-size: 13px; }

/* admin */
details.appedit { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: var(--card); }
details.appedit summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 10px; }
details.appedit form { margin-top: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 30; max-width: calc(100% - 32px); }
.preview-pick { display: grid; gap: 8px; margin-top: 10px; }
.preview-pick button { justify-content: flex-start; text-align: left; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 30px 16px; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  .brand .sep, .brand .wordmark { display: none; }
}
