/* Data views run from the left edge; admin and account controls sit on the right. */
.navbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex: 0 0 var(--navbar-height);
    height: var(--navbar-height);
    padding: 0 16px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
}

.navbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-group-right {
    gap: 12px;
}

.navbar-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.navbar-link:hover {
    color: var(--text-primary);
}

.navbar-link.is-active {
    border-bottom-color: var(--accent);
    color: var(--text-primary);
}

.navbar-account {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.navbar-logout {
    padding: 4px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.navbar-logout:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* The database selector.
   Production is quiet chrome and anything else is marked, rather than the other way
   round: sitting in dev and forgetting is what produces confident conclusions from
   the wrong numbers. Colour never carries it alone -- the badge says the word. */
.navbar-database {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.navbar-database-select {
    padding: 3px 6px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.navbar-database-select:hover {
    border-color: var(--accent);
}

.navbar-database-flag {
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-0);
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.navbar-database.is-dev .navbar-database-select {
    border-color: var(--danger);
}

.navbar-database.is-dev .navbar-database-flag {
    border-color: var(--danger);
    background: var(--danger);
    color: var(--accent-ink);
}

/* On the bar itself, so it reads from across the room and not only if you go and
   look at the dropdown. Everything is border-box, so this does not move anything. */
.navbar.is-dev {
    border-bottom: 2px solid var(--danger);
}

/* The Purchases page's own tabs: the same underline language as the bar above,
   one level quieter so the two rows do not compete. */
.subnav {
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 36px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.subnav-link {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.subnav-link:hover {
    color: var(--text-primary);
}

.subnav-link.is-active {
    border-bottom-color: var(--accent);
    color: var(--text-primary);
}
