/* One ink bar per screen: brand, who you are, where you are, the section links, the
   actions. Sticky rather than fixed, so the page needs no compensating top padding. */
.ink-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 1rem;
    padding: 0 1rem;
    min-height: 56px;
    background: var(--ink);
    color: #F3F4F6;
    border-bottom: 3px solid var(--amber);
}

.ink-bar-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #F3F4F6;
    text-decoration: none;
}

.ink-bar-brand:hover {
    color: #FFFFFF;
}

.operator-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    font-weight: 700;
}

.operator-chip .chip-label {
    font-family: var(--font-display);
    letter-spacing: 0.06em;
}

.operator-chip .chip-name {
    color: var(--green-on-ink);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ink-bar-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.ink-bar-links .nav-link {
    color: #F3F4F6;
    padding: 0 0.15rem;
}

.ink-bar-links .nav-link:hover {
    color: #FFFFFF;
}

.ink-bar-links .nav-link[aria-current="page"] {
    box-shadow: inset 0 -3px 0 var(--amber);
    font-weight: 700;
}

.ink-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.ink-bar .chip-hint {
    font-weight: 400;
    opacity: 0.8;
    white-space: nowrap;
}

.ink-bar .chip-logout {
    margin: 0;
    flex-shrink: 0;
}

/* Below 768px the links get their own full-width row and scroll sideways: a hamburger
   would hide every section behind an extra tap and needs Bootstrap's JS bundle, which this
   app deliberately does not ship. */
@media (max-width: 767.98px) {
    .ink-bar-links {
        order: 4;
        flex: 1 0 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.1rem;
    }

    .ink-bar-actions {
        order: 3;
    }

    .ink-bar {
        column-gap: 0.75rem;
        padding: 0 0.75rem;
    }
}

/* [F9] is a keyboard shortcut hint -- meaningless on a touchscreen, and dropping it is
   what keeps the first row of the bar on one line at phone widths. */
@media (max-width: 480px) {
    .ink-bar {
        font-size: 15px;
    }

    .ink-bar .chip-hint {
        display: none;
    }

    .ink-bar-brand {
        font-size: 22px;
    }
}

@media print {
    .ink-bar {
        display: none;
    }
}

/* Named away from Bootstrap's own .modal/.modal-backdrop -- those classes ship real rules
   (opaque fixed backdrop, display:none base state) that silently swallowed this dialog. */
.chip-switch-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chip-switch-backdrop[hidden] { display: none; }

.chip-switch-modal {
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    width: 100%;
    max-width: 20rem;
}

.chip-switch-modal h2 { margin-top: 0; }
.chip-switch-modal label { margin-top: 0.75rem; }

.switch-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
