/* Sedona Hosting - follows the Sedona Retail 2 BackOffice "BlueLight" theme (Themes/BlueLight.xaml). */
:root {
  --ground: #F3F6FA; --surface: #FFFFFF; --sunk: #F6F9FC; --line: #DFE7F0; --grid-line: #EDF2F7;
  --text: #152238; --muted: #56677D; --hint: #6B7C93;
  --logo: #0B3F75; --accent: #0F6FB9; --accent-text: #0D5B9D; --accent-dark: #0B3F75;
  --nav-selected: #E5F0FB; --nav-hover: #F1F5FA; --row-hover: #F6F9FC; --row-selected: #EEF5FC;
  --field-line: #B8D5EE; --field-hover: #1788D6; --focus: #FF9F1A; --focus-soft: rgba(255, 159, 26, .21);
  --ok-back: #E6F4EC; --ok: #1B7343; --ok-dot: #22A05B;
  --warn-back: #FFF1DE; --warn: #8F5200; --warn-dot: #E8870E;
  --err-back: #FDECEA; --err: #B42318; --err-dot: #D92D20;
  --info-back: #E5F0FB; --info: #0D5B9D; --info-dot: #1F7BC4;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13.5px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; background: var(--ground); color: var(--text); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.muted { color: var(--muted); }
.hint { color: var(--hint); font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ---- shell: top bar, sidebar, page ---- */
.shell { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: 52px 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; font-weight: 600; }
.logo:hover { text-decoration: none; }
.logo-tile { width: 28px; height: 28px; border-radius: 7px; background: var(--logo); color: #fff; display: grid; place-items: center; }
.logo-tile svg.i { width: 16px; height: 16px; }
.chip { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 500; }
.topbar .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--nav-selected); color: var(--accent-text); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.me .name { font-weight: 500; color: var(--text); }
.me .role { color: var(--hint); font-size: 12px; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 12px; display: flex; flex-direction: column; position: sticky; top: 52px; height: calc(100vh - 52px); }
.sidebar .section { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 10px 10px 6px; }
.sidebar a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--text); margin-bottom: 2px; }
.sidebar a:hover { background: var(--nav-hover); text-decoration: none; }
.sidebar a.on { background: var(--nav-selected); color: var(--accent-text); font-weight: 600; }
.sidebar .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dot); margin-right: 6px; vertical-align: middle; }
.page { padding: 24px 28px 60px; min-width: 0; }
.page.plain { grid-column: 1 / -1; }

