﻿
/* ============================================================
   ZUNVI ATLAS — ADMIN REVIEW
   Design tokens inherited from app.css.
   Scope all selectors to Atlas administration components.
   ============================================================ */

.atlas-admin {
    padding-block: clamp(2.5rem, 6vw, 5.5rem) 6rem;
}

.atlas-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
}

    .atlas-admin-header h1 {
        font-family: "Manrope", sans-serif;
        font-size: clamp(2.4rem, 5vw, 4.6rem);
        font-weight: 600;
        letter-spacing: -.06em;
        line-height: 1.1;
        margin: .75rem 0 1rem;
    }

.atlas-admin-subtitle {
    max-width: 620px;
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 0;
}

.atlas-admin-counter {
    flex: 0 0 auto;
    min-width: 148px;
    padding: 1.4rem;
    text-align: center;
    border: 1px solid rgba(67,229,233,.25);
    border-radius: 18px;
    background: rgba(67,229,233,.045);
}

.atlas-counter-number,
.atlas-counter-label {
    display: block;
}

.atlas-counter-number {
    font-family: "Manrope", sans-serif;
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--cyan);
}

.atlas-counter-label {
    margin-top: .4rem;
    color: var(--muted);
    font-size: .76rem;
}

.atlas-workspace {
    padding-top: 3rem;
}

.atlas-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

    .atlas-section-heading h2 {
        font: 600 clamp(1.5rem, 3vw, 2rem) "Manrope", sans-serif;
        letter-spacing: -.04em;
        margin: .6rem 0;
    }

    .atlas-section-heading p:not(.kicker) {
        color: var(--muted);
        margin: 0;
    }

.atlas-refresh {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .65rem 1rem;
    text-decoration: none;
    color: var(--ink);
    font-size: .85rem;
}

    .atlas-refresh:hover {
        border-color: var(--cyan);
        color: var(--cyan);
    }

.atlas-queue-meta {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: .78rem;
}

.atlas-import-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.atlas-import-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 34% minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient( 140deg, rgba(16,35,54,.95), rgba(9,21,37,.98) );
    overflow: hidden;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

    .atlas-import-card:hover {
        transform: translateY(-3px);
        border-color: rgba(67,229,233,.38);
        box-shadow: 0 18px 40px rgba(0,0,0,.18);
    }

.atlas-card-visual {
    min-height: 310px;
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient( circle at 52% 44%, rgba(67,229,233,.16), transparent 45% ), linear-gradient(155deg, #10263a, #171936);
    border-right: 1px solid var(--line);
}

.atlas-visual-orbit {
    position: absolute;
    width: 185px;
    aspect-ratio: 1;
    border: 1px solid rgba(67,229,233,.18);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(67,229,233,.025), 0 0 0 58px rgba(67,229,233,.025);
}

.atlas-business-initial {
    position: relative;
    z-index: 1;
    color: rgba(217,245,255,.48);
    font: 500 5.5rem "Manrope", sans-serif;
}

.atlas-visual-caption {
    position: absolute;
    bottom: 1.2rem;
    left: .8rem;
    right: .8rem;
    text-align: center;
    font-size: .57rem;
    letter-spacing: .12em;
    color: var(--muted);
}

.atlas-card-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 1.4rem;
}

.atlas-card-topline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}

.atlas-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .71rem;
    color: #f7d498;
}

.atlas-status-dot {
    width: 7px;
    height: 7px;
    background: #efbc6a;
    border-radius: 50%;
}

.atlas-card-type {
    color: var(--muted);
    font-size: .57rem;
    letter-spacing: .13em;
}

.atlas-card-content h3 {
    font: 600 clamp(1.12rem, 2vw, 1.4rem) / 1.35 "Manrope", sans-serif;
    letter-spacing: -.025em;
    margin: 1.4rem 0 1rem;
    overflow-wrap: anywhere;
}

.atlas-card-source span {
    display: block;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
}

.atlas-card-source strong {
    display: block;
    margin-top: .35rem;
    font-size: .82rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.atlas-card-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin: 1.5rem 0 1rem;
}

    .atlas-card-facts dt {
        color: var(--muted);
        font-size: .68rem;
    }

    .atlas-card-facts dd {
        margin: .25rem 0 0;
        font-size: .76rem;
    }

