/* Admin console. --brand is set per site from Settings. */
@font-face { font-family: 'Syopz'; font-weight: 400; font-display: swap; src: url(../vendor/fonts/jost-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Syopz'; font-weight: 500; font-display: swap; src: url(../vendor/fonts/jost-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Syopz'; font-weight: 600 700; font-display: swap; src: url(../vendor/fonts/jost-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Syopz'; font-weight: 800 900; font-display: swap; src: url(../vendor/fonts/plus-jakarta-sans-latin-800-normal.woff2) format('woff2'); }

:root {
  --brand: #0B6E69;
  --brand-dark: color-mix(in srgb, var(--brand) 82%, black);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, white);
  --ink: #332222;
  --muted: #6E6662;
  --line: #E6DFD4;
  --bg: #F8F4EF;
  --card: #FFFFFF;
  --ok: #1F7A4D;
  --ok-soft: #E3F3EA;
  --warn: #8A4B00;
  --warn-soft: #FFF1DB;
  --err: #B42318;
  --err-soft: #FDE8E7;
  --radius: 12px;
  font-family: 'Syopz', Arial, 'Helvetica Neue', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body.adm { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--brand-dark); }
h1 { font-size: 26px; margin: 0; font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.adm-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.adm-side { flex: 1 1 230px; max-width: 100%; background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; }
.adm-main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; }
.adm-brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 10px 18px; text-decoration: none; color: var(--ink); }
.adm-brand img { max-width: 170px; max-height: 64px; object-fit: contain; object-position: left; }
.adm-brand span { font-weight: 900; font-size: 18px; }
.adm-brand small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.adm-side nav { display: flex; flex-direction: column; gap: 2px; }
.adm-side nav a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.adm-side nav a:hover { background: var(--bg); }
.adm-side nav a.is-on { background: var(--brand); color: #fff; }
.adm-navhead { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 18px 12px 6px; font-weight: 700; }
.adm-me { margin-top: auto; padding: 18px 12px 0; font-size: 13px; border-top: 1px solid var(--line); }
@media (max-width: 820px) {
  .adm-side { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .adm-side nav { flex-direction: row; flex-wrap: wrap; }
  .adm-me { margin-top: 8px; }
  .adm-main { padding: 20px 16px 40px; }
}

/* Page header */
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumb { font-size: 14px; display: inline-block; margin-bottom: 4px; }

/* Cards, grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > * { flex: 1 1 220px; min-width: 0; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .main { flex: 3 1 460px; min-width: 0; }
.cols > .aside { flex: 2 1 300px; min-width: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 9999px; border: 1.5px solid #CFC6B8; background: #fff; color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-danger { color: var(--err); border-color: #F2B8B5; }
.btn-danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-dark); text-decoration: underline; cursor: pointer; }

/* Forms */
.fld { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.fld .hint, .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=url], input:not([type]), select, textarea {
  font: inherit; font-weight: 400; font-size: 15px; color: var(--ink); background: #fff;
  border: 1.5px solid #CFC6B8; border-radius: 10px; padding: 9px 12px; min-height: 42px; width: 100%;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, white); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid #CFC6B8; border-radius: 9999px; font-weight: 400; font-size: 14px; background: #fff; cursor: pointer; }
.chip input { margin: 0; }
.chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.lang-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .lang-tabs { grid-template-columns: 1fr; } }
.lang-tag { display: inline-block; font-size: 11px; font-weight: 700; background: var(--bg); border-radius: 6px; padding: 1px 6px; margin-left: 4px; color: var(--muted); }
.drop { border: 2px dashed #CFC6B8; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.drop img { max-width: 100%; max-height: 160px; border-radius: 8px; object-fit: cover; }
.errors { background: var(--err-soft); color: var(--err); border-radius: 10px; padding: 12px 14px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

/* Flash */
.adm-flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.adm-flash.is-ok { background: var(--ok-soft); color: var(--ok); }
.adm-flash.is-error { background: var(--err-soft); color: var(--err); }
.adm-flash.is-warn { background: var(--warn-soft); color: var(--warn); }

/* Tables */
.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-top: 1px solid #F0EFEF; vertical-align: middle; }
.tbl tr:hover td { background: #FAFAFA; }
.tbl .actions { text-align: right; white-space: nowrap; }
.thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 9999px; background: var(--bg); color: var(--muted); }
.pill.is-ok { background: var(--ok-soft); color: var(--ok); }
.pill.is-warn { background: var(--warn-soft); color: var(--warn); }
.pill.is-err { background: var(--err-soft); color: var(--err); }
.pill.is-brand { background: var(--brand); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filters > * { flex: 0 1 auto; width: auto; }
.filters input[type=search] { flex: 1 1 260px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* Auth pages */
.adm-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-wrap { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 22px; }
.auth-brand { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.auth-brand img { max-width: 200px; max-height: 80px; }
.auth-card { display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 24px; }

[hidden] { display: none !important; }
details summary { cursor: pointer; color: var(--brand-dark); font-weight: 700; }

/* Tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: 9999px; margin-bottom: 18px; }
.tabs a { padding: 8px 16px; border-radius: 9999px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.tabs a:hover { background: var(--bg); }
.tabs a.is-on { background: var(--ink); color: #fff; }

/* Unit picker on the store form */
.unit-pick { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 14px; }
.unit-floor-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }

/* Floors */
.floor-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.floor-item { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 12px 14px; }
.floor-item.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.floor-thumb { flex: 0 0 140px; height: 92px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.floor-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.floor-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.floor-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.danger-zone { border-color: #F2B8B5; }
.thumb svg { display: block; }
