* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-soft: #fafbfc;

    --border: #e3e5e8;
    --border-dark: #d4d6da;

    --text: #17191d;
    --text-secondary: #6f737b;
    --text-muted: #92969e;

    --dark: #111214;
    --dark-soft: #25272b;

    --radius: 8px;
}


body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);

    -webkit-font-smoothing: antialiased;
}


button,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


/* =========================
   APP
========================= */

.app {
    min-height: 100vh;
    display: flex;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 238px;

    background: var(--dark);
    color: white;

    padding: 24px 16px;

    display: flex;
    flex-direction: column;

    flex-shrink: 0;
}


.brand {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 0 9px 28px;
}


.brand-mark {
    width: 36px;
    height: 36px;

    border-radius: 8px;

    background: white;
    color: var(--dark);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: 800;
}


.brand-name {
    font-size: 13px;
    font-weight: 800;

    letter-spacing: .8px;
}


.brand-subtitle {
    margin-top: 2px;

    color: #777b83;

    font-size: 9px;
}


.nav {
    display: flex;
    flex-direction: column;

    gap: 5px;
}


.nav-item {
    height: 38px;

    padding: 0 11px;

    border-radius: 7px;

    color: #92959d;

    text-decoration: none;

    display: flex;
    align-items: center;

    gap: 10px;

    font-size: 11px;
    font-weight: 600;
}


.nav-item:hover {
    background: #1d1f22;
    color: white;
}


.nav-item.active {
    background: var(--dark-soft);
    color: white;
}


.nav-icon {
    width: 16px;

    text-align: center;

    font-size: 12px;
}


.sidebar-bottom {
    margin-top: auto;

    padding: 12px 9px 4px;
}


.system-status {
    display: flex;
    align-items: center;

    gap: 7px;

    color: #7e828a;

    font-size: 9px;
}


.status-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #5dce87;
}


/* =========================
   MAIN
========================= */

.main {
    flex: 1;
    min-width: 0;
}


/* =========================
   TOP BAR
========================= */

.topbar {
    height: 82px;

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.page-heading h1 {
    font-size: 20px;
    line-height: 1;

    font-weight: 700;
}


.page-heading p {
    margin-top: 7px;

    color: var(--text-secondary);

    font-size: 11px;
}


.pending-badge {
    display: flex;
    align-items: center;

    gap: 5px;

    padding: 8px 11px;

    background: var(--surface-soft);

    border: 1px solid var(--border);

    border-radius: 7px;

    color: var(--text-secondary);

    font-size: 10px;
}


.pending-badge span:first-child {
    color: var(--text);

    font-weight: 700;
}


/* =========================
   CONTENT
========================= */

.content {
    display: grid;

    grid-template-columns: 270px minmax(0, 1fr);

    min-height: calc(100vh - 82px);
}


/* =========================
   BATCH PANEL
========================= */

.batch-panel {
    background: var(--surface-soft);

    border-right: 1px solid var(--border);

    padding: 25px 16px;
}


.section-header h2 {
    font-size: 12px;

    font-weight: 700;
}


.section-header p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 10px;
}


/* Batch card */

.batch-card {
    width: 100%;

    margin-top: 18px;

    padding: 14px;

    text-align: left;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 8px;

    color: var(--text);

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}


.batch-card:hover {
    border-color: #c5c8cd;
}


.batch-card.selected {
    border-color: #b7bac0;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, .04);
}


.batch-card-top {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 10px;
}


.batch-id {
    font-size: 10px;

    font-weight: 700;

    line-height: 1.4;

    word-break: break-word;
}


.batch-meta {
    margin-top: 5px;

    color: var(--text-muted);

    font-size: 9px;
}


.status-pill {
    flex-shrink: 0;

    padding: 4px 6px;

    border-radius: 4px;

    background: #f0f1f3;

    color: #64676e;

    font-size: 7px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .35px;
}


.batch-summary {
    margin-top: 12px;

    display: flex;

    align-items: center;

    gap: 5px;

    color: var(--text-secondary);

    font-size: 8px;
}


.separator {
    color: #c2c4c8;
}


/* =========================
   REVIEW PANEL
========================= */

.review-panel {
    width: 100%;

    max-width: 1120px;

    padding: 28px 34px 40px;
}


.review-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}


.eyebrow {
    color: var(--text-muted);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.2px;
}


.review-header h2 {
    margin-top: 5px;

    font-size: 17px;

    line-height: 1.2;

    font-weight: 700;
}


.review-header p {
    max-width: 600px;

    margin-top: 6px;

    color: var(--text-secondary);

    font-size: 10px;

    line-height: 1.5;
}


.review-status {
    flex-shrink: 0;

    padding: 6px 8px;

    border: 1px solid var(--border);

    border-radius: 5px;

    color: #676b72;

    font-size: 7px;

    font-weight: 800;

    letter-spacing: .4px;

    white-space: nowrap;
}


/* =========================
   PREVIEW
========================= */

.preview-section {
    margin-top: 25px;
}


.preview-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;
}


.preview-header h3 {
    font-size: 12px;

    font-weight: 700;
}


.preview-header p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 9px;
}


.secondary-btn {
    flex-shrink: 0;

    background: white;

    border: 1px solid var(--border-dark);

    border-radius: 6px;

    padding: 7px 10px;

    color: #33363b;

    font-size: 9px;

    font-weight: 600;

    transition:
        background .15s ease,
        border-color .15s ease;
}