/* ---- page header ---- */
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.crumbs svg.i { width: 14px; height: 14px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page-head .title .count { color: var(--muted); font-size: 14px; }
.page-head .sub { color: var(--muted); margin-top: 3px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar form { margin: 0; }

/* ---- buttons ---- */
button, .btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--field-line); background: var(--sunk); text-decoration: none; }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--accent-text); border-color: var(--accent-text); }
button.danger { color: var(--err); }
button.danger:hover { background: var(--err-back); border-color: #F4C7C2; }
button.link { height: auto; padding: 0; border: 0; background: none; color: var(--accent-text); font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button.icon { width: 36px; padding: 0; justify-content: center; }
button[disabled] { opacity: .6; cursor: default; }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head .tile { width: 32px; height: 32px; border-radius: 8px; background: var(--info-back); color: var(--accent-text); display: grid; place-items: center; }
.card-head .tile svg.i { width: 17px; height: 17px; }
.card-head .tile.warn { background: var(--warn-back); color: var(--warn-dot); }
.card-head .tile.err { background: var(--err-back); color: var(--err-dot); }
.card-head .tile.ok { background: var(--ok-back); color: var(--ok-dot); }
.card-head h2 + .muted { font-size: 13px; }
.card-head .end { margin-left: auto; }
.card-head.sep { border-top: 1px solid var(--grid-line); padding-top: 16px; margin-top: 4px; }
.card .grid { margin: 0 -20px; width: calc(100% + 40px); }
.card .grid th:first-child, .card .grid td:first-child { padding-left: 20px; }
.card .grid th:last-child, .card .grid td:last-child { padding-right: 20px; }
.card.flush .grid { margin: 0; width: 100%; }
.card .empty { padding: 14px 0 4px; text-align: left; }
.card.danger-zone { border-color: #F4C7C2; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

/* ---- stat cards ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; color: var(--text); }
a.stat:hover { border-color: var(--field-line); text-decoration: none; }
.stat.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stat .label { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.stat .value { font-size: 21px; font-weight: 600; margin-top: 4px; }
.stat .value.multi { font-size: 16px; line-height: 1.35; }
.stat .value small { font-size: 13px; font-weight: 400; color: var(--muted); }
.stat .value.warn { color: var(--warn-dot); }
.stat .value.err { color: var(--err); }

/* ---- filters ---- */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search { position: relative; }
.search svg.i { position: absolute; left: 11px; top: 9px; color: var(--hint); width: 17px; height: 17px; }
.search input { width: 300px; padding-left: 36px; }
.toggle { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; }
.toggle:hover { border-color: var(--field-line); text-decoration: none; }
.toggle.on { background: var(--nav-selected); border-color: var(--field-line); color: var(--accent-text); }

/* ---- tables ---- */
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
table.grid td { padding: 10px 14px; border-bottom: 1px solid var(--grid-line); vertical-align: top; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tr[data-href] { cursor: pointer; }
table.grid tbody tr:hover td { background: var(--row-hover); }
table.grid td .main { font-weight: 600; }
table.grid td .main a { color: var(--text); }
table.grid td.num { white-space: nowrap; }
table.grid td .sub { color: var(--hint); font-size: 12.5px; }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid tr.gone td { color: var(--hint); }
table.grid.compact td { padding: 7px 14px; }
.grid-foot { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---- status pills ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 11px; font-size: 12.5px; font-weight: 600; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.ok { background: var(--ok-back); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-back); color: var(--warn); border-color: transparent; }
.pill.err { background: var(--err-back); color: var(--err); border-color: transparent; }
.pill.info { background: var(--info-back); color: var(--info); border-color: transparent; }
.t-warn { color: var(--warn); }
.t-err { color: var(--err); font-weight: 600; }
.t-ok { color: var(--ok); }

/* ---- forms ---- */
label { display: block; margin-bottom: 12px; }
label > .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
label > .lbl .hint { font-weight: 400; }
input, select, textarea { display: block; width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--field-line); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
textarea { height: auto; padding: 8px 11px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--field-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-soft); }
input[type=checkbox] { display: inline-block; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); vertical-align: middle; }
input[type=file] { height: auto; padding: 8px; background: var(--sunk); border-style: dashed; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.fields .wide { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.inline-form label { flex: 1 1 150px; }
.inline-form button { margin-bottom: 12px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }

/* ---- messages ---- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--info-back); color: var(--info); border: 1px solid #C9DFF5; }
.alert.err { background: var(--err-back); color: var(--err); border-color: #F4C7C2; }
.alert.warn { background: var(--warn-back); color: var(--warn); border-color: #F7D9AE; }
.alert.ok { background: var(--ok-back); color: var(--ok); border-color: #BFE3CD; }
.alert svg.i { margin-top: 1px; }

/* ---- misc ---- */
dl.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
dl.kv dt { color: var(--hint); font-size: 12.5px; }
dl.kv dd { margin: 1px 0 0; font-weight: 600; }
pre.ini { margin: 0; background: #0B1F38; color: #E2ECF8; padding: 12px 14px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; font: 12.5px/1.5 Consolas, "Cascadia Mono", monospace; }
code.secret { background: var(--sunk); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; font: 13px Consolas, monospace; letter-spacing: .5px; }
.ini-box { display: flex; flex-direction: column; gap: 8px; }
.ini-box .row { display: flex; justify-content: space-between; align-items: center; }
ol.steps { list-style: none; padding: 0; margin: 0; }
ol.steps li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grid-line); }
ol.steps li:last-child { border-bottom: 0; }
ol.steps .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
ol.steps .mark svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
ol.steps li.ok .mark { background: var(--ok-back); color: var(--ok-dot); }
ol.steps li.bad .mark { background: var(--err-back); color: var(--err-dot); }
ol.steps .name { font-weight: 600; }
ol.steps .err-text { color: var(--err); margin-top: 3px; }
.progress { position: relative; height: 26px; background: var(--sunk); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; margin: 4px 0 12px; }
.progress .bar { height: 100%; width: 0; background: var(--info-back); border-right: 2px solid var(--accent); transition: width .2s; }
.progress .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--accent-text); }

/* ---- sign-in ---- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, #0B3F75 0%, #0D5B9D 55%, #1788D6 100%); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 14px; box-shadow: 0 20px 50px rgba(11, 63, 117, .35); padding: 30px 30px 24px; }
.auth-card .logo { margin-bottom: 18px; }
.auth-card h1 { font-size: 19px; margin-bottom: 4px; }
.auth-card .muted { margin: 0 0 18px; }
.auth-card button.primary { width: 100%; justify-content: center; height: 40px; margin-top: 4px; }
.qr { display: grid; place-items: center; margin: 4px 0 12px; }
.qr img { border: 1px solid var(--line); border-radius: 8px; }
.auth-foot { text-align: center; margin-top: 14px; font-size: 12.5px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .section, .sidebar .foot { display: none; }
  .page { padding: 18px 16px 40px; }
  .search input { width: 100%; }
  .me .role { display: none; }
}
