:root {
    --bg-start: #f8fbff;
    --bg-end: #f8fafc;
    --panel: rgba(255, 255, 255, 0.94);
    --panel-strong: #ffffff;
    --panel-soft: #f8fbff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg-start) 0%, #eef4ff 42%, var(--bg-end) 100%);
}

body.theme-admin {
    background: linear-gradient(180deg, #f6f8fc 0%, #edf2ff 40%, #f8fafc 100%);
}

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

a:hover {
    color: var(--primary-strong);
}

.shell {
    max-width: 1220px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.site-header,
.section-header,
.top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.site-header {
    margin-bottom: 18px;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brand-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-title,
.section-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}

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

.brand-subtitle,
.section-text {
    margin: 0;
    line-height: 1.7;
}

.main-nav,
.inline-actions,
.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-nav {
    justify-content: flex-end;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.hero-panel,
.card {
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-panel {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
    margin-bottom: 18px;
}

.hero-copy {
    flex: 1;
}

.hero-copy h1 {
    margin: 12px 0 10px;
    font-size: 32px;
    line-height: 1.2;
}

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

.hero-meta {
    min-width: 260px;
    display: grid;
    gap: 12px;
}

.hero-stat,
.metric-card,
.feature-item,
.quick-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.hero-stat strong,
.metric-card .value {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    line-height: 1.2;
}

.hero-stat span,
.metric-card .label,
.quick-card span {
    color: var(--muted);
    font-size: 13px;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card {
    padding: 22px;
}

.card h3,
.section-header h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.section-header {
    margin-bottom: 18px;
}

.grid,
.metric-grid,
.feature-list,
.quick-grid,
.page-grid {
    display: grid;
    gap: 16px;
}

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

.page-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
}

.feature-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 18px;
}

.feature-item strong {
    display: block;
    margin-bottom: 8px;
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card .label {
    display: block;
    font-weight: 600;
}

.metric-card small,
.quick-card strong {
    display: block;
    margin-top: 6px;
}

.quick-card {
    color: var(--text);
}

.quick-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.checkbox-inline input {
    width: auto;
}

.inline-form {
    margin: 0;
}

.action-cell {
    min-width: 180px;
}

.bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fbff;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-actions select {
    min-width: 220px;
}

.table-checkbox {
    width: auto;
    margin: 0;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

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

.data-table thead th {
    padding: 14px 16px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody td {
    padding: 16px;
    border-top: 1px solid #edf2f7;
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

textarea {
    resize: vertical;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

button:hover,
.button-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

button.secondary,
.button-link.secondary,
.btn-muted {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    box-shadow: 0 12px 24px rgba(100, 116, 139, 0.16);
}

button.danger,
.button-link.danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.18);
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.tag.success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.tag.warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.tag.danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.flash.success {
    background: #ecfdf5;
    color: #166534;
    border-color: #bbf7d0;
}

.flash.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.flash-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.88;
}

.empty-state,
.hint-panel {
    padding: 22px;
    border-radius: 18px;
    border: 1px dashed #cbd5e1;
    background: #f8fbff;
    color: var(--muted);
}

.clean-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer {
    padding-top: 10px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .site-header,
    .hero-panel,
    .section-header,
    .top {
        flex-direction: column;
    }

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

    .hero-meta {
        min-width: 0;
    }

    .bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }
}