:root {
    --bg: #f4efe5;
    --paper: rgba(255, 252, 247, 0.9);
    --ink: #1f2a28;
    --muted: #5f6a67;
    --line: rgba(31, 42, 40, 0.12);
    --accent: #1d5c63;
    --accent-soft: #d4ebe4;
    --warn: #b44930;
    --warn-soft: #f5d7cf;
    --gold-soft: #f7ead2;
    --shadow: 0 22px 60px rgba(44, 38, 29, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Avenir Next", "Trebuchet MS", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(199, 139, 45, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(29, 92, 99, 0.12), transparent 26%),
        linear-gradient(180deg, #f9f3ea 0%, #f2ede3 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 42px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 28px;
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 249, 241, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.brand {
    font-family: Georgia, serif;
    font-size: 1.7rem;
    font-weight: 700;
}

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

.topnav,
.user-panel,
.detail-actions,
.hero-actions,
.pagination,
.section-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topnav a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(29, 92, 99, 0.08);
}

.content {
    display: grid;
    gap: 22px;
}

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

.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 26px;
    padding: 34px;
    overflow: hidden;
    position: relative;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -80px -90px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29, 92, 99, 0.16), transparent 68%);
}

.hero-panel.narrow {
    max-width: 900px;
    margin: 10vh auto 0;
}

.hero-copy h1,
.page-head h1,
.card h2 {
    margin: 0 0 10px;
    font-family: Georgia, serif;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

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

.button,
button,
select,
input,
textarea {
    font: inherit;
}

.button,
button {
    border: 0;
    cursor: pointer;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.button-muted {
    background: rgba(31, 42, 40, 0.08);
    color: var(--ink);
}

.stats-grid,
.dashboard-grid {
    display: grid;
    gap: 22px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
}

.stat-card {
    padding: 24px;
}

.stat-card p {
    margin: 0 0 10px;
    color: var(--muted);
}

.stat-card strong {
    font-size: 2.4rem;
    font-family: Georgia, serif;
}

.stat-sand {
    background: linear-gradient(135deg, rgba(247, 234, 210, 0.75), transparent);
}

.stat-blue {
    background: linear-gradient(135deg, rgba(212, 235, 228, 0.95), transparent);
}

.stat-rose {
    background: linear-gradient(135deg, rgba(245, 215, 207, 0.95), transparent);
}

.stat-mint {
    background: linear-gradient(135deg, rgba(215, 239, 228, 0.95), transparent);
}

.card {
    padding: 28px;
}

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

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

th,
td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.badge-draft {
    background: rgba(31, 42, 40, 0.08);
}

.badge-in_review {
    background: var(--gold-soft);
    color: #835203;
}

.badge-approved {
    background: var(--accent-soft);
    color: #16585e;
}

.badge-archived {
    background: rgba(95, 106, 103, 0.14);
    color: #43514d;
}

.status-stack,
.timeline,
.deadline-list {
    display: grid;
    gap: 12px;
}

.status-row,
.timeline-item,
.deadline-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.66);
}

.deadline-item strong,
.timeline-item span {
    color: var(--muted);
}

.divider {
    height: 1px;
    margin: 24px 0;
    background: var(--line);
}

.filters-grid,
.form-grid,
.meta-grid {
    display: grid;
    gap: 18px;
}

.filters-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end;
}

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

.form-card .button,
.form-grid .button {
    width: fit-content;
}

.field-row {
    display: grid;
    gap: 8px;
}

.field-row label {
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(31, 42, 40, 0.14);
    background: rgba(255, 255, 255, 0.75);
}

.checkbox-row {
    display: flex;
    align-items: center;
}

.checkbox-row label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 500;
}

.message,
.error-note {
    padding: 14px 16px;
    border-radius: 18px;
}

.messages {
    display: grid;
    gap: 10px;
}

.message-success {
    background: var(--accent-soft);
}

.message-info {
    background: rgba(31, 42, 40, 0.08);
}

.message-error,
.error-note {
    background: var(--warn-soft);
    color: #83301d;
}

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

.meta-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-form {
    display: flex;
    gap: 12px;
}

.status-form select {
    flex: 1;
}

.overdue-mark {
    display: inline-flex;
    margin-left: 8px;
    color: var(--warn);
    font-size: 0.85rem;
    font-weight: 700;
}

.link-line {
    color: var(--accent);
    font-weight: 700;
}

@media (max-width: 920px) {
    .topbar,
    .hero-panel,
    .section-head,
    .dashboard-grid,
    .topnav,
    .user-panel,
    .hero-actions,
    .detail-actions,
    .status-form {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid,
    .dashboard-grid,
    .filters-grid,
    .form-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .page-shell {
        width: min(100% - 20px, 1180px);
    }

    .topbar,
    .hero-panel,
    .card {
        padding: 22px;
        border-radius: 24px;
    }
}
