/* /Pages/Index.razor.rz.scp.css */
/* ---- Dark backdrop for the whole dashboard section ---- */

/* Without this, the hud-card and hex buttons were two dark shapes floating on the page's plain
   white background, which read as visually disconnected from their own glowing sci-fi styling.
   This panel extends the sidebar's dark theme into the content area so the HUD elements sit in a
   matching dark environment instead of clashing with white space around and between them. */
.dashboard-panel[b-w52xdh0ghp] {
    background: radial-gradient(ellipse 900px 520px at 12% -8%, #12233c 0%, #081019 55%, #04070d 100%);
    padding: 2rem 1.75rem 2.5rem;
    box-sizing: border-box;
    /* Fills <article>'s full height instead of guessing at a viewport-minus-header formula, which
       left a visible band of the page's white background below the panel because the guessed
       header height wasn't actually present at this breakpoint. <article> has a *definite* height
       (it's a stretched flex item of <main> — see MainLayout.razor.css), so this plain block child
       can resolve a percentage height against it. */
    min-height: 100%;
    /* <article>'s own padding (app.css's default `.content{padding-top:1.1rem}`, plus
       `px-4`/MainLayout.razor.css's left/right padding) was still leaving the page's plain white
       background visible as a margin all the way around this panel, not just below it — fixing
       the vertical shortfall above didn't touch this. Negative margins matching that padding
       exactly (a block box with width:auto grows to fill reclaimed negative-margin space, so the
       panel's own background paints all the way to <article>'s true edges) pull the panel flush
       with the header and both side edges. Bottom needs no matching margin: `.content` carries no
       padding-bottom at any breakpoint. */
    margin: -1.1rem -1.5rem 0;
    /* Safety net: the hex-grid's interlocking even-row offset (below) is sized against desktop
       widths and can run right up to (and, on real narrow phones like a 320px-wide iPhone SE,
       past) the edge of this panel. Rather than let an overflow silently push the corner
       decorations of .hud-card or the hex buttons past the viewport edge, clip anything that
       still overflows here so it's invisible instead of visually "cut off" against the screen. */
    overflow-x: hidden;
}

@media (min-width: 641px) {
    /* MainLayout.razor.css widens <article>'s own left padding to 2rem (right stays 1.5rem, same
       as the base px-4 value already matched above) past this breakpoint — match it here too so
       the panel keeps bleeding flush to the true left edge instead of reopening a 0.5rem gap. */
    .dashboard-panel[b-w52xdh0ghp] {
        margin-left: -2rem;
    }
}

/* ---- HUD hero card ---- */

.hud-card[b-w52xdh0ghp] {
    position: relative;
    isolation: isolate;
    max-width: 480px;
    box-sizing: border-box;
    padding: 1.5rem 1.75rem 1.35rem;
    color: #e2e8f0;
    /* The frame line is drawn by making THIS element's own background the frame color, then
       layering a same-shaped ::after (inset by the frame thickness) with the real card gradient
       on top, leaving a thin ring of this background visible all the way around — see ::after
       below for why. Neither `border` nor any box-shadow (outward OR inset) can do this: both are
       fundamentally rectangle-relative effects with no notion of the clip-path polygon's actual
       geometry, so on iOS Safari the straight edges of the shape show a line while every diagonal
       cut corner shows nothing at all — confirmed on-device with both approaches. */
    background: rgba(56, 189, 248, 0.35);
    clip-path: polygon(0 12px, 12px 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 12px));
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.08);
    overflow: hidden;
}

.hud-card[b-w52xdh0ghp]::after {
    content: "";
    position: absolute;
    /* Inset by exactly the frame's thickness, then re-applying the IDENTICAL clip-path formula
       below. For this "offset from each edge" cut-corner shape (every vertex is `0`, `100%`, or a
       fixed px distance from an edge — never a free-form angle), shrinking the box by `inset` on
       all sides and re-evaluating the same formula against the smaller box is mathematically an
       exact uniform inward offset of the whole polygon, corner cuts included, not an
       approximation — so the ring this leaves behind is a uniform 1px everywhere, corners and
       diagonals alike, in every browser. */
    inset: 1px;
    background: linear-gradient(135deg, #0b1a2e 0%, #061019 60%, #030711 100%);
    box-shadow: inset 0 0 40px rgba(8, 20, 35, 0.6);
    clip-path: polygon(0 12px, 12px 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 12px));
    z-index: -1;
}

.hud-card[b-w52xdh0ghp]::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 14px;
    width: 46px;
    height: 10px;
    background: repeating-linear-gradient(115deg, #38bdf8 0 4px, transparent 4px 8px);
    opacity: 0.85;
}

.hud-header[b-w52xdh0ghp] {
    line-height: 1.3;
}

