:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --ink: #18202a;
    --muted: #667085;
    --line: #d8dee7;
    --accent: #db8497;
    --accent-strong: #bf647a;
    --accent-soft: #fff2f5;
    --danger: #b42318;
    --ok-bg: #e9f7ef;
    --err-bg: #fff1f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
}

a {
    color: inherit;
}

.shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.auth-panel {
    min-height: calc(100vh - 96px);
    display: grid;
    align-content: center;
    grid-template-columns: minmax(0, 420px);
    gap: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1,
h2 {
    margin: 0;
    line-height: 1.18;
}

h1 {
    font-size: 34px;
}

h2 {
    font-size: 22px;
}

.muted,
.empty {
    color: var(--muted);
}

.form {
    display: grid;
    gap: 14px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 650;
}

input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
}

input:focus {
    outline: 3px solid rgba(219, 132, 151, 0.22);
    border-color: var(--accent);
}

button {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    background: var(--accent);
    color: #ffffff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

button:hover {
    background: var(--accent-strong);
}

.ghost {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.ghost:hover {
    background: #eef2f6;
}

.secondary-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.topbar,
.order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.alert-notice {
    background: var(--ok-bg);
}

.alert-error {
    background: var(--err-bg);
    color: var(--danger);
}

.status-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 5px solid #98a2b3;
    border-radius: 8px;
}

.status-panel h2 {
    font-size: 18px;
}

.status-panel .muted {
    margin: 7px 0 0;
}

.status-online {
    border-left-color: #12b76a;
}

.status-degraded {
    border-left-color: #f79009;
}

.status-offline {
    border-left-color: #d92d20;
}

.status-dot {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 999px;
    background: #98a2b3;
    box-shadow: 0 0 0 6px rgba(152, 162, 179, 0.16);
}

.status-online .status-dot {
    background: #12b76a;
    box-shadow: 0 0 0 6px rgba(18, 183, 106, 0.16);
}

.status-degraded .status-dot {
    background: #f79009;
    box-shadow: 0 0 0 6px rgba(247, 144, 9, 0.16);
}

.status-offline .status-dot {
    background: #d92d20;
    box-shadow: 0 0 0 6px rgba(217, 45, 32, 0.16);
}

.order-list,
.file-list,
.record-view,
.detail-panel,
.order-head {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-title span {
    color: var(--muted);
    font-weight: 750;
}

.order-row,
.file-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.order-row:first-of-type,
.file-row:first-of-type {
    border-top: 0;
}

.order-row:hover,
.file-row:hover {
    color: var(--accent);
}

.order-row span,
.file-row span {
    display: grid;
    gap: 4px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.pagination a,
.pagination span,
.pagination strong {
    min-width: 82px;
    text-align: center;
}

.pagination a {
    color: var(--accent);
    font-weight: 750;
    text-decoration: none;
}

.pagination span {
    color: var(--muted);
}

small,
dt {
    color: var(--muted);
}

.order-head dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    margin: 0;
}

.order-head dd {
    margin: 4px 0 0;
    font-weight: 750;
}

.backline {
    margin-bottom: 16px;
}

.backline a {
    color: var(--accent);
    font-weight: 750;
    text-decoration: none;
}

.file-list,
.record-view,
.detail-panel {
    margin-top: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-grid .detail-panel {
    margin-top: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0 0;
}

.info-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfcfd;
}

.info-grid dd {
    margin: 5px 0 0;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.product-list {
    display: grid;
    margin-top: 14px;
    border-top: 1px solid var(--line);
}

.product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.product-row strong {
    display: block;
}

.product-row small {
    display: block;
    margin-top: 4px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.product-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #8f3f54;
    font-weight: 750;
}

pre {
    max-height: 520px;
    overflow: auto;
    padding: 14px;
    background: #101828;
    color: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .shell {
        width: min(100% - 22px, 1080px);
        padding-top: 20px;
    }

    .topbar,
    .order-head,
    .order-row,
    .file-row,
    .product-row {
        display: grid;
    }

    .detail-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .product-meta {
        justify-content: flex-start;
    }

    .order-head dl {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 28px;
    }
}
