:root {
    --bg-soft: #f6f7fb;
    --bg-card: rgba(255, 255, 255, 0.92);
    --text-main: #1a202c;
    --text-muted: #5b6474;
    --line-soft: #d8deea;
    --brand: #0f766e;
    --brand-strong: #0b5f5a;
    --accent: #f59e0b;
    --danger: #dc2626;
    --shadow-soft: 0 16px 40px rgba(16, 24, 40, 0.08);
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 10% 15%, rgba(15, 118, 110, 0.15), transparent 38%),
        radial-gradient(circle at 90% 5%, rgba(245, 158, 11, 0.12), transparent 32%),
        linear-gradient(180deg, #f9fbfd 0%, #f3f5f9 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: 0.01em;
}

.app-main {
    position: relative;
    z-index: 1;
    animation: page-enter 420ms ease-out;
}

.app-nav {
    background: linear-gradient(95deg, rgba(13, 63, 74, 0.96), rgba(15, 118, 110, 0.96));
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(7, 44, 52, 0.25);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.navbar .nav-link {
    font-weight: 600;
    opacity: 0.9;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    opacity: 1;
}

.brand-mark {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f59e0b, #0f766e);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.nav-pill {
    padding: 0.4rem 0.72rem !important;
    border-radius: 999px;
    border: 1px solid transparent;
}

.nav-pill:hover,
.nav-pill:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.nav-pill-cta {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.38);
}

.container {
    position: relative;
}

.kpi-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.26);
    background: rgba(15, 118, 110, 0.12);
    color: #0e5f5a;
    font-weight: 600;
}

.filter-panel {
    border: 1px solid rgba(191, 201, 220, 0.8);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
}

.report-card-item {
    animation: card-enter 360ms ease both;
}

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

.design-option {
    display: block;
    cursor: pointer;
}

.design-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.design-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 150px;
    border-radius: 14px;
    border: 2px solid transparent;
    padding: 1rem;
    color: #0f172a;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    box-shadow: 0 12px 26px rgba(16, 24, 40, 0.08);
}

.design-option input:checked + .design-card {
    border-color: var(--brand);
    transform: translateY(-2px);
}

.theme-classic-swatch {
    background: linear-gradient(145deg, #fdf8ef, #f8f1e7);
}

.theme-executive-swatch {
    color: #e2e8f0;
    background: linear-gradient(145deg, #0f172a, #1e293b);
}

.theme-vibrant-swatch {
    background: linear-gradient(145deg, #f59e0b, #f97316);
    color: #3b1f00;
}

.theme-minimal-swatch {
    background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
}

.theme-oceanic-swatch {
    color: #e2e8f0;
    background: linear-gradient(145deg, #0f4c81, #0ea5e9);
}

.theme-forest-swatch {
    color: #e7f6ea;
    background: linear-gradient(145deg, #14532d, #16a34a);
}

.theme-sunrise-swatch {
    color: #4a1d00;
    background: linear-gradient(145deg, #fb923c, #facc15);
}

.theme-slate-swatch {
    color: #f1f5f9;
    background: linear-gradient(145deg, #334155, #64748b);
}

.border-classic-swatch {
    background: linear-gradient(145deg, #faf7f0, #f3ede2);
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.24);
}

.border-executive-swatch {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    box-shadow: inset 0 0 0 2px #1e293b, inset 0 0 0 8px #e2e8f0;
}

.border-vibrant-swatch {
    background: linear-gradient(145deg, #fff7ed, #ffedd5);
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, #f97316, #f59e0b, #f43f5e) 1;
}

.border-minimal-swatch {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    box-shadow: inset 0 0 0 1px #9ca3af;
}

.border-oceanic-swatch {
    background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
    box-shadow: inset 0 0 0 2px #0ea5e9, inset 0 0 0 7px rgba(186, 230, 253, 0.8);
}

.border-forest-swatch {
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    box-shadow: inset 0 0 0 2px #15803d, inset 0 0 0 7px rgba(187, 247, 208, 0.7);
}

.border-sunrise-swatch {
    background: linear-gradient(145deg, #fff7ed, #fef3c7);
    box-shadow: inset 0 0 0 2px #f97316, inset 0 0 0 7px rgba(254, 215, 170, 0.75);
}

.border-slate-swatch {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    box-shadow: inset 0 0 0 2px #475569, inset 0 0 0 7px rgba(226, 232, 240, 0.85);
}

.footer-classic-swatch {
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
}

.footer-line-swatch {
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    box-shadow: inset 0 -14px 0 0 #fff, inset 0 -16px 0 0 #334155;
}

.footer-boxed-swatch {
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    box-shadow: inset 0 -24px 0 0 rgba(15, 23, 42, 0.08);
}

.footer-minimal-swatch {
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    box-shadow: inset 0 -6px 0 0 #d1d5db;
}

.footer-accent-swatch {
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    box-shadow: inset 0 -10px 0 0 #0f766e;
}

.footer-wave-swatch {
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    box-shadow: inset 0 -16px 0 0 #38bdf8;
}

.card {
    border: 1px solid rgba(191, 201, 220, 0.6);
    border-radius: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(3px);
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, box-shadow 220ms ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(16, 24, 40, 0.15);
}

.card-header {
    border-bottom: 1px solid var(--line-soft);
}

.card-footer {
    border-top: 1px solid var(--line-soft);
    background: transparent;
}

.alert {
    border-radius: 12px;
    border: 1px solid rgba(191, 201, 220, 0.65);
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(120deg, var(--brand), var(--brand-strong));
    border-color: var(--brand-strong);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(120deg, #0a695f, #084f4c);
    border-color: #084f4c;
}

.btn-success {
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.24);
}

.btn-danger {
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #cfd7e6;
    padding: 0.62rem 0.82rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 118, 110, 0.7);
    box-shadow: 0 0 0 0.18rem rgba(15, 118, 110, 0.18);
}

.book-controls {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line-soft);
    position: sticky;
    top: 0;
    z-index: 100;
}

.editor-toolbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.editor-sidebar {
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.06), rgba(255, 255, 255, 0.55)),
        #f8fafc;
}

.section-item.active,
.page-item.active {
    background: linear-gradient(120deg, var(--brand), var(--brand-strong)) !important;
    color: #fff !important;
}

.collaborator-badge {
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: rgba(15, 118, 110, 0.08) !important;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