.secondary-btn:hover {
    background: #f8f8f9;

    border-color: #bfc1c6;
}


/* Actual preview container */

.preview {
    margin-top: 11px;

    padding: 15px;

    background: #e1e2e5;

    border: 1px solid #d6d7da;

    border-radius: 8px;

    position: relative;

    min-height: 300px;

    display: flex;

    align-items: center;
    justify-content: center;
}


.preview img {
    display: block;

    width: 100%;

    height: auto;

    max-height: 600px;

    object-fit: contain;

    background: white;

    border: 1px solid #d3d4d7;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, .05);
}


.preview-error {
    display: none;

    color: #777b82;

    font-size: 11px;
}


/* =========================
   PRODUCTION SLOTS
========================= */

.slots-section {
    margin-top: 23px;
}


.section-title {
    margin-bottom: 9px;

    color: var(--text);

    font-size: 11px;

    font-weight: 700;
}


.slot-list {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 7px;
}


.slot-row {
    min-height: 55px;

    padding: 10px 11px;

    display: flex;

    align-items: center;

    gap: 10px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 7px;
}


.slot-number {
    width: 25px;
    height: 25px;

    flex-shrink: 0;

    border-radius: 5px;

    background: #f1f2f4;

    color: #777a81;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 8px;

    font-weight: 800;
}


.slot-info {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 4px;
}


.slot-info strong {
    font-size: 9px;

    line-height: 1.3;

    font-weight: 700;
}


.slot-info span {
    color: var(--text-muted);

    font-size: 8px;
}


/* =========================
   DETAILS
========================= */

.details-section {
    margin-top: 22px;
}


.details-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    background: white;

    border: 1px solid var(--border);

    border-radius: 7px;

    overflow: hidden;
}


.detail {
    min-height: 55px;

    padding: 10px 12px;

    border-right: 1px solid var(--border);

    border-bottom: 1px solid var(--border);
}


.detail:nth-child(3n) {
    border-right: none;
}


.detail:nth-last-child(-n + 3) {
    border-bottom: none;
}


.detail span {
    display: block;

    color: var(--text-muted);

    font-size: 7px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .5px;
}


.detail strong {
    display: block;

    margin-top: 5px;

    color: var(--text);

    font-size: 9px;

    font-weight: 700;
}


/* =========================
   NOTE
========================= */

.note-section {
    margin-top: 21px;
}


.note-section label {
    display: block;

    margin-bottom: 7px;

    font-size: 10px;

    font-weight: 700;
}


textarea {
    display: block;

    width: 100%;

    min-height: 72px;

    resize: vertical;

    padding: 10px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 7px;

    color: var(--text);

    font-size: 9px;

    outline: none;
}


textarea::placeholder {
    color: #a0a3aa;
}


textarea:focus {
    border-color: #b5b8bd;
}


.note-help {
    margin-top: 5px;

    color: var(--text-muted);

    font-size: 8px;
}


/* =========================
   ACTIONS
========================= */

.actions {
    margin-top: 16px;

    display: flex;

    justify-content: flex-end;

    gap: 8px;
}


.reject-btn,
.approve-btn {
    min-width: 86px;

    padding: 8px 12px;

    border-radius: 6px;

    font-size: 9px;

    font-weight: 700;
}


.reject-btn {
    background: white;

    border: 1px solid var(--border-dark);

    color: #41444a;
}


.reject-btn:hover {
    background: #f8f8f9;
}


.approve-btn {
    background: var(--dark);

    border: 1px solid var(--dark);

    color: white;
}


.approve-btn:hover {
    background: #292b2f;
}


/* =========================
   MESSAGE
========================= */

.message {
    min-height: 16px;

    margin-top: 9px;

    text-align: right;

    color: var(--text-secondary);

    font-size: 9px;
}


/* =========================
   DEMO NOTICE
========================= */

.demo-notice {
    margin-top: 13px;

    padding-top: 11px;

    border-top: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 6px;

    color: var(--text-muted);

    font-size: 8px;
}


.demo-dot {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #b2b4b9;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .sidebar {
        width: 210px;
    }

    .content {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .review-panel {
        padding: 25px;
    }

}


@media (max-width: 760px) {

    .sidebar {
        display: none;
    }

    .content {
        display: block;
    }

    .batch-panel {
        border-right: none;

        border-bottom: 1px solid var(--border);
    }

    .review-panel {
        max-width: none;

        padding: 22px 18px 35px;
    }

    .topbar {
        padding: 0 18px;
    }

    .slot-list {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 520px) {

    .topbar {
        height: auto;

        min-height: 78px;

        padding-top: 15px;
        padding-bottom: 15px;

        gap: 12px;
    }

    .topbar,
    .review-header {
        align-items: flex-start;
    }

    .pending-badge {
        display: none;
    }

    .review-header {
        flex-direction: column;
    }

    .review-status {
        align-self: flex-start;
    }

    .preview {
        padding: 7px;

        min-height: 180px;
    }

    .details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail:nth-child(3n) {
        border-right: 1px solid var(--border);
    }

    .detail:nth-child(even) {
        border-right: none;
    }

    .detail:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--border);
    }

    .detail:nth-last-child(-n + 2) {
        border-bottom: none;
    }

    .actions {
        justify-content: stretch;
    }

    .reject-btn,
    .approve-btn {
        flex: 1;
    }

}