:root {
    --bg: #f4efe6;
    --panel: #fffaf2;
    --ink: #15202b;
    --muted: #6f7b86;
    --accent: #0d5c63;
    --accent-2: #c97b63;
    --line: #d7c7b2;
    --good: #2c7a4b;
    --warn: #b7791f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(201, 123, 99, 0.18), transparent 28%),
        linear-gradient(180deg, #f6f1e8 0%, #efe5d6 100%);
    color: var(--ink);
    font-family: "Avenir Next", "PingFang SC", "Helvetica Neue", sans-serif;
}

a {
    color: var(--accent);
    text-decoration: none;
}

.shell-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(21, 32, 43, 0.08);
    background: rgba(255, 250, 242, 0.85);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
}

.shell-title,
h1,
h2 {
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
}

.eyebrow {
    margin: 0 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: var(--muted);
}

.shell-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.shell-main {
    padding: 2rem;
}

.metric-grid,
.split-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.split-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.metric-card,
.panel,
.login-card {
    background: var(--panel);
    border: 1px solid rgba(13, 92, 99, 0.12);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(21, 32, 43, 0.06);
    padding: 1.25rem;
}

.metric-main {
    font-size: 2rem;
    margin: 0.3rem 0;
}

.flash-stack {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: rgba(44, 122, 75, 0.12);
    border: 1px solid rgba(44, 122, 75, 0.15);
}

.flash.error {
    background: rgba(185, 28, 28, 0.08);
    border-color: rgba(185, 28, 28, 0.2);
}

.stack-form p {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--accent), #134074);
    color: #fff;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 0.75rem 0.45rem;
    border-bottom: 1px solid rgba(21, 32, 43, 0.08);
    text-align: left;
    vertical-align: top;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.detail-actions {
    display: flex;
    gap: 0.75rem;
}

.narrow-panel,
.login-card {
    max-width: 640px;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

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

@media (max-width: 720px) {
    .shell-header,
    .detail-header {
        flex-direction: column;
    }

    .shell-main {
        padding: 1rem;
    }
}
