/* Console shell: the sidebar and the page, like the admin app; on a phone the sidebar is a bar on top. */

.console-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.console-side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 26px 18px;
    border-right: 1px solid var(--rv-line-soft);
    background: rgba(7, 20, 30, .35);
    backdrop-filter: blur(20px);
}

.console-logo { font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.console-logo b { font-weight: 500; font-size: 9px; letter-spacing: .22em; color: #92aebf; margin-left: 5px; }

.console-nav { display: grid; gap: 2px; }
.console-nav a, .console-account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--rv-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--rv-muted);
}
.console-nav .rv-icon, .console-account .rv-icon { width: 17px; height: 17px; flex: none; opacity: .85; }
.console-nav a.active, .console-account.active { background: rgba(190, 217, 233, .14); color: var(--rv-text); }
.console-account { margin-top: auto; min-width: 0; }
.console-account > span { display: grid; min-width: 0; }
.console-account b, .console-account .rv-tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (hover: hover) {
    .console-nav a:hover, .console-account:hover { background: rgba(190, 217, 233, .08); color: var(--rv-text); }
}

.console-main { padding: 34px clamp(16px, 4vw, 48px) 80px; min-width: 0; }
.console-narrow { max-width: 440px; margin: 8vh auto 0; }
.console-page-narrow { max-width: 640px; }

/* ---------- page furniture ---------- */

.console-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.console-head p.rv-small { max-width: 620px; }
.console-table-wrap { overflow-x: auto; }
.console-row-title { font-weight: 600; }
.console-row-title .rv-pill { margin-left: 6px; }
.console-row-actions { justify-content: flex-end; flex-wrap: wrap; }
.console-nowrap { white-space: nowrap; }
.console-code { display: block; color: var(--rv-faint); }
.console-pager { display: flex; justify-content: center; padding: 12px 16px; border-top: 1px solid var(--rv-line-soft); }

.console-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.console-openable { cursor: pointer; }
.console-changes td { background: rgba(190, 217, 233, .04); }
.console-changes dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 13px; }
.console-changes dt { color: var(--rv-muted); }
.console-changes dd { margin: 0; }

@media (max-width: 760px) {
    .console-shell { grid-template-columns: 1fr; }
    .console-side {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 14px;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--rv-line-soft);
    }
    .console-nav { grid-auto-flow: column; }
    .console-account { margin: 0 0 0 auto; }
    .console-account > span { display: none; }
    .console-main { padding-top: 22px; }

    /* each row of a table is a card */
    .rv-table.console-row-cards, .console-row-cards tbody { display: block; }
    .console-row-cards thead { display: none; }
    .console-row-cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 16px; border-bottom: 1px solid var(--rv-line-soft); }
    .console-row-cards tr:last-child { border-bottom: 0; }
    .console-row-cards td { display: block; padding: 0; border: 0; }
    .console-row-cards td.console-row-title { flex-basis: 100%; }
    .console-row-cards .console-row-actions { justify-content: flex-start; }
}
