/* Yumemira admin · the shell's layout (BRIEF-v3 §2): the left sidebar with its groups, the top bar (date range, search,
   refresh, sign out), the phone tab bar and its More sheet, the sample-data ribbon, sign-in, the preview tag.
   Layout only; colours are the website's tokens. NO divider lines: bars cast a soft shadow, never a line. */

[hidden] { display: none !important; }
:root { --tabs-h: 62px; --side-w: 248px; --side-gap: 14px; --top-h: 68px; }
html { background: var(--white); }
body.adm-body { background: var(--white); }
body.adm-body.is-signed-in { background: linear-gradient(180deg, var(--sky-0) 0, var(--white) 520px) no-repeat, var(--white); }
body.is-booting .adm-main, body.is-booting .adm-side, body.is-booting .adm-top, body.is-booting .adm-tabs { opacity: 0; }

.adm-skip { position: absolute; z-index: 1000; left: 12px; top: -80px; padding: 10px 14px; border-radius: 10px; background: var(--white); box-shadow: var(--depth-2); color: var(--accent-edge); font-weight: 500; }
.adm-skip:focus { top: 12px; }
.adm-main { display: block; min-height: 100vh; outline: none; transition: opacity .2s var(--ease); }
.adm-main.is-signin { min-height: 100vh; }
.view { display: block; }
.adm-noscript { max-width: 420px; margin: 40px auto; padding: 0 20px; font-size: 17px; }

/* ---- the left sidebar (desktop): a white card standing on the sky, groups with small headings ---- */
.adm-side { position: fixed; z-index: 80; left: var(--side-gap); top: var(--side-gap); bottom: var(--side-gap); width: var(--side-w); display: none; flex-direction: column; gap: 6px; padding: 18px 12px 14px; border-radius: var(--r-card); background: var(--white); border: 1px solid var(--edge); box-shadow: var(--highlight), var(--depth-2); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; transition: opacity .2s var(--ease); }
.adm-side::-webkit-scrollbar { display: none; }
.adm-side-logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 12px; border-radius: 12px; }
.adm-side-logo img { width: 124px; height: auto; }
.adm-side-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--tint); color: var(--accent-edge); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.adm-nav { display: grid; gap: 14px; align-content: start; flex: 1; }
.adm-nav-group { display: grid; gap: 2px; }
.adm-nav-head { margin: 0 0 4px; padding: 0 12px; font-size: 12.5px; line-height: 1.3; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--secondary); }
.adm-nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--body); font-size: 16px; line-height: 1.2; font-weight: 400; -webkit-tap-highlight-color: transparent; transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
.adm-nav-ico { width: 21px; height: 21px; color: var(--secondary); transition: color .18s var(--ease); }
.adm-nav-text { flex: 1; min-width: 0; }
@media (hover: hover) { .adm-nav-link:hover { background: var(--soft); color: var(--ink); } }
.adm-nav-link:active { transform: scale(.98); }
.adm-nav-link[aria-current="page"] { background: var(--tint); color: var(--accent-edge); font-weight: 500; }
.adm-nav-link[aria-current="page"] .adm-nav-ico { color: var(--accent); }
.adm-badge { flex: none; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--coral); color: var(--white); font-size: 12.5px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-live-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--leaf); animation: adm-live 1.8s ease-in-out infinite; }
@keyframes adm-live { 50% { opacity: .35; transform: scale(.8); } }
.adm-side-foot { display: grid; gap: 3px; padding: 10px 12px 2px; }
.adm-side-host { font-size: 13.5px; font-weight: 500; color: var(--body); }
.adm-side-zone { font-size: 12.5px; color: var(--secondary); }

/* ---- the top bar: glass, a soft shadow once the page moves, never a line ---- */
.adm-top { position: fixed; z-index: 70; left: 0; right: 0; top: 0; display: none; align-items: center; gap: 14px; height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 16px 0;
  background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); transition: box-shadow .25s var(--ease), opacity .2s var(--ease); }
.adm-top.is-scrolled { box-shadow: 0 8px 22px -12px rgba(15, 26, 43, .2); }
.adm-top-logo { flex: none; display: block; }
.adm-top-logo img { width: 104px; height: auto; }
.adm-range { flex: none; display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; border-radius: 13px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--edge); transition: opacity .2s var(--ease); }
.adm-range.is-idle { opacity: .5; }
.adm-range-btn { min-width: 50px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--secondary); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .18s var(--ease); }
.adm-range-btn:active { transform: scale(.95); }
@media (hover: hover) { .adm-range-btn:hover { color: var(--ink); } }
.adm-range-btn[aria-pressed="true"] { background: var(--white); color: var(--accent-edge); box-shadow: 0 0 0 1px rgba(15, 26, 43, .05), 0 2px 5px rgba(15, 26, 43, .14); }
.adm-search { position: relative; flex: 1; display: none; align-items: center; max-width: 420px; }
.adm-search-ico { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--secondary); pointer-events: none; }
.adm-search-input { width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: 13px; border: 1px solid var(--edge); background: var(--white); box-shadow: inset 0 1px 3px rgba(15, 26, 43, .05); color: var(--ink); font: inherit; font-size: 16px; }
.adm-search-input::placeholder { color: var(--secondary); opacity: .85; }
.adm-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.adm-top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.adm-top-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 11px; border-radius: 13px; color: var(--body); font-size: 15px; font-weight: 500; -webkit-tap-highlight-color: transparent; transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
.adm-top-btn .adm-ico { width: 21px; height: 21px; }
@media (hover: hover) { .adm-top-btn:hover { background: rgba(15, 26, 43, .055); color: var(--ink); } }
.adm-top-btn:active { transform: scale(.94); }
.adm-top-btn.is-spin .adm-ico { animation: adm-spin .7s var(--ease); }
@keyframes adm-spin { to { transform: rotate(360deg); } }
.adm-top-out { display: none; }