.atlas-card-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .6rem;
    margin-top: auto;
    padding-bottom: 1rem;
}

.atlas-import-id {
    color: var(--muted);
    font-size: .7rem;
    font-family: monospace;
}

.atlas-source-link {
    color: var(--cyan);
    font-size: .74rem;
}

.atlas-review-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    text-decoration: none;
    border-radius: 11px;
    background: var(--cyan);
    color: #06141c;
    font-size: .82rem;
    font-weight: 700;
    transition: background .2s ease;
}

    .atlas-review-action:hover {
        background: #91f8fb;
    }

.atlas-message,
.atlas-empty-state {
    padding: 3rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
}

.atlas-message-error {
    border-color: rgba(255,120,120,.45);
}

.atlas-message p {
    margin: .5rem 0 0;
}

.atlas-empty-state {
    text-align: center;
}

.atlas-empty-symbol {
    display: block;
    color: var(--cyan);
    font-size: 3rem;
}

.atlas-empty-state h3 {
    margin: .7rem 0;
}

.atlas-empty-state p {
    color: var(--muted);
    max-width: 440px;
    margin-inline: auto;
}

.atlas-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2rem;
    color: var(--muted);
    font-size: .85rem;
}

    .atlas-pagination a {
        color: var(--cyan);
    }

