/* dev.orsande.com: what the live pages need beyond design/ (tokens.css, base.css, portal.css, copied verbatim by
   portal/tools/sync-design.sh). The CSP allows no inline style attributes, so the mockups' style="" values live
   here as small classes; real form controls get the mockups' frozen states through :has(). */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- spacing and layout helpers (mockup inline styles) */
.mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; }
.mt-s4 { margin-top: var(--s-4); } .mt-s6 { margin-top: var(--s-6); } .mt-s8 { margin-top: var(--s-8); }
.gap-2 { gap: 2px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-s4 { gap: var(--s-4); }
.grow1 { flex: 1; } .text-r { text-align: right; } .js-start { justify-self: start; } .between { justify-content: space-between; }
.form-stack { display: grid; gap: var(--s-4); }
.g-admin { grid-template-columns: minmax(0, 1fr) 380px; }
.panel-b.tight { padding-top: 6px; padding-bottom: 6px; }
.narrow { width: min(100%, 640px); margin: 0 auto; }
.lore.on-art { max-width: 60ch; margin-top: 8px; color: #e3dac6; }
.realm-big .v .of { font-size: 1rem; }
.avatar.sz-32 { --sz: 32px; } .avatar.sz-34 { --sz: 34px; } .dial.sz-56 { --sz: 56px; }
.plat .det-tag { background: #0e1828; }
.cred .row .i.ok { color: var(--c-glass); }
.parch-b { color: var(--c-parch); font-weight: 600; }
.w-500 { font-weight: 500; }
.nowrap { white-space: nowrap; }

/* progress values: <div class="bar v-65"> (PortalUi.Percent) */
.v-0 { --v: 0%; } .v-5 { --v: 5%; } .v-10 { --v: 10%; } .v-15 { --v: 15%; } .v-20 { --v: 20%; } .v-25 { --v: 25%; }
.v-30 { --v: 30%; } .v-35 { --v: 35%; } .v-40 { --v: 40%; } .v-45 { --v: 45%; } .v-50 { --v: 50%; } .v-55 { --v: 55%; }
.v-60 { --v: 60%; } .v-65 { --v: 65%; } .v-70 { --v: 70%; } .v-75 { --v: 75%; } .v-80 { --v: 80%; } .v-85 { --v: 85%; }
.v-90 { --v: 90%; } .v-95 { --v: 95%; } .v-100 { --v: 100%; }

/* ---- status bits the mockups did not need */
.gem.off { background: radial-gradient(circle at 35% 30%, #a7a293, #6d6a60 60%, #3d3b35); box-shadow: none; animation: none; }
.uptime i.n { background: rgba(255, 255, 255, .07); }
.status.maint { --c: var(--c-warn); }

/* ---- the account menu in the top bar (details/summary: works without script) */
.me-menu { position: relative; }
.me-menu > summary { list-style: none; cursor: pointer; }
.me-menu > summary::-webkit-details-marker { display: none; }
.me-menu > .menu { top: 46px; }
.me-menu:not([open]) > .menu, .acts details:not([open]) > .menu { display: none; }
.menu form { margin: 0; }
.menu .menu-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none;
  font: 400 var(--t-small)/1.6 var(--f-ui); color: var(--c-ink); text-align: left; cursor: pointer; }
.menu .menu-item .i { width: 16px; height: 16px; color: var(--c-ink-3); }
.menu .menu-item:hover, .menu .menu-item:focus-visible { background: rgba(255, 255, 255, .06); color: var(--c-parch); }
.menu .menu-item.danger { color: #ff9c8a; }
.menu .menu-item.danger .i { color: var(--c-danger); }
.menu .sub { padding: 6px 10px 2px; font: 700 10px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--c-ink-3); }

/* ---- roster row actions */
.acts details { position: relative; }
.acts details > summary { list-style: none; }
.acts details > summary::-webkit-details-marker { display: none; }
.acts details[open] > summary { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 0, 0, .5) inset; border-color: var(--c-brass-lo); }
.acts form { margin: 0; display: inline-flex; }
.roster .acts .menu { text-align: left; white-space: normal; }

/* ---- real form controls in the design's shapes */
.check input, .roles input, .rc input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.check:has(input:checked) .box { background: var(--g-brass); border-color: #6e5222; color: var(--c-ink-inv); }
.check:has(input:checked) .box .i { display: inline-block; }
.check:has(input:focus-visible) .box, .roles label:has(input:focus-visible), .rc:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.roles label:has(input:checked) { border-color: var(--c-glass); box-shadow: 0 0 0 3px rgba(79, 208, 189, .15); background: rgba(79, 208, 189, .06); }
.roles.two { grid-template-columns: 1fr 1fr; }
.seg > a { text-decoration: none !important; }
.seg > a:hover { color: var(--c-parch); }
textarea.textarea.tall { min-height: 220px; }
.input.mono { font-family: var(--f-mono); font-size: var(--t-mono); }

/* validation (asp-validation-summary) as a danger note */
.validation-summary-valid { display: none; }
.validation-summary-errors { padding: 12px 14px; border-radius: var(--r-sm); font-size: var(--t-small); color: #ffd9d1;
  background: rgba(238, 106, 85, .08); border: 1px solid rgba(238, 106, 85, .4); }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

/* ---- login side extras */
.login-form .forgot { font-weight: 500; }
.login-form h1 { font-size: 1.6rem; }
.login-form .alt { font-size: var(--t-small); color: var(--c-ink-2); }

/* ---- credentials hand-over card */
.cred .secret { color: var(--c-parch); background: rgba(5, 10, 18, .6); padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--c-line);
  font: 500 var(--t-mono)/1.4 var(--f-mono); word-break: break-all; user-select: all; }
.cred .kv { grid-template-columns: 76px minmax(0, 1fr) auto; }

/* ---- empty states and prose */
.empty { display: grid; gap: 12px; justify-items: start; padding: var(--s-6) var(--s-5); color: var(--c-ink-2); font-size: var(--t-small); }
.prose ul { margin: 8px 0 0; padding-left: 16px; display: grid; gap: 4px; }
.prose ul li::marker { color: var(--c-brass); content: "◆  "; font-size: 8px; }
.prose ul li .d { color: var(--c-ink-3); }
.prose p + ul, .prose ul + p { margin-top: 10px; }
.article { padding: var(--s-6) var(--s-8) var(--s-8); }
.article .meta { display: flex; gap: 10px; align-items: center; font-size: var(--t-cap); color: var(--c-ink-3); margin-bottom: 12px; }
.article h1 { font-size: 2rem; margin-bottom: 12px; }
.article .cover { border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px rgba(216, 171, 82, .3); margin: var(--s-5) 0 var(--s-6); }
.article .cover img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.news-admin .t { font-weight: 600; color: var(--c-parch); }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.recovery-codes code, .setup-key { font: 500 var(--t-mono)/1.4 var(--f-mono); color: var(--c-brass-hi); background: rgba(5, 10, 18, .7);
  padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--c-line); user-select: all; word-break: break-all; }
.setup-key { display: block; margin: 10px 0; }
.code-input { font: 600 1.25rem/1 var(--f-mono) !important; letter-spacing: .25em; text-transform: uppercase; }

/* sessions table: right-aligned row action */
.sessions td:last-child { text-align: right; width: 1%; white-space: nowrap; }

@media (max-width: 760px) {
  .g-admin { grid-template-columns: minmax(0, 1fr); }
  .profile { grid-template-columns: 1fr; gap: var(--s-5); padding: var(--s-6); }
  .profile .dial { --sz: 92px; }
  .profile .side { justify-items: start; }
  .stats { grid-template-columns: repeat(2, auto); gap: var(--s-4) 0; }
  .stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .chars { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: 1fr; }
  .scroll-x { overflow-x: auto; }
  .article { padding: var(--s-5); }
}
.mb-s5 { margin-bottom: var(--s-5); }
.fgrid.flush { margin: 0; gap: var(--s-3); }
.roles label.is-disabled { opacity: .45; cursor: not-allowed; }
.mini .mini-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: center; padding: 9px var(--s-5); border-top: 1px solid rgba(34, 54, 79, .6); }
.mini .mini-row .t { font-size: var(--t-small); color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cred .kv .input { height: 32px; }
@media (max-width: 760px) {
  .me .avatar { display: inline-grid; }
  .me-menu > .menu { right: 0; }
}
@media (max-width: 760px) {
  .sessions th:nth-child(2), .sessions td:nth-child(2) { display: none; }
  .sessions .device span.mono { white-space: normal; }
}
