:root {
    --navy-950: #071a33;
    --navy-900: #0c2344;
    --navy-800: #12345a;
    --navy-700: #1d4b7a;
    --gold-500: #c9a24b;
    --gold-400: #e5bd66;
    --gold-100: #f7ead1;
    --slate-900: #1a2433;
    --slate-700: #4d5a6a;
    --slate-500: #758195;
    --slate-300: #d6dce5;
    --slate-200: #e8ecf2;
    --slate-100: #f6f8fb;
    --white: #ffffff;
    --success: #2e8b57;
    --danger: #b33c3c;
    --warning: #cf8a14;
    --shadow-lg: 0 24px 48px rgba(7, 26, 51, 0.12);
    --shadow-md: 0 14px 32px rgba(7, 26, 51, 0.1);
    --shadow-sm: 0 8px 18px rgba(7, 26, 51, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: linear-gradient(180deg, #fbfcff 0%, #f5f7fb 100%);
    font-family: "Inter", sans-serif;
    min-height: 100vh;
}

body.protected-pending .protected-content {
    display: none;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    color: var(--slate-700);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(201, 162, 75, 0.14);
    color: var(--navy-900);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title,
.hero-title,
.page-title {
    color: var(--navy-950);
    font-family: "Playfair Display", serif;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.06;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 0.75rem;
}

.page-title {
    font-size: clamp(2rem, 4vw, 2.9rem);
    margin-bottom: 0.45rem;
}

.btn {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.85rem 1.2rem;
}

.btn-brand {
    background: var(--gold-500);
    border: 1px solid var(--gold-500);
    color: var(--navy-950);
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--gold-400);
    border-color: var(--gold-400);
    color: var(--navy-950);
}

.btn-outline-brand {
    background: var(--white);
    border: 1px solid rgba(12, 35, 68, 0.16);
    color: var(--navy-900);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    background: var(--white);
    border-color: var(--navy-900);
    color: var(--navy-900);
}

.site-header {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(12, 35, 68, 0.06);
}

.suvadi-nav .nav-link {
    color: var(--slate-700);
    font-weight: 600;
}

.suvadi-nav .nav-link.active,
.suvadi-nav .nav-link:hover {
    color: var(--navy-900);
}

.brand-mark,
.footer-brand {
    display: inline-flex;
    gap: 0.85rem;
    align-items: center;
}

.brand-mark strong,
.footer-brand h5 {
    display: block;
    margin: 0;
    color: var(--navy-950);
    font-family: "Playfair Display", serif;
}

.brand-mark small {
    display: block;
    color: var(--slate-500);
    font-size: 0.75rem;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    box-shadow: var(--shadow-sm);
    color: var(--gold-400);
}

.page-main {
    padding-bottom: 6rem;
}

.hero-section,
.section-shell,
.page-shell {
    padding: 2rem 0;
}

.hero-surface,
.content-card,
.metric-card,
.book-card,
.profile-card,
.quiz-card,
.resource-card,
.checkout-card,
.summary-card,
.access-card,
.feature-card,
.settings-card {
    background: var(--white);
    border: 1px solid rgba(12, 35, 68, 0.06);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-surface {
    background: radial-gradient(circle at top right, rgba(201, 162, 75, 0.24), transparent 28%), linear-gradient(135deg, var(--navy-950), var(--navy-800));
    color: var(--white);
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: 32px;
    overflow: hidden;
}

.hero-surface .hero-title,
.hero-surface .eyebrow,
.hero-surface p,
.hero-surface h3,
.hero-surface .stat-number,
.hero-surface .stat-label {
    color: var(--white);
}

.hero-surface .eyebrow {
    background: rgba(255, 255, 255, 0.12);
}

.hero-grid,
.stats-grid,
.card-grid,
.profile-grid,
.books-grid,
.resources-grid,
.quiz-grid,
.metrics-grid,
.dashboard-grid,
.checkout-grid,
.library-grid,
.access-grid,
.detail-grid {
    display: grid;
    gap: 1.25rem;
}

.hero-grid {
    grid-template-columns: 1.4fr 0.9fr;
    align-items: center;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.75rem;
}

.card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.books-grid,
.resources-grid,
.library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-grid,
.quiz-grid,
.metrics-grid,
.access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid,
.checkout-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.detail-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
}

.feature-card,
.metric-card,
.access-card,
.settings-card,
.content-card,
.summary-card,
.quiz-card,
.checkout-card {
    padding: 1.4rem;
}

.feature-list,
.info-list,
.summary-list {
    display: grid;
    gap: 0.7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.feature-list li,
.info-list li,
.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--slate-700);
}

.surface-preview {
    position: relative;
    min-height: 400px;
    padding: 2rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.device-card {
    position: absolute;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--navy-900);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
}

.device-card.primary {
    inset: 0 auto auto 0;
    width: min(78%, 330px);
}

.device-card.secondary {
    right: 1rem;
    bottom: 1rem;
    width: min(58%, 240px);
}

.card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 162, 75, 0.14);
    color: var(--gold-500);
    font-size: 1.2rem;
}