body.is-signed-in .adm-top:not([hidden]) { display: flex; }
body.is-signed-in .adm-main { padding-top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); }

@media (min-width: 1024px) {
  body.is-signed-in .adm-side:not([hidden]) { display: flex; }
  body.is-signed-in .adm-top { left: calc(var(--side-w) + var(--side-gap) * 2); padding: 0 28px 0 14px; background: rgba(247, 251, 255, .78); }
  body.is-signed-in .adm-main { margin-left: calc(var(--side-w) + var(--side-gap) * 2); }
  .adm-top-logo { display: none; }
  .adm-search:not([hidden]) { display: flex; }
  .adm-top-out { display: inline-flex; }
}
@media (max-width: 1023.98px) {
  body.is-signed-in .adm-main { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); }
  body.is-signed-in .adm-toasts { bottom: calc(var(--tabs-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  .adm-top { gap: 10px; padding-left: 14px; padding-right: 8px; }
  .adm-range { margin-left: auto; }
  .adm-top-actions { margin-left: 0; }
  .adm-range-btn { min-width: 0; height: 36px; padding: 0 10px; font-size: 14px; }
}
@media (max-width: 379.98px) { .adm-top-logo img { width: 84px; } .adm-range-btn { padding: 0 8px; } }

/* ---- the phone tab bar: the same glass as the top bar, a soft shadow cast upwards, no line ---- */
.adm-tabs { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; display: none; grid-template-columns: repeat(4, 1fr);
  padding: 5px max(8px, env(safe-area-inset-left, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px));
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -6px 18px -8px rgba(15, 26, 43, .16); }
@media (max-width: 1023.98px) { body.is-signed-in .adm-tabs:not([hidden]) { display: grid; } }
.adm-tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 52px; padding: 3px 2px; border-radius: 12px; color: var(--secondary); font: inherit; font-size: 12px; line-height: 1.1; font-weight: 500; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; transition: color .2s var(--ease), transform .18s var(--ease); }
.adm-tab:active { transform: scale(.93); }
.adm-tab-ico { width: 26px; height: 26px; }
.adm-tab[aria-current="page"], .adm-tab.is-current { color: var(--accent-edge); }
.adm-tab.is-picked .adm-tab-ico { animation: adm-tab-pop .5s var(--spring); }
@keyframes adm-tab-pop { 30% { transform: translateY(-3px) scale(1.14); } 62% { transform: scale(.96); } }
.adm-tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; font-size: 11.5px; box-shadow: 0 0 0 2px var(--white); }

/* ---- the More sheet (phones): the pages that are not tabs, as soft rows ---- */
.adm-more-list { display: grid; gap: 8px; }
.adm-more-row { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 14px; border-radius: 14px; background: var(--soft); color: var(--ink); font-size: 17px; font-weight: 500; }
.adm-more-row[aria-current="page"] { background: var(--tint); color: var(--accent-edge); }
.adm-more-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--white); color: var(--accent); box-shadow: var(--depth-1); }
.adm-more-ico .adm-ico { width: 20px; height: 20px; }
.adm-more-text { flex: 1; min-width: 0; }
.adm-more-chev { width: 16px; height: 16px; color: var(--edge-strong); }
.adm-more-foot { font-size: 13px; color: var(--secondary); text-align: center; }

/* ---- the sample-data ribbon (local preview only) ---- */
.adm-sample { display: flex; align-items: center; gap: 10px; width: calc(100% - 56px); max-width: 1264px; margin: 16px auto 0; padding: 10px 16px; border-radius: 14px; background: var(--pale-sun); border: 1px solid var(--edge-sun); color: var(--ink); font-size: 14.5px; line-height: 1.45; }
.adm-sample-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.adm-sample strong { font-weight: 600; }
.adm-sample.is-inline { margin: 0 0 14px; }
.adm-sample.is-inline { width: auto; }
@media (max-width: 1023.98px) { .adm-sample { width: auto; margin: 12px 16px 0; padding: 9px 12px; font-size: 13.5px; align-items: flex-start; } .adm-sample-dot { margin-top: 6px; } }

