:root {
    --app-bg: #f3f6fb;
    --app-surface: #ffffff;
    --app-border: rgba(15, 23, 42, 0.08);
    --app-primary: #3b82f6;
    --app-primary-dark: #2563eb;
    --app-success: #10b981;
    --app-warning: #f59e0b;
    --app-danger: #ef4444;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

body.bg-app {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 24%),
        var(--app-bg);
    color: var(--app-text);
}

.navbar-glass {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(37, 99, 235, 0.9));
    box-shadow: var(--app-shadow);
}

.shadow-soft,
.hero-card,
.auth-card {
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
    border-radius: 1.25rem;
}

.hero-card,
.feature-card,
.reservation-item,
.alert-item {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(12px);
}

.hero-card {
    overflow: hidden;
}

.feature-stack {
    display: grid;
    gap: 0.75rem;
}

.feature-card,
.reservation-item,
.alert-item {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    padding: 1rem;
}

.text-bg-primary-soft {
    background: rgba(59, 130, 246, 0.12);
    color: var(--app-primary-dark);
}

.btn-primary {
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
    border: none;
}

.btn-outline-primary {
    color: var(--app-primary-dark);
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-outline-primary:hover {
    background: var(--app-primary-dark);
}

.site-icon-btn {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-icon-btn i {
    line-height: 1;
}

.map-canvas {
    min-height: 360px;
    border-radius: 1rem;
    overflow: hidden;
}

.planner-surface {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--app-border);
    border-radius: 1.25rem;
    box-shadow: var(--app-shadow);
}

.planner-day {
    min-height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(243,246,251,0.92));
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
}

.planner-rule {
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 0.9rem;
    background: #fff;
}

.planner-exception {
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 0.9rem;
    background: #fff;
}

.planner-circuit-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: rgba(255,255,255,0.95);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.planner-circuit-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.planner-circuit-card.active {
    border-color: rgba(59, 130, 246, 0.38);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 1));
}

.auth-shell {
    min-height: calc(100vh - 80px);
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.auth-card {
    width: min(100%, 640px);
}

.guide-document {
    overflow: hidden;
}

.guide-toc-card {
    position: sticky;
    top: 5.5rem;
}

.guide-toc-link {
    color: var(--app-muted);
    border-radius: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.guide-toc-link:hover,
.guide-toc-link.active {
    color: var(--app-primary-dark);
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(2px);
}

.guide-content {
    line-height: 1.75;
}

.guide-content h1,
.guide-content h2,
.guide-content h3,
.guide-content h4 {
    scroll-margin-top: 6rem;
    font-weight: 700;
}

.guide-content h1 {
    margin-bottom: 1rem;
}

.guide-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.guide-content h3,
.guide-content h4 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.guide-content p {
    margin-bottom: 1rem;
    color: var(--app-text);
}

.guide-content ul,
.guide-content ol {
    margin-bottom: 1rem;
    padding-left: 1.4rem;
}

.guide-content li + li {
    margin-top: 0.35rem;
}

.guide-content blockquote {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border-left: 4px solid rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.06);
    border-radius: 0.75rem;
    color: var(--app-text);
}

.guide-content code {
    padding: 0.15rem 0.35rem;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 0.4rem;
    color: var(--app-primary-dark);
}

.guide-code {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.guide-code code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.guide-content a {
    color: var(--app-primary-dark);
    text-decoration: none;
}

.guide-content a:hover {
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    .hero-card,
    .auth-card {
        border-radius: 1rem;
    }

    .map-canvas {
        min-height: 280px;
    }

    .guide-toc-card {
        position: static;
    }
}
