/* Bento design: what every page of the management web shares (2026-11-26).
   Mockups: docs/mockups/*-bento.html. A page puts .bento-page on its root element and lays
   its tiles out in its own scoped CSS (grid-template-areas); colours, tiles, buttons and
   chips come from here.

   Colours are the MudBlazor palette (Themes/GuguusTheme.cs), so light and dark mode follow
   the theme switch. Fonts are --font-display / --font-body from app.css.

   Buttons are .b-btn, not .btn: Bootstrap is loaded too and owns .btn. */

/* The tokens live on :root, so tiles and buttons look right outside a .bento-page too -
   in dialogs, the menu, and pages not converted yet. They follow the MudBlazor palette,
   which MudThemeProvider swaps on :root for dark mode. */
:root {
    --bg: var(--mud-palette-background-gray);
    --surface: var(--mud-palette-surface);
    --ink: var(--mud-palette-text-primary);
    --muted: var(--mud-palette-text-secondary);
    --line: var(--mud-palette-divider);
    --gold: var(--mud-palette-primary);
    --gold-soft: color-mix(in srgb, var(--mud-palette-primary) 24%, var(--mud-palette-surface));
    --cyan: var(--mud-palette-secondary);
    --cyan-ink: color-mix(in srgb, var(--mud-palette-secondary) 72%, var(--mud-palette-text-primary));
    --cyan-soft: color-mix(in srgb, var(--mud-palette-secondary) 16%, var(--mud-palette-surface));
    --indigo: var(--mud-palette-tertiary);
    --warn: color-mix(in srgb, var(--mud-palette-warning) 72%, var(--mud-palette-text-primary));
    --navy: #1D294A;
    --project-grey: #9AA6C4;
    --radius: 22px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(29, 41, 74, .05), 0 6px 24px rgba(29, 41, 74, .07);
}

.bento-page {
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 var(--font-body);
    min-height: calc(100vh - var(--mud-appbar-height, 64px));
    padding: 28px 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bento-page h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
    text-wrap: balance;
}

.bento-page a:focus-visible,
.bento-page button:focus-visible,
.bento-page input:focus-visible,
.bento-page textarea:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 2px;
}

/* ---------- page header ---------- */

.bento-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bento-top p { margin: 4px 0 0; color: var(--muted); }
.bento-top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.b-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    font: 600 14px var(--font-body);
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    background: none;
}

.b-btn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.b-btn:disabled { opacity: .55; cursor: not-allowed; }

.b-btn-gold { background: var(--gold); color: var(--navy); }
.b-btn-gold:hover:not(:disabled) { filter: brightness(.96); color: var(--navy); }

.b-btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.b-btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--ink); }

/* on the indigo anchor tile */
.b-btn-hero { background: var(--gold); color: var(--navy); padding: 12px 22px; font-size: 15px; }
.b-btn-hero:hover:not(:disabled) { filter: brightness(.96); color: var(--navy); }
.b-btn-soft { background: rgba(255, 255, 255, .12); color: #FFFFFF; padding: 12px 18px; font-size: 15px; }
.b-btn-soft:hover:not(:disabled) { background: rgba(255, 255, 255, .2); color: #FFFFFF; }

/* ---------- tiles ---------- */

.bento-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tile {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.tile-title {
    font: 600 13px var(--font-body);
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
}

.tile-link { font-size: 13px; font-weight: 600; color: var(--cyan-ink); text-decoration: none; }
.tile-link:hover { text-decoration: underline; color: var(--cyan-ink); }

.tile .sub { color: var(--muted); font-size: 13px; }
.tile .big { font-size: 44px; line-height: 1; font-weight: 700; }
.tile .push { margin-top: auto; }

.tile .empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    text-align: center;
}

/* The anchor tile: indigo, the running timer lives here. */
.tile-hero {
    background: var(--indigo);
    color: #FFFFFF;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.tile-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233, 199, 128, .35), transparent 65%);
    pointer-events: none;
}

.tile-hero .tile-title { color: rgba(255, 255, 255, .75); }
.tile-hero .chip { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.tile-hero > * { position: relative; z-index: 1; }

.live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5EE0A0;
    box-shadow: 0 0 0 4px rgba(94, 224, 160, .2);
}

.bento-clock { font-size: clamp(56px, 7vw, 92px); line-height: 1; font-weight: 700; }

/* ---------- chips ---------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.chip svg { width: 14px; height: 14px; fill: currentColor; }
.chip-bill { background: var(--cyan-soft); color: var(--cyan-ink); }
.chip-run { background: var(--gold-soft); color: var(--ink); }
.chip-warn { background: color-mix(in srgb, var(--mud-palette-warning) 18%, var(--surface)); color: var(--warn); }

/* ---------- progress ring (r = 33, circumference 207.35) ---------- */

.bento-ring { width: 76px; height: 76px; flex: none; }
.bento-ring circle { fill: none; stroke-width: 9; }
.bento-ring .track { stroke: var(--line); }

.bento-ring .val {
    stroke: var(--cyan);
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset .4s ease;
}

@media (max-width: 600px) {
    .bento-page { padding: 20px 16px 40px; }
    .bento-page h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .live i { box-shadow: none; }
    .bento-ring .val { transition: none; }
}

/* ---------- app bar, drawer and menu (Components/Layout) ---------- */

.bento-appbar.mud-appbar {
    border-bottom: 1px solid var(--mud-palette-divider);
}

.bento-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
    font: 700 22px var(--font-display);
    letter-spacing: -.01em;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
}

.bento-brand:hover { color: var(--mud-palette-text-primary); }

.bento-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--mud-palette-primary);
    color: #1D294A;
    font-size: 20px;
}

.bento-drawer.mud-drawer {
    border-right: 1px solid var(--mud-palette-divider);
}

/* The side navigation itself: Components/Layout/NavMenu.razor.css (2026-11-30). */