.cover-frame {
    position: relative;
    padding: 1rem;
    background: linear-gradient(135deg, #dfe8f4, #f8fbff);
}

.cover-frame img,
.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.card-badge,
.type-chip,
.grade-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.card-badge,
.type-chip {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(7, 26, 51, 0.88);
    color: var(--white);
}

.grade-chip {
    background: rgba(201, 162, 75, 0.14);
    color: var(--navy-900);
}

.status-chip.success {
    background: rgba(46, 139, 87, 0.12);
    color: var(--success);
}

.status-chip.warning {
    background: rgba(207, 138, 20, 0.12);
    color: var(--warning);
}

.status-chip.danger {
    background: rgba(179, 60, 60, 0.12);
    color: var(--danger);
}

.book-card-body,
.resource-card-body,
.profile-card-body {
    padding: 1.2rem;
}

.book-card-title,
.resource-card-title,
.profile-name {
    margin-bottom: 0.35rem;
    color: var(--navy-900);
    font-size: 1.1rem;
    font-weight: 700;
}

.price-row,
.card-meta-row,
.action-row,
.form-actions,
.toolbar-row,
.hero-actions,
.checkout-actions,
.filter-pills,
.tabs-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-text {
    color: var(--navy-950);
    font-size: 1.15rem;
    font-weight: 800;
}

.pill-btn,
.tab-btn {
    background: var(--white);
    border: 1px solid rgba(12, 35, 68, 0.14);
    border-radius: 999px;
    color: var(--slate-700);
    font-weight: 600;
    padding: 0.7rem 1rem;
}

.pill-btn.active,
.tab-btn.active {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: var(--white);
}

.profile-card {
    padding: 1.35rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.avatar-shell {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--navy-900), #214d77);
    box-shadow: var(--shadow-md);
    color: var(--gold-400);
    font-size: 2.2rem;
}

.avatar-shell .lock-bubble {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    border: 3px solid var(--white);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--navy-900);
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 1px solid rgba(12, 35, 68, 0.12);
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(29, 75, 122, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(29, 75, 122, 0.12);
}

.progress {
    height: 10px;
    background: rgba(12, 35, 68, 0.08);
    border-radius: 999px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
}

.timeline-item {
    display: flex;
    gap: 0.9rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(12, 35, 68, 0.08);
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(201, 162, 75, 0.14);
    color: var(--gold-500);
}

.detail-hero {
    padding: 1.8rem;
}

.detail-cover,
.muted-panel {
    padding: 1.2rem;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
    border: 1px solid rgba(12, 35, 68, 0.06);
}

.info-pill {
    border-radius: 999px;
    background: rgba(12, 35, 68, 0.06);
    color: var(--navy-900);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.55rem 0.85rem;
}

.locked-state,
.empty-state,
.security-panel {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
    border: 1px solid rgba(12, 35, 68, 0.08);
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.security-blocker,
.noscript-blocker {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(7, 26, 51, 0.88);
}

.notice-banner {
    padding: 1rem 1.2rem;
    border: 1px solid rgba(201, 162, 75, 0.22);
    border-radius: 18px;
    background: rgba(201, 162, 75, 0.12);
    color: var(--navy-900);
}

.table-shell {
    overflow-x: auto;
}

.table-suvadi {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.6rem;
}

.table-suvadi th,
.table-suvadi td {
    padding: 0.95rem 0.9rem;
    white-space: nowrap;
}

.table-suvadi tbody tr {
    background: var(--slate-100);
}

.table-suvadi tbody td:first-child,
.table-suvadi tbody td:last-child {
    border-radius: 14px;
}

.site-footer {
    background: var(--navy-950);
    color: rgba(255, 255, 255, 0.76);
}

.site-footer h5,
.site-footer h6 {
    color: var(--white);
}

.site-footer a,
.site-footer p {
    display: block;
    margin-bottom: 0.55rem;
    color: rgba(255, 255, 255, 0.76);
}

.footer-note {
    max-width: 28ch;
    font-size: 0.92rem;
}

.mobile-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(calc(100% - 1rem), 560px);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem;
    border: 1px solid rgba(12, 35, 68, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.mobile-bottom-nav a {
    min-width: 64px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--slate-700);
    font-size: 0.76rem;
}

.mobile-bottom-nav a:hover {
    color: var(--navy-900);
}

@media (max-width: 1199.98px) {
    .card-grid,
    .books-grid,
    .resources-grid,
    .library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-grid,
    .dashboard-grid,
    .checkout-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .page-main {
        padding-bottom: 8rem;
    }

    .profile-grid,
    .quiz-grid,
    .metrics-grid,
    .access-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .surface-preview {
        min-height: 320px;
    }
}

@media (max-width: 767.98px) {
    .hero-section,
    .section-shell,
    .page-shell {
        padding: 1.2rem 0;
    }

    .hero-surface,
    .detail-hero,
    .feature-card,
    .metric-card,
    .access-card,
    .settings-card,
    .content-card,
    .summary-card,
    .quiz-card,
    .checkout-card,
    .book-card-body,
    .resource-card-body {
        padding: 1.1rem;
    }

    .card-grid,
    .books-grid,
    .resources-grid,
    .library-grid {
        grid-template-columns: 1fr;
    }

    .surface-preview {
        min-height: 280px;
        padding: 1rem;
    }

    .device-card.primary,
    .device-card.secondary {
        position: static;
        width: 100%;
        margin-bottom: 1rem;
    }

    .avatar-shell {
        width: 100px;
        height: 100px;
    }

    .mobile-bottom-nav {
        width: calc(100% - 1rem);
    }
}