/* ---- the LOCAL PREVIEW tag (dev server only; sits in the sidebar's foot) ---- */
.adm-preview-tag { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 28px; margin-bottom: 6px; padding: 0 11px; border-radius: 8px; background: var(--pale-sun); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge-sun); font: 600 11.5px/28px -apple-system, "SF Pro Text", system-ui, sans-serif; letter-spacing: .06em; transition: transform .18s var(--ease); }
.adm-preview-tag:active { transform: scale(.95); }
.adm-preview-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* ---- shared cards for errors and places not in this build ---- */
.adm-error { display: grid; justify-items: center; gap: 12px; max-width: 520px; margin: 24px auto; padding: 28px 22px; text-align: center; }
.adm-error .adm-art { filter: var(--art-drop); }
.adm-error-words { font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--ink); text-wrap: balance; }

/* ---- sign-in: the website's sky, the ribbon, Mira waving, one button ---- */
.adm-signin { display: grid; justify-items: center; align-content: center; gap: 22px; min-height: 100vh; min-height: 100dvh; padding: calc(32px + env(safe-area-inset-top, 0px)) 20px calc(32px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 58%, var(--sky-2) 100%); }
.adm-signin-box { display: grid; justify-items: center; gap: 12px; width: 100%; max-width: 420px; text-align: center; }
.adm-signin-logo { width: 150px; height: auto; margin-bottom: 14px; }
.adm-signin-mira .adm-mira { justify-content: center; margin: 0 0 4px; }
.adm-signin-mira .mira-hi-say { text-align: left; }
.adm-signin-title { margin-top: 6px; font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.adm-signin-sub { max-width: 36ch; font-size: 16px; line-height: 1.5; font-weight: 400; color: var(--body); text-wrap: pretty; }
.adm-signin-btn { margin-top: 14px; }
.adm-signin-ico { width: 20px; height: 20px; }
.adm-signin-msg { min-height: 1.5em; max-width: 36ch; font-size: 15px; line-height: 1.5; color: var(--body); }
.adm-setup { display: grid; justify-items: center; gap: 12px; width: 100%; }
.adm-form { display: grid; gap: 12px; width: 100%; margin-top: 8px; text-align: left; }
.adm-field { display: grid; gap: 6px; width: 100%; }
.adm-pw { position: relative; display: block; }
.adm-pw-input { padding-right: 76px; }
.adm-pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 38px; padding: 0 12px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-edge); background: var(--tint); transition: background-color .18s var(--ease); }
@media (hover: hover) { .adm-pw-eye:hover { background: var(--tint-line); } }
.adm-pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-meter { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 22px; }
.adm-meter-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.adm-meter-bar { height: 6px; border-radius: 3px; background: var(--track-soft); }
.adm-meter-word { font-size: 14px; line-height: 1.4; color: var(--secondary); }
.adm-meter[data-level="1"] .adm-meter-bar:nth-child(-n+1) { background: var(--coral); }
.adm-meter[data-level="2"] .adm-meter-bar:nth-child(-n+2) { background: var(--gold); }
.adm-meter[data-level="3"] .adm-meter-bar:nth-child(-n+3) { background: var(--leaf); }
.adm-meter[data-level="4"] .adm-meter-bar { background: var(--success); }
.adm-meter[data-level="1"] .adm-meter-word { color: var(--danger); }
.adm-meter[data-level="3"] .adm-meter-word, .adm-meter[data-level="4"] .adm-meter-word { color: var(--success); }
.adm-code { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 6px; }
.adm-code-box { min-width: 0; height: 54px; padding: 0; border-radius: 10px; border: 1px solid var(--edge); background: var(--white); box-shadow: var(--depth-1); color: var(--ink); font: inherit; font-size: 22px; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; }
.adm-code-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.adm-recovery-code { width: 100%; padding: 16px; border-radius: var(--r-row); background: var(--white); border: 1px solid var(--edge); box-shadow: var(--depth-1); font: 600 19px/1.45 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .05em; color: var(--ink); user-select: all; word-break: break-all; }
.adm-stepup-art { display: grid; justify-items: center; }
.adm-stepup-art .adm-art { filter: var(--art-drop); }
.adm-preview-door { display: grid; gap: 10px; width: 100%; max-width: 420px; margin-top: 6px; padding: 18px; border-radius: var(--r-tile); background: var(--pale-sun); border: 1px solid var(--edge-sun); box-shadow: var(--highlight), var(--tint-sun-shadow); text-align: left; }
.adm-preview-kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1.2 -apple-system, "SF Pro Text", system-ui, sans-serif; letter-spacing: .06em; color: var(--ink); }
.adm-preview-door-text { font-size: 15px; line-height: 1.5; font-weight: 400; color: var(--body); }
.adm-preview-door-msg { font-size: 14px; color: var(--body); }
@media (min-width: 1024px) {
  .adm-signin-title { font-size: 32px; }
  .adm-signin-logo { width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .adm-live-dot, .adm-top-btn.is-spin .adm-ico, .adm-tab.is-picked .adm-tab-ico { animation: none; }
}
