:root {
    --tw-blue: #0b63ce;
    --tw-blue-dark: #084a9a;
    --tw-blue-soft: #e8f1ff;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --ink: #172033;
    --muted: #65728a;
    --line: #dbe3ef;
    --success: #16865f;
    --shadow: 0 18px 45px rgba(20, 38, 72, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 24px;
    background: #10233f;
    color: #ffffff;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--tw-blue);
    font-weight: 800;
}

.brand strong {
    display: block;
    font-size: 18px;
}

.brand small,
.sidebar-footer span,
.sidebar-footer small {
    color: #b9c7da;
}

.brand small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    color: #dce6f5;
    text-decoration: none;
    font-weight: 700;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
    background: rgba(11, 99, 206, 0.24);
    color: #ffffff;
}

.sidebar-nav a.is-active {
    box-shadow: inset 3px 0 0 var(--tw-blue);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-footer span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.workspace {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
}

.topbar {
    min-height: 92px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 22px 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--tw-blue);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 28px;
}

h2 {
    max-width: 760px;
    margin-bottom: 12px;
    font-size: 34px;
    line-height: 1.16;
}

h3 {
    margin-bottom: 0;
    font-size: 18px;
}

.topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #cfe0f7;
    border-radius: 8px;
    background: var(--tw-blue-soft);
    color: var(--tw-blue-dark);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
}

.main-content {
    display: grid;
    gap: 22px;
    align-content: start;
    padding: 28px 32px 36px;
}

.hero-panel,
.panel,
.info-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: stretch;
    padding: 28px;
}

.hero-copy p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.hero-card {
    display: grid;
    align-content: center;
    gap: 9px;
    padding: 20px;
    border: 1px solid #d7e5f8;
    border-radius: 8px;
    background: var(--surface-soft);
}

.hero-card span,
.info-card span,
.panel-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-card strong {
    color: var(--tw-blue-dark);
    font-size: 22px;
    line-height: 1.2;
}

.hero-card small {
    color: var(--muted);
    line-height: 1.5;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.info-card {
    display: grid;
    gap: 9px;
    padding: 18px;
}

.info-card strong {
    font-size: 25px;
    color: var(--tw-blue-dark);
}

.info-card p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.45;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 18px;
}

.panel {
    padding: 20px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline div {
    padding-left: 16px;
    border-left: 3px solid var(--tw-blue);
}

.timeline strong {
    display: block;
    margin-bottom: 4px;
}

.timeline p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.5;
}

.status-panel {
    background: var(--surface-soft);
}

.status-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.status-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.status-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.status-list dt {
    color: var(--muted);
    font-weight: 700;
}

.status-list dd {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
    text-align: right;
}

.notice {
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-weight: 700;
}

.notice.success {
    border-color: #bfe5d4;
    background: #edf9f4;
    color: #0f6b4a;
}

.notice.error {
    border-color: #f1c3c3;
    background: #fff1f1;
    color: #9f1d1d;
}

.button {
    appearance: none;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    background: var(--tw-blue);
    color: #ffffff;
}

.button.primary:hover {
    background: var(--tw-blue-dark);
}

.button.secondary,
.button.tiny {
    border-color: var(--line);
    background: #eef4fc;
    color: var(--ink);
}

.button.tiny {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

.button-group,
.form-actions,
.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.data-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.tag {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--tw-blue-soft);
    color: var(--tw-blue-dark);
    font-size: 12px;
    font-weight: 800;
}

.empty-state {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
}

.empty-state p {
    margin-bottom: 0;
    color: var(--muted);
}

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

.form-grid label {
    display: grid;
    gap: 8px;
}

.form-grid label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
}

.form-grid input,
.form-grid select {
    min-height: 42px;
    padding: 0 12px;
}

.form-grid textarea {
    min-height: 112px;
    padding: 12px;
    resize: vertical;
}

.full {
    grid-column: 1 / -1;
}

.form-actions {
    justify-content: flex-end;
}

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

.detail-grid div,
.detail-block {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 14px;
}

.detail-grid dt,
.detail-block span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-grid dd {
    margin: 0;
    font-weight: 800;
}

.detail-block {
    margin-top: 12px;
}

.detail-block p {
    margin-bottom: 0;
    color: var(--ink);
    line-height: 1.55;
}

@media (max-width: 1120px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-panel,
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 18px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-footer {
        display: none;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .main-content {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 27px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

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

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .button {
        flex: 1;
    }
}

@media (max-width: 460px) {
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .panel,
    .info-card {
        padding: 16px;
    }
}
