:root {
    --bg: #f5efe4;
    --bg-soft: #fffaf3;
    --surface: #ffffff;
    --surface-strong: #19352b;
    --text: #1b261f;
    --muted: #5f6f66;
    --primary: #1f7a5a;
    --primary-dark: #12563f;
    --accent: #e3a93b;
    --border: rgba(27, 38, 31, 0.12);
    --danger: #b64d4d;
    --radius: 24px;
    --shadow: 0 24px 60px rgba(18, 33, 27, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(227, 169, 59, 0.22), transparent 32%),
        linear-gradient(180deg, #f8f2e8 0%, #f4efe7 100%);
}

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

main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.landing-shell,
.member-shell,
.lesson-shell,
.auth-shell,
.admin-shell {
    min-height: 100vh;
}

.hero-card,
.feature-card,
.metric-card,
.form-card,
.content-card,
.product-card,
.table-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.auth-panel,
.member-header,
.admin-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-card {
    padding: 28px;
    margin-top: 24px;
}

.hero-actions,
.inline-actions,
.lesson-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(31, 122, 90, 0.12);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-secondary {
    background: var(--surface-strong);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
}

.feature-grid,
.stats-grid,
.report-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

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

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

.feature-card,
.metric-card,
.content-card,
.product-card,
.form-card {
    padding: 20px;
}

.metric-card strong {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.auth-panel {
    width: min(860px, 100%);
    margin: 0 auto;
    padding-top: 24px;
}

.form-card {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 12px 14px;
    background: #fff;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--muted);
}

.member-header,
.admin-header {
    margin-top: 12px;
    margin-bottom: 20px;
}

.product-list,
.stack-list {
    display: grid;
    gap: 18px;
}

.product-top,
.module-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.progress-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(31, 122, 90, 0.12);
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.module-stack,
.attachment-list,
.plain-list,
.lesson-list {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.module-card,
.comment-card {
    padding: 16px;
    border-radius: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.lesson-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border);
}

.lesson-current,
.lesson-item.lesson-current {
    border-color: rgba(31, 122, 90, 0.35);
    background: rgba(31, 122, 90, 0.08);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(31, 122, 90, 0.12);
}

.status-pending {
    background: rgba(227, 169, 59, 0.2);
}

.status-approved,
.status-active {
    background: rgba(31, 122, 90, 0.14);
}

.status-blocked,
.status-rejected,
.status-spam {
    background: rgba(182, 77, 77, 0.14);
}

.lesson-shell,
.admin-shell {
    display: grid;
    gap: 20px;
}

.lesson-sidebar,
.admin-sidebar {
    background: #163329;
    color: #fff;
    padding: 24px;
    border-radius: 28px;
}

.admin-sidebar nav,
.sidebar-course {
    display: grid;
    gap: 10px;
}

.admin-sidebar a {
    color: rgba(255, 255, 255, 0.78);
    padding: 10px 12px;
    border-radius: 14px;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.comment-thread {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.reply {
    margin-left: 18px;
}

.breadcrumb,
.subtitle,
.sidebar-module {
    color: var(--muted);
}

.table-card {
    overflow: auto;
}

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

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

.doc-link {
    display: block;
}

.alert {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(31, 122, 90, 0.12);
    border: 1px solid rgba(31, 122, 90, 0.2);
}

@media (min-width: 900px) {
    .hero-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }

    .lesson-shell {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .admin-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}
