:root {
    --bg: #f4efe7;
    --panel: #fffaf2;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #dbcdb7;
    --accent: #bf5a36;
    --accent-dark: #7f341c;
    --sidebar: linear-gradient(180deg, #1f2937 0%, #2d3748 100%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(191, 90, 54, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(31, 41, 55, 0.12), transparent 24%),
        var(--bg);
    color: var(--ink);
}

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

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: var(--sidebar);
    color: #f8fafc;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f4c95d, #bf5a36);
    color: #1f2937;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
}

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

.nav {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav a {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-chip {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.content {
    padding: 34px;
}

.page-head,
.panel-head,
.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

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

.metric-grid,
.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0 28px;
}

.metric-card,
.panel,
.group-card,
.hero-card {
    border: 1px solid var(--line);
    background: rgba(255, 250, 242, 0.86);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(31, 41, 55, 0.08);
}

.metric-card {
    padding: 20px;
}

.metric-card span {
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}

.metric-card strong {
    font-size: 32px;
}

.panel {
    padding: 22px;
    margin-bottom: 20px;
}

.form-panel form,
.inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

label span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

input,
textarea,
select,
button {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    font: inherit;
}

textarea {
    resize: vertical;
    min-height: 160px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), #d97745);
    color: #fff;
    border: none;
    cursor: pointer;
}

.ghost-btn {
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.wide-field {
    grid-column: 1 / -1;
}

.session-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.group-card {
    overflow: hidden;
}

.group-card img,
.hero-media img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.group-meta {
    padding: 18px;
}

.hero-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    overflow: hidden;
    margin-bottom: 22px;
}

.hero-info {
    padding: 24px;
}

.status-note {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
}

.status-note.captcha,
.status-note.blocked,
.status-note.partial,
.status-note.error {
    background: rgba(191, 90, 54, 0.08);
    border-color: rgba(191, 90, 54, 0.25);
    color: var(--accent-dark);
}

.status-note.success {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.22);
    color: #205b2b;
}

.tight-text {
    word-break: break-all;
}

.thumb-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #d5c6ae, #f2e9db);
    color: #7c6f5a;
    min-height: 220px;
}

.thumb-placeholder.large {
    min-height: 100%;
}

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

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

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

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

.timeline-item {
    border-left: 3px solid var(--accent);
    padding-left: 14px;
}

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

.login-panel {
    width: min(520px, calc(100% - 32px));
    padding: 36px;
    border-radius: 28px;
    background: rgba(255, 250, 242, 0.9);
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(31, 41, 55, 0.12);
}

.wide-btn {
    margin-top: 20px;
}

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

    .sidebar {
        padding: 20px;
        gap: 18px;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px;
    }
}