@media (max-width: 1000px) {
    .atlas-import-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .atlas-admin-header,
    .atlas-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .atlas-admin-counter {
        align-self: flex-start;
    }

    .atlas-import-card {
        grid-template-columns: 1fr;
    }

    .atlas-card-visual {
        min-height: 190px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .atlas-visual-orbit {
        width: 135px;
    }

    .atlas-business-initial {
        font-size: 4rem;
    }

    .atlas-card-content {
        padding: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atlas-import-card,
    .atlas-review-action {
        transition: none;
    }

        .atlas-import-card:hover {
            transform: none;
        }
}

/* ============================================================
   IMPORT REVIEW WORKSPACE
   ============================================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.atlas-back {
    margin-bottom: 1.5rem;
}

    .atlas-back a {
        color: var(--muted);
    }

.atlas-state {
    padding: .5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.atlas-state-pending { color: var(--cyan); }
.atlas-state-approved { color: #ffd27a; }
.atlas-state-published { color: #8af0b0; }
.atlas-state-rejected { color: #ff9b9b; }

.atlas-message-success {
    border-color: rgba(138,240,176,.45);
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
}

.atlas-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.atlas-panel {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
}

    .atlas-panel h2 {
        font-family: "Manrope", sans-serif;
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

.atlas-table-scroll {
    overflow-x: auto;
}

.atlas-proposal-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: .92rem;
}

    .atlas-proposal-table th,
    .atlas-proposal-table td {
        padding: .75rem .6rem;
        border-top: 1px solid var(--line);
        text-align: left;
        vertical-align: top;
    }

    .atlas-proposal-table thead th {
        border-top: 0;
        color: var(--muted);
        font-size: .72rem;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    .atlas-proposal-table tbody th {
        font-weight: 600;
        white-space: nowrap;
    }

.atlas-evidence,
.atlas-field-note {
    display: block;
    margin-top: .25rem;
    color: var(--muted);
    font-size: .78rem;
}

.atlas-evidence {
    font-family: monospace;
}

.atlas-unknown {
    color: var(--muted);
    font-style: italic;
}

.atlas-field-status {
    display: inline-block;
    padding: .15rem .55rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .74rem;
    white-space: nowrap;
}

.atlas-field-status-proposed { color: var(--cyan); }
.atlas-field-status-needsreview { color: #ffd27a; }
.atlas-field-status-unknown { color: var(--muted); }

.atlas-blockers {
    margin: 1rem 0 0;
    padding: .9rem 1rem;
    border-left: 3px solid #ffd27a;
    background: rgba(255,210,122,.07);
}

.atlas-facts {
    margin: 0;
}

    .atlas-facts div {
        padding: .65rem 0;
        border-top: 1px solid var(--line);
    }

    .atlas-facts dt {
        color: var(--muted);
        font-size: .72rem;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    .atlas-facts dd {
        margin: .2rem 0 0;
        overflow-wrap: anywhere;
    }

.atlas-actions {
    margin-top: 1.5rem;
}

.atlas-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.atlas-actions form,
.atlas-publish-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
}

    .atlas-actions form h3 {
        margin: 0;
        font-size: 1.05rem;
    }

    .atlas-actions form p {
        margin: 0;
        color: var(--muted);
    }

.atlas-actions label {
    font-weight: 600;
}

.atlas-actions input,
.atlas-actions select,
.atlas-actions textarea {
    width: min(100%, 460px);
    padding: .65rem .8rem;
    border: 1px solid rgba(180,220,255,.3);
    border-radius: 10px;
    background: var(--night);
    color: var(--ink);
}

.atlas-button {
    margin-top: .4rem;
    padding: .7rem 1.2rem;
    border: 1px solid var(--cyan);
    border-radius: 999px;
    background: var(--cyan);
    color: #06141c;
    font-weight: 700;
    cursor: pointer;
}

    .atlas-button:hover {
        background: #91f8fb;
    }

.atlas-button-secondary {
    background: transparent;
    color: var(--ink);
    border-color: rgba(180,220,255,.4);
}

    .atlas-button-secondary:hover {
        background: rgba(180,220,255,.08);
    }

.atlas-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2rem;
}

    .atlas-tabs a {
        padding: .5rem 1rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--muted);
        text-decoration: none;
    }

        .atlas-tabs a:hover {
            color: var(--ink);
        }

        .atlas-tabs a[aria-current="page"] {
            border-color: var(--cyan);
            color: var(--cyan);
            font-weight: 600;
        }

.atlas-batch {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

    .atlas-batch p {
        margin: 0;
        color: var(--muted);
    }

        .atlas-batch p strong {
            color: var(--ink);
        }

.atlas-change-decision {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .atlas-review-layout,
    .atlas-action-grid {
        grid-template-columns: 1fr;
    }
}

/* Dawn (light) theme for the review workspace. Colours meet WCAG AA on
   white cards and the ivory page (docs/design/palette.md). */
html[data-theme="light"] .atlas-admin-counter { background: rgba(9, 113, 108, .05); border-color: rgba(9, 113, 108, .25); }
html[data-theme="light"] .atlas-import-card { background: #ffffff; box-shadow: 0 10px 30px rgba(28, 31, 63, .06); }
html[data-theme="light"] .atlas-import-card:hover { border-color: rgba(9, 113, 108, .45); box-shadow: 0 14px 34px rgba(28, 31, 63, .1); }
html[data-theme="light"] .atlas-card-visual { background: linear-gradient(145deg, #ece6f5, #dfefee); }
html[data-theme="light"] .atlas-visual-orbit { background: rgba(9, 113, 108, .04); border-color: rgba(9, 113, 108, .2); }
html[data-theme="light"] .atlas-business-initial { color: rgba(28, 31, 63, .35); }
html[data-theme="light"] .atlas-status,
html[data-theme="light"] .atlas-state-approved,
html[data-theme="light"] .atlas-field-status-needsreview { color: #8a5a00; }
html[data-theme="light"] .atlas-status-dot { background: #c77a12; }
html[data-theme="light"] .atlas-state-published { color: #1f7a45; }
html[data-theme="light"] .atlas-state-rejected { color: #b3261e; }
html[data-theme="light"] .atlas-blockers { color: #6b4700; border-left-color: #c77a12; background: rgba(201, 122, 18, .08); }
html[data-theme="light"] .atlas-message-error { border-color: rgba(179, 38, 30, .45); }
html[data-theme="light"] .atlas-message-success { border-color: rgba(31, 122, 69, .45); }
html[data-theme="light"] .atlas-review-action,
html[data-theme="light"] .atlas-button { color: #ffffff; }
html[data-theme="light"] .atlas-review-action:hover,
html[data-theme="light"] .atlas-button:hover { background: #075f5b; border-color: #075f5b; }
html[data-theme="light"] .atlas-actions input,
html[data-theme="light"] .atlas-actions select,
html[data-theme="light"] .atlas-actions textarea { background: #ffffff; border-color: rgba(28, 31, 63, .25); }
html[data-theme="light"] .atlas-button-secondary { border-color: rgba(28, 31, 63, .3); }
html[data-theme="light"] .atlas-button-secondary:hover { background: rgba(28, 31, 63, .05); }
