/* ==================================================================
   top-nav.css  –  TopNavMenu.razor (prefix tn-)
   Same look as the newer pages: white bar, brand blue, grey pill buttons.
   ================================================================== */

.tn {
    --tn-brand: #3169b1;
    --tn-ink: #1c2430;
    --tn-ink-soft: #5b6675;
    --tn-line: #dde2e8;
    --tn-soft: #eef3fa;
    margin-bottom: 1rem;
    padding: 0.55rem 0;
    background: #fff;
    border-bottom: 1px solid var(--tn-line);
    box-shadow: 0 1px 3px rgba(15, 30, 55, 0.05);
}

.tn-inner {
    gap: 0.75rem;
}

.tn-brand {
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--tn-brand);
    text-decoration: none;
    white-space: nowrap;
}

    .tn-brand sup {
        font-size: 0.55em;
        font-weight: 500;
        top: -0.7em;
    }

    .tn-brand:hover {
        color: var(--tn-brand);
    }

.tn-brand {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0;
}

.tn-logo {
    display: block;
    height: 22px;
    width: auto;
}

@media (max-width: 575.98px) {
    .tn-logo {
        height: 20px;
    }
}

/* ---- Links ---- */
.tn-links {
    gap: 0.2rem;
}

.tn .tn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    color: var(--tn-ink-soft);
    font-weight: 500;
    font-size: 0.95rem;
}

    .tn .tn-link:hover {
        color: var(--tn-ink);
        background: #f3f5f8;
    }

    .tn .tn-link.active {
        color: var(--tn-brand);
        background: var(--tn-soft);
    }

/* ---- Right side ---- */
.tn-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.tn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.95rem;
    border: 1px solid #c5ccd6;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.12s, color 0.12s, background-color 0.12s;
}

    .tn-pill:hover {
        border-color: var(--tn-brand);
        color: var(--tn-brand);
    }

    .tn-pill.active {
        border-color: var(--tn-brand);
        background: var(--tn-soft);
        color: var(--tn-brand);
    }

.tn-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid #c5ccd6;
    border-radius: 50%;
    background: #fff;
    color: #4b5563;
    font-size: 1.1rem;
}

    .tn-avatar:hover,
    .tn-avatar[aria-expanded="true"] {
        border-color: var(--tn-brand);
        color: var(--tn-brand);
        background: var(--tn-soft);
    }

    .tn-pill:focus-visible,
    .tn-avatar:focus-visible,
    .tn .tn-link:focus-visible,
    .tn-toggler:focus-visible {
        outline: 2px solid var(--tn-brand);
        outline-offset: 2px;
        box-shadow: none;
    }

/* ---- Account menu ---- */
.tn-menu {
    min-width: 15rem;
    padding: 0.4rem;
    border: 1px solid var(--tn-line);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.14);
}

.tn-menu-head {
    display: flex;
    flex-direction: column;
    padding: 0.45rem 0.65rem 0.3rem;
}

.tn-menu-label {
    font-size: 0.72rem;
    color: var(--tn-ink-soft);
}

.tn-menu-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--tn-ink);
    overflow-wrap: anywhere;
}

.tn-menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--tn-ink);
}

    .tn-menu-item:hover,
    .tn-menu-item:focus {
        background: var(--tn-soft);
        color: var(--tn-brand);
    }

.tn-menu-out {
    color: #b42318;
}

    .tn-menu-out:hover,
    .tn-menu-out:focus {
        background: #fdecea;
        color: #b42318;
    }

/* ---- ☰ button (phones) ---- */
.tn-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid #c5ccd6;
    border-radius: 10px;
    color: var(--tn-ink);
    font-size: 1.4rem;
}

/* ---- Phones / small tablets: the menu opens as a panel under the bar ---- */
@media (max-width: 767.98px) {
    .tn-collapse {
        margin-top: 0.6rem;
        padding-top: 0.6rem;
        border-top: 1px solid var(--tn-line);
    }

    .tn .tn-link {
        width: 100%;
        padding: 0.6rem 0.8rem;
        border-radius: 10px;
    }

    .tn-right {
        flex-wrap: wrap;
        margin: 0.6rem 0 0.2rem;
        padding-top: 0.6rem;
        border-top: 1px solid var(--tn-line);
    }

    .tn-pill {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0.55rem 0.95rem;
    }

    /* Account menu: in the ☰ panel the person button sits on the left, so a menu aligned to its
       right edge opened off the screen. Here it opens in place, under the button, full width.
       (!important beats the position Bootstrap's script writes on the menu.) */
    .tn-user {
        width: 100%;
    }

        .tn-user .tn-menu {
            position: static !important;
            inset: auto !important;
            transform: none !important;
            width: 100%;
            min-width: 0;
            margin-top: 0.5rem !important;
            box-shadow: none;
        }
}

/* ==================================================================
   System page (SystemMenu.razor, prefix sys-)
   The tiles are es-tile (event-status.css) used as links.
   ================================================================== */

.sys-page {
    max-width: 720px;
    margin: 0 auto;
}

.sys-tile,
.sys-tile:hover,
.sys-tile:focus {
    text-decoration: none;
}

.sys-icon-admin {
    background: #fdf1dc !important;
    color: #9a5b00 !important;
}

.sys-admin {
    margin-left: 0.35rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: #fdf1dc;
    color: #9a5b00;
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: 0.1em;
}

/* ---- Auto-scheduler card ---- */
.sys-sched-card {
    margin-bottom: 1rem;
}

    .sys-sched-card .es-card-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

.sys-sched {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.sys-sched-text {
    margin: 0;
    font-size: 0.9rem;
    color: #5b6675;
}

.sys-sched-btn {
    flex-shrink: 0;
}

.sys-sched-msg {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e7a4f;
}

    .sys-sched-msg.is-bad {
        color: #b42318;
    }

@media (max-width: 575.98px) {
    .sys-sched {
        flex-direction: column;
        align-items: stretch;
    }

    .sys-sched-btn {
        justify-content: center;
    }
}

/* System menu: small group titles inside the Tools card */
.sys-page .sys-sub {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--es-ink-soft);
}

.sys-page .es-tiles + .sys-sub {
    margin-top: 1.1rem;
}

/* System menu heading: indigo band (X2) */
.sys-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    background: #dfe2f6;
    border: 1.5px solid #bfc5ec;
}

.sys-hero-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3b4aa0;
    color: #fff;
    font-size: 1.5rem;
}

.sys-hero-text {
    flex: 1;
    min-width: 0;
}

.sys-hero-kicker {
    margin: 0 0 0.1rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4c5596;
}

.sys-hero-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2a3a;
}

.sys-hero-lead {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: #4b5563;
}

/* System menu card headers (H2): white header, small indigo icon */
.sys-page .es-card-head {
    background: #fff;
}

.sys-card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.sys-card-icon {
    flex-shrink: 0;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dfe2f6;
    color: #3b4aa0;
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    .sys-hero {
        padding: 0.9rem 1rem;
        gap: 0.75rem;
    }

    .sys-hero-icon {
        width: 2.6rem;
        height: 2.6rem;
        font-size: 1.3rem;
    }

    .sys-hero-title {
        font-size: 1.35rem;
    }
}