.hud-label[b-w52xdh0ghp] {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #38bdf8;
    text-transform: uppercase;
}

.hud-sublabel[b-w52xdh0ghp] {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-top: 2px;
}

.hud-divider[b-w52xdh0ghp] {
    height: 1px;
    margin: 0.6rem 0 0.9rem;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.7), transparent 70%);
}

.hud-hero[b-w52xdh0ghp] {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.hud-number[b-w52xdh0ghp] {
    font-size: clamp(2.6rem, 14vw, 3.6rem);
    font-weight: 800;
    line-height: 1;
    color: #7dd3fc;
    text-shadow: 0 0 6px rgba(125, 211, 252, 0.9), 0 0 22px rgba(56, 189, 248, 0.55);
}

.hud-unit[b-w52xdh0ghp] {
    font-size: 1.15rem;
    color: #93c5fd;
}

.hud-caption[b-w52xdh0ghp] {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: #64748b;
    text-transform: uppercase;
}

.hud-segbar[b-w52xdh0ghp] {
    display: flex;
    gap: 3px;
    margin: 0.85rem 0 0.75rem;
}

.hud-seg[b-w52xdh0ghp] {
    flex: 1;
    height: 12px;
    border-radius: 1px;
    background: rgba(100, 116, 139, 0.18);
}

.hud-seg-c0[b-w52xdh0ghp] { background: linear-gradient(180deg, #67e8f9, #22d3ee); box-shadow: 0 0 5px rgba(34, 211, 238, 0.8); }
.hud-seg-c1[b-w52xdh0ghp] { background: linear-gradient(180deg, #93c5fd, #3b82f6); box-shadow: 0 0 5px rgba(59, 130, 246, 0.7); }
.hud-seg-c2[b-w52xdh0ghp] { background: linear-gradient(180deg, #5eead4, #14b8a6); box-shadow: 0 0 5px rgba(20, 184, 166, 0.7); }
.hud-seg-c3[b-w52xdh0ghp] { background: linear-gradient(180deg, #cbd5e1, #64748b); }
.hud-seg-cempty[b-w52xdh0ghp] { background: rgba(100, 116, 139, 0.12); }

.hud-legend[b-w52xdh0ghp] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.82rem;
}

.hud-legend-item[b-w52xdh0ghp] {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hud-dot[b-w52xdh0ghp] {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
}

.hud-legend .name[b-w52xdh0ghp] {
    color: #93c5fd;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.hud-legend .count[b-w52xdh0ghp] {
    color: #e2e8f0;
}

/* ---- Honeycomb navigation buttons ---- */

/* align-items: flex-start (not center) is deliberate — centering each row independently would
   center each row's own margin box, which halves the nth-child(even) offset below instead of
   applying it in full. flex-start lets the offset apply exactly as specified, left-aligned like
   the rest of this page's content. */
.hex-grid[b-w52xdh0ghp] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hex-row[b-w52xdh0ghp] {
    display: flex;
    gap: 10px;
}

.hex-row + .hex-row[b-w52xdh0ghp] {
    margin-top: -28px;
}

.hex-row:nth-child(even)[b-w52xdh0ghp] {
    margin-left: 53px;
}

.hex-btn[b-w52xdh0ghp] {
    position: relative;
    display: block;
    width: 96px;
    height: 111px;
    text-decoration: none;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(160deg, #102338 0%, #071322 70%, #04090f 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.25));
    transition: filter 0.15s ease, transform 0.15s ease;
}

/* Kept just inside the hex's own top point rather than poking above it: the honeycomb rows
   overlap tightly (.hex-row's negative margin-top below), so anything positioned above this
   hex's own box would visually land on top of the hex in the row above instead — confirmed by
   on-screen inspection, not just theory. Matches the unread-count badge already shown next to
   "お知らせ" in the sidebar. */
.hex-btn-badge[b-w52xdh0ghp] {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.hex-btn:hover[b-w52xdh0ghp], .hex-btn:focus[b-w52xdh0ghp] {
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.65));
    transform: translateY(-2px);
}

.hex-btn-inner[b-w52xdh0ghp] {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 0 0.6rem;
    text-align: center;
}

.hex-btn-label[b-w52xdh0ghp] {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

@media (max-width: 420px) {
    .hex-btn[b-w52xdh0ghp] {
        width: 78px;
        height: 90px;
    }

    .hex-row + .hex-row[b-w52xdh0ghp] {
        margin-top: -23px;
    }

    .hex-row:nth-child(even)[b-w52xdh0ghp] {
        margin-left: 44px;
    }

    .hex-btn-label[b-w52xdh0ghp] {
        font-size: 0.72rem;
    }

    .hud-card[b-w52xdh0ghp] {
        padding: 1.25rem 1.25rem 1.1rem;
    }

    .dashboard-panel[b-w52xdh0ghp] {
        padding: 1.25rem 1rem 1.75rem;
    }
}

/* Even at the 420px breakpoint above, a 3-hex row (78px×3 + 10px×2 gaps = 254px) plus the
   even-row's 44px interlocking offset totals 298px — measured to sit flush against the edge of a
   320-338px-wide phone viewport once .dashboard-panel's own padding is added back in, with no
   margin to spare. Scale hex size/offset down further so the same interlocking layout has real
   headroom on the narrowest phones still in common use (e.g. iPhone SE, 320px). */
@media (max-width: 340px) {
    .hex-btn[b-w52xdh0ghp] {
        width: 64px;
        height: 74px;
    }

    .hex-row[b-w52xdh0ghp] {
        gap: 8px;
    }

    .hex-row + .hex-row[b-w52xdh0ghp] {
        margin-top: -19px;
    }

    .hex-row:nth-child(even)[b-w52xdh0ghp] {
        margin-left: 36px;
    }

    .hex-btn-label[b-w52xdh0ghp] {
        font-size: 0.64rem;
    }
}
/* /Shared/MainLayout.razor.rz.scp.css */
.page[b-shezg8p49l] {
    position: relative;
    display: flex;
    flex-direction: column;
    /* At the mobile breakpoint (.sidebar/main stack in a column below), nothing else pins this to
       the viewport's height — .sidebar's own height:100vh (set below, desktop-only) is what
       incidentally made the desktop row layout viewport-tall. Without this, .page (and therefore
       main -> article -> .dashboard-panel, all flex:1 stretching each other) is only as tall as
       its content, so a dashboard shorter than the screen left the page's white background
       showing below it. */
    min-height: 100vh;
}

main[b-shezg8p49l] {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* <article> is main's only child, so stretching it to fill main's full height (rather than main's
   natural content height, which is all a plain block child would otherwise take) is safe for
   every page, dashboard or not — there's no sibling for a flex item's non-collapsing margins to
   affect. This also gives <article> a *definite* height (a flex item's stretched size counts as
   definite per spec), which is what lets .dashboard-panel below resolve `min-height: 100%`
   against it — a plain block child of a non-flex parent can't do that when the parent's height is
   auto. An earlier version instead turned <article> into its own column flex container (scoped
   with `:has(.dashboard-panel)`) and stretched the panel via `flex: 1`; that rendered correctly in
   every desktop browser tested but left the dashboard's white margin uncorrected on a real iPhone
   (confirmed not a caching issue — reproduced in a fresh private tab), most likely because that
   iOS Safari version doesn't support :has(). Percentage-height-on-a-definite-height-flex-item has
   been correctly supported far longer, so this version drops :has() entirely. */
.content[b-shezg8p49l] {
    flex: 1;
    min-height: 0;
}

.sidebar[b-shezg8p49l] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-shezg8p49l] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-shezg8p49l]  a, .top-row[b-shezg8p49l]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-shezg8p49l]  a:hover, .top-row[b-shezg8p49l]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-shezg8p49l]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row:not(.auth)[b-shezg8p49l] {
        display: none;
    }

    .top-row.auth[b-shezg8p49l] {
        justify-content: space-between;
    }

    .top-row[b-shezg8p49l]  a, .top-row[b-shezg8p49l]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-shezg8p49l] {
        flex-direction: row;
    }

    .sidebar[b-shezg8p49l] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
        /* A sticky box is its own stacking context: without an explicit z-index the logout confirm
           overlay inside it (z-index 1060) would still be painted UNDER positioned content of main
           (for example item cards), leaving the dialog half hidden and the page unusable. */
        z-index: 1050;
    }

    .top-row[b-shezg8p49l] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-shezg8p49l]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-shezg8p49l], article[b-shezg8p49l] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}
/* /Shared/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-imnwgeb51m] {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-row[b-imnwgeb51m] {
    height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-imnwgeb51m] {
    font-size: 1.1rem;
}

.oi[b-imnwgeb51m] {
    width: 2rem;
    font-size: 1.1rem;
    vertical-align: text-top;
    top: -2px;
}

.nav-item[b-imnwgeb51m] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-imnwgeb51m] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-imnwgeb51m] {
        padding-bottom: 1rem;
    }

    .nav-item[b-imnwgeb51m]  a {
        color: #d7d7d7;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
    }

.nav-item[b-imnwgeb51m]  a.active {
    background-color: rgba(255,255,255,0.25);
    color: white;
}

.nav-item[b-imnwgeb51m]  a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

@media (min-width: 641px) {
    .navbar-toggler[b-imnwgeb51m] {
        display: none;
    }

    .collapse[b-imnwgeb51m] {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}
