:root {
    --primary: #0d6efd;
    --warning: #ffc107;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --text: #0f172a;
    --text-soft: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 24px 60px rgba(13, 110, 253, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
}

[data-theme="dark"] {
    --surface: #0f172a;
    --surface-soft: #111c34;
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 193, 7, 0.16), transparent 26%),
        var(--surface-soft);
}

.review-minimal-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.minimal-review-wrap {
    width: 100%;
    max-width: 760px;
}

.minimal-review-card {
    padding: 32px;
}

.qr-showcase-card {
    position: relative;
    overflow: hidden;
}

.qr-showcase-card::before,
.qr-showcase-card::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.qr-showcase-card::before {
    width: 220px;
    height: 220px;
    top: -90px;
    right: -60px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.16), transparent 68%);
}

.qr-showcase-card::after {
    width: 180px;
    height: 180px;
    left: -50px;
    bottom: -60px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2), transparent 68%);
}

.minimal-title {
    margin-bottom: 8px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
}

.minimal-stars {
    color: #f59e0b;
    letter-spacing: 0.18em;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.minimal-subtitle {
    max-width: 560px;
    margin: 0 auto;
    color: var(--text-soft);
}

.qr-stage {
    position: relative;
    display: inline-block;
}

.qr-stage-badge {
    position: absolute;
    top: -12px;
    right: -14px;
    z-index: 2;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 16px 30px rgba(13, 110, 253, 0.24);
}

.qr-link-preview {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    max-width: 100%;
    border-radius: 16px;
    background: rgba(13, 110, 253, 0.08);
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
}

.review-header,
.review-footer,
.hero-section,
.trust-section,
.qr-section,
.history-section {
    position: relative;
}

.review-header {
    padding: 24px 0 8px;
}

.container {
    max-width: 1180px;
}

.header-shell,
.footer-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
    color: inherit;
}

.brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: #fff;
    padding: 10px;
    box-shadow: var(--shadow);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.brand-lockup h1,
.hero-copy h2,
.section-heading h2,
.glass-card h2 {
    margin: 0;
    font-weight: 800;
    line-height: 1.08;
}

.hero-section {
    padding: 42px 0 60px;
}

.hero-copy h2 {
    font-size: clamp(2.25rem, 5vw, 4.7rem);
    margin-top: 18px;
    margin-bottom: 20px;
}

.hero-copy p,
.glass-card p,
.feature-card p,
.student-chip p,
.review-footer p {
    color: var(--text-soft);
    line-height: 1.75;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.stat-card,
.feature-card,
.glass-card,
.admin-card,
.metric-card,
.student-chip,
.history-item,
.login-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .student-chip,
[data-theme="dark"] .history-item,
.admin-body .admin-card,
.admin-body .metric-card,
.login-body .login-card,
.admin-sidebar {
    background: rgba(15, 23, 42, 0.92);
}

.stat-card {
    padding: 18px;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}

.stat-card span {
    color: var(--text-soft);
}

.star-strip {
    margin-top: 24px;
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    color: #d97706;
    font-size: 1.25rem;
}

.star-strip small {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.glass-card,
.admin-card {
    padding: 28px;
}

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

.generator-card::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.18), transparent 70%);
    top: -70px;
    right: -40px;
    pointer-events: none;
}

.form-control,
.form-select {
    min-height: 52px;
    border-radius: 16px;
    border-color: rgba(148, 163, 184, 0.35);
}

.tone-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tone-pill {
    position: relative;
    cursor: pointer;
}

.tone-pill input {
    position: absolute;
    opacity: 0;
}

.tone-pill span,
.theme-toggle,
.admin-nav-link {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.65);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.tone-pill input:checked + span {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.generated-review-shell {
    border-radius: 22px;
    border: 1px dashed rgba(13, 110, 253, 0.3);
    padding: 20px;
    background: rgba(13, 110, 253, 0.04);
}

.review-result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.avatar-mini,
.student-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #fff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, #0d6efd, #ffc107);
}

.review-output {
    min-height: 140px;
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text);
    white-space: pre-line;
}

.review-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.loading-state {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.trust-section,
.qr-section,
.history-section {
    padding: 0 0 72px;
}

.section-heading {
    margin-bottom: 28px;
}

.feature-card {
    padding: 24px;
    height: 100%;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(255, 193, 7, 0.18);
    color: #b7791f;
    font-weight: 800;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.qr-card,
.students-wall {
    height: 100%;
}

.qr-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 260px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    overflow: hidden;
}

.qr-box-compact {
    max-width: 280px;
    min-height: 280px;
}

.students-wall {
    display: grid;
    gap: 16px;
}

.student-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.student-chip p {
    margin: 4px 0 0;
}

.history-list {
    display: grid;
    gap: 14px;
}

.history-item {
    padding: 18px;
}

.history-item p {
    margin: 10px 0 8px;
}

.review-footer {
    padding: 0 0 48px;
}

.footer-shell {
    padding: 24px 28px;
    background: rgba(13, 110, 253, 0.08);
    border-radius: 26px;
    border: 1px solid rgba(13, 110, 253, 0.12);
}

.toast-message {
    border-radius: 18px;
    padding: 14px 16px;
    background: #111827;
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 30;
}

.login-body,
.admin-body {
    background: linear-gradient(180deg, #eff6ff, #f8fafc);
}

.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 480px);
    padding: 32px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    color: #fff;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
}

.admin-brand {
    font-size: 1.4rem;
    font-weight: 800;
}

.admin-brand-sub {
    color: rgba(255, 255, 255, 0.68);
    margin: 6px 0 0;
}

.admin-nav-link {
    justify-content: flex-start;
    padding: 0 16px;
    color: #0f172a;
}

.admin-main {
    padding: 32px;
}

.admin-body .table,
.admin-body .table th,
.admin-body .table td,
.admin-body .table thead th,
.admin-body .table tbody td,
.admin-body .table-responsive,
.admin-body .form-label,
.admin-body .form-check-label,
.admin-body .form-text,
.admin-body .text-secondary,
.login-body .text-secondary {
    color: #f8fafc !important;
}

.admin-body .table {
    --bs-table-color: #f8fafc;
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255, 255, 255, 0.12);
    --bs-table-striped-color: #f8fafc;
    --bs-table-hover-color: #f8fafc;
}

.metric-card {
    padding: 22px;
}

.metric-card span {
    display: block;
    color: var(--text-soft);
}

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

.chart-row + .chart-row {
    margin-top: 18px;
}

.chart-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.chart-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #6ea8fe);
    border-radius: inherit;
}

.chart-bar.warning span {
    background: linear-gradient(90deg, #ffc107, #ffda6a);
}

@media (max-width: 991px) {
    .hero-stats,
    .tone-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar,
    .admin-main {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding-top: 20px;
    }

    .hero-stats,
    .tone-grid {
        grid-template-columns: 1fr;
    }

    .glass-card,
    .admin-card,
    .feature-card,
    .metric-card,
    .student-chip,
    .history-item {
        border-radius: 22px;
    }

    .review-actions,
    .header-actions {
        width: 100%;
    }

    .review-actions > *,
    .header-actions > * {
        flex: 1 1 auto;
    }
}
