/* The Daily Permit - Dark Editorial Design System */
/* A premium gazette aesthetic with warmth and character */

/* === FONTS === */
/* Fonts loaded via <link> in HTML head for faster loading */

/* === CUSTOM PROPERTIES === */
:root {
    /* Colors - Dark Editorial Palette */
    --bg-ink: #0d0c0b;
    --bg-paper: #1a1918;
    --bg-elevated: #242220;
    --bg-hover: #2e2c29;

    /* Accent Colors - Warm & Distinctive */
    --accent-terracotta: #c17f59;
    --accent-terracotta-light: #d4956f;
    --accent-terracotta-dark: #a66b48;
    --accent-gold: #d4a84b;
    --accent-gold-light: #e4be6a;
    --accent-sage: #7d9a7d;

    /* Semantic Colors */
    --color-success: #7d9a7d;
    --color-warning: #d4a84b;
    --color-error: #c75b5b;
    --color-info: #7b9eb8;

    /* Text Colors - Warm Cream Tones */
    --text-primary: #f5f0e8;
    --text-body: #c9c4bc;
    --text-muted: #8a8580;
    --text-faint: #5a5754;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-accent: var(--accent-terracotta);

    /* Sizing */
    --max-width: 1200px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows - Subtle & Warm */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(193, 127, 89, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-smooth: 300ms ease;
    --transition-slow: 500ms ease;
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Crimson Pro', Georgia, serif;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-body);
    background-color: var(--bg-ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-body);
}

a {
    color: var(--accent-terracotta);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-terracotta-light);
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-body);
}

/* Monospace for permit numbers & technical content */
.mono, code {
    font-family: 'IBM Plex Mono', 'SF Mono', monospace;
    font-size: 0.9em;
}

/* Lead text */
.lead {
    font-size: 1.25rem;
    color: var(--text-body);
    line-height: 1.6;
}

/* === ORNAMENTAL ELEMENTS === */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    color: var(--text-faint);
}

.ornament::before,
.ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-medium), transparent);
}

.ornament-symbol {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
}

/* Corner marks for cards */
.corner-mark {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-terracotta);
    border-style: solid;
    opacity: 0.4;
    transition: opacity var(--transition-smooth);
}

.corner-mark-tl {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.corner-mark-tr {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.corner-mark-bl {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.corner-mark-br {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

/* === ANIMATIONS === */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes drawLine {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
    from {
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
    }
    to {
        stroke-dasharray: 100;
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100px) rotate(720deg);
    }
}

@keyframes circleDraw {
    from {
        stroke-dasharray: 300;
        stroke-dashoffset: 300;
    }
    to {
        stroke-dasharray: 300;
        stroke-dashoffset: 0;
    }
}

.animate-in {
    animation: fadeUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-text,
    .hero-text h1 .word,
    .hero-text p,
    .hero-cta,
    .hero-social-proof,
    .hero-illustration svg.hero-building {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-text h1::after {
        width: 100px !important;
    }

    .hero-shapes {
        display: none;
    }

    /* SVG elements should be visible immediately */
    .hero-building .draw-path,
    .hero-building .window,
    .hero-building .bird,
    .hero-building .bg-building,
    .hero-building .measurement-text {
        opacity: 1 !important;
        stroke-dashoffset: 0 !important;
    }

    .hero-building .window {
        fill: rgba(212, 168, 75, 0.3) !important;
    }

    .features-bento > * {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* SVG Animations */
.draw-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 1.5s ease-out forwards;
}

.draw-check {
    animation: drawCheck 0.5s ease-out 0.3s forwards;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.circle-draw {
    animation: circleDraw 0.6s ease-out forwards;
}

.pulse-badge {
    animation: pulse 2s infinite;
}

.confetti-piece {
    animation: confettiFall 1.5s ease-out var(--delay, 0s) forwards;
}

/* === HEADER === */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 12, 11, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo-img {
    height: 60px;
    width: auto;
    transition: opacity var(--transition-fast);
}

header .logo:hover .logo-img {
    opacity: 0.85;
}

header ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
}

header li {
    margin: 0;
}

header nav a {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
    letter-spacing: 0.02em;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-terracotta);
    transition: width var(--transition-smooth);
}

header nav a:hover {
    color: var(--text-primary);
}

header nav a:hover::after {
    width: 100%;
}

header .logo:hover {
    color: var(--text-primary);
}

header .logo:hover::after {
    display: none;
}

/* === MAIN CONTENT === */
main {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
}

section {
    margin-bottom: 4rem;
}

/* === HERO SECTION === */
.hero {
    position: relative;
    padding: 3rem;
    margin-bottom: 4rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Atmospheric gradient backdrop */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(193, 127, 89, 0.08) 0%,
        rgba(193, 127, 89, 0.03) 40%,
        transparent 70%
    );
    animation: heroGlow 8s ease-in-out infinite;
    pointer-events: none;
}

/* Decorative corner marks - more dramatic */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background:
        /* Top left corner */
        linear-gradient(135deg, var(--accent-terracotta) 0%, var(--accent-terracotta) 2px, transparent 2px) 1.5rem 1.5rem / 60px 60px no-repeat,
        linear-gradient(135deg, transparent calc(100% - 2px), var(--accent-terracotta) calc(100% - 2px)) 1.5rem 1.5rem / 60px 60px no-repeat,
        /* Bottom right corner */
        linear-gradient(-45deg, var(--accent-terracotta) 0%, var(--accent-terracotta) 2px, transparent 2px) calc(100% - 1.5rem) calc(100% - 1.5rem) / 60px 60px no-repeat,
        linear-gradient(-45deg, transparent calc(100% - 2px), var(--accent-terracotta) calc(100% - 2px)) calc(100% - 1.5rem) calc(100% - 1.5rem) / 60px 60px no-repeat;
    opacity: 0.4;
}

/* Subtle grid pattern overlay */
.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(193, 127, 89, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(193, 127, 89, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0;
    animation: gridFadeIn 1.5s ease-out 0.5s forwards;
}

@keyframes gridFadeIn {
    to { opacity: 1; }
}

/* Floating geometric shapes */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border: 1px solid var(--accent-terracotta);
    opacity: 0;
    animation:
        shapeFadeIn 1s ease-out forwards,
        shapeFloat 20s ease-in-out 1s infinite;
}

@keyframes shapeFadeIn {
    to { opacity: var(--opacity, 0.1); }
}

.hero-shape-1 {
    width: 60px;
    height: 60px;
    top: 15%;
    left: 8%;
    border-radius: 4px;
    transform: rotate(15deg);
    animation-delay: 0.5s, 1.5s;
    --rotate: 15deg;
    --opacity: 0.15;
}

.hero-shape-2 {
    width: 40px;
    height: 40px;
    top: 70%;
    left: 5%;
    border-radius: 50%;
    animation-delay: 0.7s, 1.7s;
    --rotate: 0deg;
    --opacity: 0.1;
}

.hero-shape-3 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 5%;
    border-radius: 4px;
    transform: rotate(-10deg);
    animation-delay: 0.9s, 1.9s;
    --rotate: -10deg;
    --opacity: 0.12;
}

.hero-shape-4 {
    width: 30px;
    height: 30px;
    bottom: 25%;
    right: 12%;
    border-radius: 50%;
    animation-delay: 1.1s, 2.1s;
    --rotate: 0deg;
    --opacity: 0.1;
}

.hero-shape-5 {
    width: 50px;
    height: 50px;
    bottom: 15%;
    left: 15%;
    border-radius: 4px;
    transform: rotate(25deg);
    animation-delay: 1.3s, 2.3s;
    --rotate: 25deg;
    --opacity: 0.08;
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotate, 0deg));
    }
    25% {
        transform: translateY(-15px) rotate(calc(var(--rotate, 0deg) + 5deg));
    }
    50% {
        transform: translateY(-8px) rotate(calc(var(--rotate, 0deg) - 3deg));
    }
    75% {
        transform: translateY(-20px) rotate(calc(var(--rotate, 0deg) + 2deg));
    }
}

@keyframes heroGlow {
    0%, 100% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-5%, 5%) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: center;
}

/* Staggered text animations */
.hero-text {
    opacity: 0;
    animation: heroTextReveal 0.8s ease-out 0.2s forwards;
}

@keyframes heroTextReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    overflow: hidden;
}

/* Animated headline words */
.hero-text h1 .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: wordReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-text h1 .word:nth-child(1) { animation-delay: 0.3s; }
.hero-text h1 .word:nth-child(2) { animation-delay: 0.5s; }

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accent line under headline - animated */
.hero-text h1::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-terracotta), var(--accent-gold));
    margin-top: 1.5rem;
    animation: lineExpand 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

@keyframes lineExpand {
    to { width: 100px; }
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-body);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 0.6s ease-out 0.9s forwards;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    opacity: 0;
    animation: fadeUp 0.6s ease-out 1.1s forwards;
}

.hero-cta .btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-terracotta) 0%, var(--accent-terracotta-dark) 100%);
    box-shadow:
        0 4px 15px rgba(193, 127, 89, 0.4),
        0 0 0 0 rgba(193, 127, 89, 0.4);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-cta .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 25px rgba(193, 127, 89, 0.5),
        0 0 0 4px rgba(193, 127, 89, 0.15);
    background: linear-gradient(135deg, var(--accent-terracotta) 0%, var(--accent-terracotta-dark) 100%);
}

.hero-cta .btn-primary:active {
    transform: translateY(-1px) scale(1);
}

/* Button shine effect */
.hero-cta .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    animation: buttonShine 4s ease-in-out 2.5s infinite;
}

@keyframes buttonShine {
    0% { left: -100%; }
    15% { left: 100%; }
    100% { left: 100%; }
}

/* Arrow animation on hover */
.hero-cta .btn-primary .icon {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-cta .btn-primary:hover .icon {
    transform: translateX(4px);
}

.hero-cta .cta-note {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Social proof badge */
.hero-social-proof {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(125, 154, 125, 0.1);
    border: 1px solid rgba(125, 154, 125, 0.3);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--color-success);
    opacity: 0;
    animation: fadeUp 0.6s ease-out 1.3s forwards;
}

.hero-social-proof .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Hero illustration container */
.hero-illustration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glow effect behind illustration */
.hero-illustration::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(
        circle,
        rgba(193, 127, 89, 0.15) 0%,
        rgba(193, 127, 89, 0.05) 50%,
        transparent 70%
    );
    filter: blur(40px);
    animation: illustrationGlow 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes illustrationGlow {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Floating animation for the building */
.hero-illustration svg.hero-building {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    height: auto;
    color: var(--accent-terracotta);
    opacity: 0;
    animation:
        buildingReveal 1s ease-out 0.4s forwards,
        buildingFloat 8s ease-in-out 2s infinite;
    transition: transform 0.3s ease-out;
}

/* Subtle hover interaction */
.hero-illustration:hover svg.hero-building {
    animation-play-state: paused;
    transform: scale(1.02);
}

@keyframes buildingReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 0.95;
        transform: translateY(0) scale(1);
    }
}

@keyframes buildingFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ========================================
   SOPHISTICATED SVG ANIMATIONS
   ======================================== */

/* Line drawing animation base */
.hero-building .draw-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 1.5s ease-out forwards;
}

.hero-building .draw-path.delay-1 { animation-delay: 0.2s; }
.hero-building .draw-path.delay-2 { animation-delay: 0.4s; }
.hero-building .draw-path.delay-3 { animation-delay: 0.6s; }
.hero-building .draw-path.delay-4 { animation-delay: 0.8s; }
.hero-building .draw-path.delay-5 { animation-delay: 1s; }

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* Window animations - staggered appearance and lighting */
.hero-building .window {
    opacity: 0;
    animation: windowAppear 0.4s ease-out forwards;
}

.hero-building .window-1 { animation-delay: 1.2s; }
.hero-building .window-2 { animation-delay: 1.25s; }
.hero-building .window-3 { animation-delay: 1.3s; }
.hero-building .window-4 { animation-delay: 1.35s; }
.hero-building .window-5 { animation-delay: 1.4s; }
.hero-building .window-6 { animation-delay: 1.45s; }
.hero-building .window-7 { animation-delay: 1.5s; }
.hero-building .window-8 { animation-delay: 1.55s; }
.hero-building .window-9 { animation-delay: 1.6s; }
.hero-building .window-10 { animation-delay: 1.65s; }
.hero-building .window-11 { animation-delay: 1.7s; }

.hero-building .window-s1 { animation-delay: 1.3s; }
.hero-building .window-s2 { animation-delay: 1.35s; }
.hero-building .window-s3 { animation-delay: 1.4s; }
.hero-building .window-s4 { animation-delay: 1.45s; }
.hero-building .window-s5 { animation-delay: 1.5s; }
.hero-building .window-s6 { animation-delay: 1.55s; }
.hero-building .window-s7 { animation-delay: 1.6s; }
.hero-building .window-s8 { animation-delay: 1.65s; }

@keyframes windowAppear {
    to { opacity: 1; }
}

/* Window lighting effect - random pattern */
.hero-building .window-1 { animation: windowAppear 0.4s ease-out 1.2s forwards, windowGlow 5s ease-in-out 3s infinite; }
.hero-building .window-3 { animation: windowAppear 0.4s ease-out 1.3s forwards, windowGlow 5s ease-in-out 3.5s infinite; }
.hero-building .window-5 { animation: windowAppear 0.4s ease-out 1.4s forwards, windowGlow 5s ease-in-out 4s infinite; }
.hero-building .window-7 { animation: windowAppear 0.4s ease-out 1.5s forwards, windowGlow 5s ease-in-out 2.5s infinite; }
.hero-building .window-9 { animation: windowAppear 0.4s ease-out 1.6s forwards, windowGlow 5s ease-in-out 4.5s infinite; }
.hero-building .window-s2 { animation: windowAppear 0.4s ease-out 1.35s forwards, windowGlow 5s ease-in-out 3.2s infinite; }
.hero-building .window-s4 { animation: windowAppear 0.4s ease-out 1.45s forwards, windowGlow 5s ease-in-out 2.8s infinite; }
.hero-building .window-s6 { animation: windowAppear 0.4s ease-out 1.55s forwards, windowGlow 5s ease-in-out 3.8s infinite; }

@keyframes windowGlow {
    0%, 100% { fill: rgba(255, 255, 255, 0.05); }
    40%, 60% { fill: rgba(212, 168, 75, 0.5); }
}

/* Antenna light pulse */
.hero-building .pulse-light {
    animation: antennaPulse 4s ease-in-out infinite;
}

@keyframes antennaPulse {
    0%, 100% { opacity: 0.3; r: 3; }
    50% { opacity: 1; r: 4; }
}

/* Crane trolley movement */
.hero-building .crane-trolley {
    animation: trolleyMove 8s ease-in-out 2s infinite;
}

@keyframes trolleyMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-40px); }
}

/* Crane hook swinging */
.hero-building .crane-hook {
    transform-origin: 131px 95px;
    animation: hookSwing 3s ease-in-out 2.5s infinite;
}

@keyframes hookSwing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

/* Crane load swaying (follows hook) */
.hero-building .crane-load {
    transform-origin: 131px 95px;
    animation: loadSway 3s ease-in-out 2.5s infinite;
}

@keyframes loadSway {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(2deg) translateY(1px); }
    75% { transform: rotate(-2deg) translateY(1px); }
}

/* Hook cable length animation */
.hero-building .hook-cable {
    animation: cableLength 8s ease-in-out 2s infinite;
}

@keyframes cableLength {
    0%, 100% {
        stroke-dasharray: 3,2;
        y2: 95;
    }
    50% {
        stroke-dasharray: 3,2;
        y2: 105;
    }
}


/* Flying birds */
.hero-building .bird {
    opacity: 0;
}

.hero-building .bird-1 {
    animation: birdFly1 12s linear 2s infinite;
}

.hero-building .bird-2 {
    animation: birdFly2 15s linear 4s infinite;
}

.hero-building .bird-3 {
    animation: birdFly3 10s linear 3s infinite;
}

@keyframes birdFly1 {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    5% { opacity: 0.6; }
    95% { opacity: 0.6; }
    100% {
        opacity: 0;
        transform: translate(-150px, 20px);
    }
}

@keyframes birdFly2 {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    5% { opacity: 0.5; }
    95% { opacity: 0.5; }
    100% {
        opacity: 0;
        transform: translate(-180px, 15px);
    }
}

@keyframes birdFly3 {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    5% { opacity: 0.4; }
    95% { opacity: 0.4; }
    100% {
        opacity: 0;
        transform: translate(-120px, 25px);
    }
}

/* Sun rays rotation */
.hero-building .sun-rays {
    transform-origin: 370px 45px;
    animation: sunRaysRotate 30s linear infinite;
}

@keyframes sunRaysRotate {
    to { transform: rotate(360deg); }
}

/* Street lamp glow */
.hero-building .lamp-glow {
    animation: lampFlicker 4s ease-in-out infinite;
}

@keyframes lampFlicker {
    0%, 100% { opacity: 0.3; r: 4; }
    50% { opacity: 0.5; r: 6; }
}

/* Tree sway */
.hero-building .tree {
    transform-origin: 380px 280px;
    animation: treeSway 6s ease-in-out infinite;
}

@keyframes treeSway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(2deg); }
}

/* Measurement text fade in */
.hero-building .measurement-text {
    opacity: 0;
    animation: measureFadeIn 0.5s ease-out 2s forwards;
}

@keyframes measureFadeIn {
    to { opacity: 0.3; }
}

/* Door handle gleam */
.hero-building .door-handle {
    animation: handleGleam 3s ease-in-out infinite;
}

@keyframes handleGleam {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Background buildings subtle movement */
.hero-building .bg-building {
    opacity: 0;
    animation: bgBuildingAppear 1s ease-out forwards;
}

.hero-building .bg-building.delay-1 {
    animation-delay: 0.3s;
}

@keyframes bgBuildingAppear {
    to { opacity: 0.2; }
}

/* Legacy hero support (centered) */
.hero.hero-centered {
    text-align: center;
}

.hero.hero-centered .hero-text {
    max-width: 700px;
    margin: 0 auto;
}

.hero.hero-centered h1::after {
    margin-left: auto;
    margin-right: auto;
}

.hero.hero-centered p {
    margin-left: auto;
    margin-right: auto;
}

.hero.hero-centered .hero-cta {
    align-items: center;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-sm);
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-smooth);
    position: relative;
    letter-spacing: 0.02em;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-terracotta);
    color: var(--bg-ink);
    box-shadow: 0 4px 12px rgba(193, 127, 89, 0.3);
}

.btn-primary:hover {
    background: var(--accent-terracotta-light);
    box-shadow: 0 6px 16px rgba(193, 127, 89, 0.4);
    color: var(--bg-ink);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-terracotta);
    color: var(--text-primary);
}

.btn-success {
    background: var(--color-success);
    color: var(--bg-ink);
    box-shadow: 0 4px 12px rgba(125, 154, 125, 0.3);
}

.btn-success:hover {
    background: #8fae8f;
    box-shadow: 0 6px 16px rgba(125, 154, 125, 0.4);
    color: var(--bg-ink);
}

.btn-danger {
    background: var(--color-error);
    color: white;
    box-shadow: 0 4px 12px rgba(199, 91, 91, 0.3);
}

.btn-danger:hover {
    background: #d46c6c;
    box-shadow: 0 6px 16px rgba(199, 91, 91, 0.4);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-body);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    transform: none;
}

.btn-warning {
    background: var(--accent-gold);
    color: var(--bg-ink);
    box-shadow: 0 4px 12px rgba(212, 168, 75, 0.3);
}

.btn-warning:hover {
    background: var(--accent-gold-light);
    box-shadow: 0 6px 16px rgba(212, 168, 75, 0.4);
    color: var(--bg-ink);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2.25rem;
    font-size: 1.0625rem;
}

/* Button loading state */
.btn.loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-spinner 0.8s linear infinite;
}

.btn-primary.loading::after {
    border-color: var(--bg-ink);
    border-top-color: transparent;
}

.btn-secondary.loading::after {
    border-color: var(--text-primary);
    border-top-color: transparent;
}

@keyframes btn-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Button with icon */
.btn .icon {
    width: 18px;
    height: 18px;
}

/* === FEATURES SECTION - BENTO LAYOUT === */
.features {
    margin-bottom: 5rem;
}

.features-bento {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.25rem;
}

/* Hero Feature - Large card spanning 2 rows */
.feature-hero {
    grid-row: 1 / 3;
    position: relative;
    background: linear-gradient(135deg, var(--bg-paper) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-terracotta), var(--accent-gold), var(--accent-terracotta));
    background-size: 200% 100%;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.feature-hero:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-terracotta);
}

.feature-hero-content {
    position: relative;
    z-index: 1;
}

.feature-eyebrow {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-terracotta);
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(193, 127, 89, 0.1);
    border-radius: 100px;
}

.feature-hero h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-hero p {
    font-size: 1.0625rem;
    color: var(--text-body);
    line-height: 1.6;
    max-width: 400px;
}

.feature-hero-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.feature-hero-stat .stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-terracotta);
    line-height: 1;
}

.feature-hero-stat .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.feature-hero-visual {
    position: absolute;
    bottom: -20px;
    right: -20px;
    opacity: 0.08;
    pointer-events: none;
}

.feature-hero-visual svg {
    width: 200px;
    height: 200px;
}

/* Secondary Features - Smaller cards */
.feature-secondary {
    position: relative;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.feature-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent-terracotta);
    transition: height 0.3s ease;
}

.feature-secondary:hover {
    transform: translateX(4px);
    border-color: var(--accent-terracotta);
    background: var(--bg-elevated);
}

.feature-secondary:hover::before {
    height: 100%;
}

.feature-secondary .feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    color: var(--accent-terracotta);
}

.feature-secondary h3 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.feature-secondary p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Animation */
.features-bento > * {
    opacity: 0;
    animation: bentoReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.feature-hero { animation-delay: 0.1s; }
.feature-secondary:nth-of-type(1) { animation-delay: 0.2s; }
.feature-secondary:nth-of-type(2) { animation-delay: 0.3s; }

@keyframes bentoReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === VALUE PROPOSITIONS SECTION === */
.value-props {
    margin-bottom: 4rem;
}

.value-props-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.value-prop {
    position: relative;
    padding: 2rem 0;
    border-top: 1px solid var(--border-subtle);
}

.value-prop-number {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-terracotta);
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.value-prop h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
    line-height: 1.3;
}

.value-prop p {
    font-size: 0.9375rem;
    color: var(--text-body);
    line-height: 1.65;
    margin: 0;
}

/* Staggered animation for value props */
.value-props-grid .value-prop {
    opacity: 0;
    animation: valueReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.value-props-grid .value-prop:nth-child(1) { animation-delay: 0.1s; }
.value-props-grid .value-prop:nth-child(2) { animation-delay: 0.2s; }
.value-props-grid .value-prop:nth-child(3) { animation-delay: 0.3s; }

@keyframes valueReveal {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Legacy features list support */
.features ul {
    list-style: none;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.features li {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: var(--radius-md);
    position: relative;
    transition: all var(--transition-smooth);
    color: var(--text-body);
}

.features li:hover {
    transform: translateY(-4px);
    border-color: var(--accent-terracotta);
    box-shadow: var(--shadow-glow);
}

.features li strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* === WHO SECTION - MINIMAL STRIP === */
.who {
    margin-bottom: 3rem;
}

.who-strip {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.who-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.who-list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.who-item {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.who-divider {
    color: var(--text-faint);
    font-weight: 300;
    user-select: none;
}

/* Legacy who section support */
.who ul {
    list-style: none;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.who li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    color: var(--text-body);
    background: var(--bg-ink);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
}

.who li:hover {
    border-color: var(--accent-terracotta);
    transform: translateX(4px);
}

.who li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-terracotta);
    border-radius: 50%;
    flex-shrink: 0;
}

/* === CTA SECTION - CONTAINED DRAMATIC === */
.cta-section {
    position: relative;
    padding: 4rem 3rem 0rem 3rem;
    text-align: center;
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

/* Background layers */
.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.cta-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        var(--bg-paper) 0%,
        rgba(193, 127, 89, 0.08) 50%,
        var(--bg-elevated) 100%
    );
    background-size: 200% 200%;
    animation: ctaGradientShift 15s ease-in-out infinite;
}

@keyframes ctaGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cta-grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(193, 127, 89, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(193, 127, 89, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

/* Content container */
.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* Top badge */
.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(125, 154, 125, 0.15);
    border: 1px solid rgba(125, 154, 125, 0.3);
    border-radius: 100px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-success);
    margin-bottom: 2rem;
}

.cta-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Large headline */
.cta-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-subhead {
    font-size: 1.25rem;
    color: var(--text-body);
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Actions */
.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.cta-btn {
    padding: 1.125rem 2.5rem;
    font-size: 1.0625rem;
    background: linear-gradient(135deg, var(--accent-terracotta) 0%, var(--accent-terracotta-dark) 100%);
    box-shadow:
        0 4px 20px rgba(193, 127, 89, 0.4),
        0 0 0 0 rgba(193, 127, 89, 0.4);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(193, 127, 89, 0.5),
        0 0 0 4px rgba(193, 127, 89, 0.15);
    background: linear-gradient(135deg, var(--accent-terracotta) 0%, var(--accent-terracotta-dark) 100%);
}

.cta-btn .icon {
    transition: transform 0.3s ease;
}

.cta-btn:hover .icon {
    transform: translateX(4px);
}

.cta-note {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* Proof points */
.cta-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-subtle);
}

.cta-proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.cta-proof-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-terracotta);
}

.cta-proof-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cta-proof-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

/* === FOOTER === */
footer {
    position: relative;
    z-index: 1;
    background: var(--bg-paper);
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 2rem;
    margin-top: auto;
}

footer p {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.footer-links {
    margin-top: 0.75rem !important;
    font-size: 0.8125rem !important;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-terracotta);
}

/* === TERMS PAGE === */
.terms-page {
    padding: 3rem 2rem;
}

.terms-container {
    max-width: 800px;
    margin: 0 auto;
}

.terms-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.terms-eyebrow {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-terracotta);
    margin-bottom: 1rem;
}

.terms-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.terms-header .last-updated {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.terms-header .terms-intro {
    font-size: 1.0625rem;
    color: var(--text-body);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
}

.terms-section {
    margin-bottom: 3rem;
}

.terms-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--accent-terracotta);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-subtle);
}

.terms-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
}

.terms-section h4 {
    font-family: 'Crimson Pro', serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.terms-section p {
    font-family: 'Crimson Pro', serif;
    font-size: 1.0625rem;
    color: var(--text-body);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.terms-section ul,
.terms-section ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.terms-section li {
    font-family: 'Crimson Pro', serif;
    font-size: 1.0625rem;
    color: var(--text-body);
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.terms-section a {
    color: var(--accent-terracotta);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.terms-section a:hover {
    border-bottom-color: var(--accent-terracotta);
}

.terms-section strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .terms-page {
        padding: 2rem 1rem;
    }

    .terms-header h1 {
        font-size: 1.75rem;
    }

    .terms-section h2 {
        font-size: 1.375rem;
    }
}

/* === TOS CHECKBOX === */
.tos-agree {
    margin-bottom: 1rem !important;
}

.tos-label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.5;
}

.tos-label input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--accent-terracotta);
}

.tos-label a {
    color: var(--accent-terracotta);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.tos-label a:hover {
    border-bottom-color: var(--accent-terracotta);
}

/* === FLASH MESSAGES === */
.flash-messages {
    margin-bottom: 2rem;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid;
    animation: slideInLeft 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flash::before {
    font-size: 1.25rem;
}

.flash-success {
    background: rgba(125, 154, 125, 0.15);
    border-color: rgba(125, 154, 125, 0.4);
    color: var(--color-success);
}

.flash-success::before {
    content: '\2713';
}

.flash-error {
    background: rgba(199, 91, 91, 0.15);
    border-color: rgba(199, 91, 91, 0.4);
    color: var(--color-error);
}

.flash-error::before {
    content: '\2717';
}

.flash-warning {
    background: rgba(212, 168, 75, 0.15);
    border-color: rgba(212, 168, 75, 0.4);
    color: var(--color-warning);
}

.flash-warning::before {
    content: '\26A0';
}

.flash-info {
    background: rgba(123, 158, 184, 0.15);
    border-color: rgba(123, 158, 184, 0.4);
    color: var(--color-info);
}

.flash-info::before {
    content: '\2139';
}

/* === FORMS === */
fieldset {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
    background: var(--bg-paper);
}

legend {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    padding: 0 1rem;
    color: var(--text-primary);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-ink);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    transition: all var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.15);
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--accent-terracotta);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    margin-bottom: 0;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* === SIGNUP PAGE === */
.signup-page {
    max-width: 1000px;
    margin: 0 auto;
}

.signup-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    min-height: 600px;
}

.signup-illustration {
    position: sticky;
    top: 12rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    align-self: start;
}

/* Corner decorations */
.signup-illustration::before,
.signup-illustration::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: var(--accent-terracotta);
    border-style: solid;
    opacity: 0.3;
}

.signup-illustration::before {
    top: 1rem;
    left: 1rem;
    border-width: 2px 0 0 2px;
}

.signup-illustration::after {
    bottom: 1rem;
    right: 1rem;
    border-width: 0 2px 2px 0;
}

.signup-illustration > * {
    position: relative;
    z-index: 1;
}

.signup-illustration svg {
    width: 100%;
    max-width: 260px;
    height: auto;
    color: var(--accent-terracotta);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.signup-illustration h2 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

.signup-illustration p {
    color: var(--text-muted);
    text-align: center;
}

.signup-form-container {
    padding: 2rem 0;
}

.signup-form-container h1 {
    margin-bottom: 0.5rem;
}

.signup-form-container .subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.pricing-highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(125, 154, 125, 0.15);
    border: 1px solid rgba(125, 154, 125, 0.4);
    border-radius: var(--radius-sm);
    color: var(--color-success);
    font-weight: 600;
    margin-bottom: 2rem;
}

.pricing-highlight .icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.signup-form {
    margin-bottom: 2rem;
}

.signup-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.trust-signals {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-body);
}

.trust-item .icon {
    width: 20px;
    height: 20px;
    color: var(--color-success);
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.login-link a {
    font-weight: 500;
}

/* === LOGIN PAGE === */
.login-page {
    max-width: 1000px;
    margin: 0 auto;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 600px;
}

.login-illustration {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Corner decorations */
.login-illustration::before,
.login-illustration::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: var(--accent-terracotta);
    border-style: solid;
    opacity: 0.3;
}

.login-illustration::before {
    top: 1rem;
    left: 1rem;
    border-width: 2px 0 0 2px;
}

.login-illustration::after {
    bottom: 1rem;
    right: 1rem;
    border-width: 0 2px 2px 0;
}

.login-illustration > * {
    position: relative;
    z-index: 1;
}

.login-illustration svg {
    width: 100%;
    max-width: 260px;
    height: auto;
    color: var(--accent-terracotta);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.login-illustration h2 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

.login-illustration p {
    color: var(--text-muted);
    text-align: center;
}

.login-form-container {
    padding: 2rem 0;
}

.login-form-container h1 {
    margin-bottom: 0.5rem;
}

.login-form-container .subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.signup-link a {
    font-weight: 500;
}

/* === AUTH PAGES (Challenges: New Password, MFA) === */
.auth-page {
    max-width: 600px;
    margin: 0 auto;
}

.auth-page.auth-centered {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding-top: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card-header .auth-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-terracotta);
    margin-bottom: 1.5rem;
}

.auth-card-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-card-header p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-help {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* Form error messages */
.form-error {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(199, 91, 91, 0.1);
    border: 1px solid rgba(199, 91, 91, 0.3);
    border-radius: var(--radius-sm);
    color: var(--color-error);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.form-error .icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* MFA input */
.mfa-input {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    padding: 1rem !important;
}

.mfa-input::placeholder {
    letter-spacing: 0.25rem;
    opacity: 0.4;
}

/* Password requirements */
.password-requirements {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.password-requirements p {
    color: var(--text-body);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.password-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.password-requirements li {
    color: var(--text-muted);
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.password-requirements li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--accent-terracotta);
}

/* Legacy subscribe page support */
.subscribe-page {
    max-width: 600px;
    margin: 0 auto;
}

.subscribe-page h1 {
    text-align: center;
    margin-bottom: 1rem;
}

.subscribe-page > p {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.subscribe-form-large {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.subscribe-benefits {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-terracotta);
}

.subscribe-benefits h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.subscribe-benefits ul {
    list-style: none;
    margin-left: 0;
    margin-bottom: 0;
}

.subscribe-benefits li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-body);
}

.subscribe-benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d9a7d' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.privacy-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    font-style: italic;
}

/* === MESSAGE PAGES (Success, Error, Pending) === */
.message-page {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 0;
}

.message-icon {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    animation: fadeIn 0.6s ease-out;
}

.message-icon svg {
    width: 100px;
    height: 100px;
}

.message-page.success .message-icon svg {
    color: var(--color-success);
}

.message-page.error .message-icon svg {
    color: var(--color-error);
}

.message-page h1 {
    animation: fadeUp 0.6s ease-out 0.1s both;
}

.message-page > p {
    font-size: 1.125rem;
    animation: fadeUp 0.6s ease-out 0.2s both;
}

.message-tips,
.next-steps,
.help-section,
.feedback-section {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2.5rem 0;
    text-align: left;
    animation: fadeUp 0.6s ease-out 0.3s both;
}

.message-tips h3,
.next-steps h3,
.help-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.error-detail {
    background: rgba(199, 91, 91, 0.15);
    color: var(--color-error);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(199, 91, 91, 0.4);
    margin: 1.5rem 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
}

.small-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Success page celebration */
.celebration-wrapper {
    position: relative;
    display: inline-block;
}

.celebration-wrapper .celebration-confetti {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.success-checkmark-animated .circle-draw {
    animation: circleDraw 0.6s ease-out forwards;
}

.success-checkmark-animated .check-draw {
    animation: drawCheck 0.5s ease-out 0.5s forwards;
}

/* === DASHBOARD === */
/* === DASHBOARD - ELEVATED DESIGN === */
.dashboard {
    max-width: 900px;
    margin: 0 auto;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-greeting {
    margin-bottom: 1.5rem;
}

.greeting-time {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-terracotta);
    margin-bottom: 0.5rem;
}

.dashboard-greeting h1 {
    font-size: 2rem;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Permit Pulse Section */
.permit-pulse {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.pulse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.pulse-header h2 {
    font-size: 1.125rem;
    margin: 0;
}

.pulse-jurisdiction {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.pulse-stats {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.5rem;
}

.pulse-stat {
    text-align: center;
    padding: 1rem 0;
}

.pulse-stat-featured {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border-left: 3px solid var(--accent-terracotta);
}

.pulse-stat-value {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.pulse-stat-featured .pulse-stat-value {
    font-size: 3rem;
    color: var(--accent-terracotta);
}

.pulse-stat-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.pulse-stat-trend {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.pulse-stat-trend.positive {
    color: var(--color-success);
}

.pulse-stat-trend.negative {
    color: var(--color-error);
}

/* Recent Reports Section */
.recent-reports {
    margin-bottom: 2.5rem;
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reports-header h2 {
    font-size: 1.125rem;
    margin: 0;
}

.view-all-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8125rem;
    color: var(--accent-terracotta);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.view-all-link:hover {
    color: var(--accent-gold);
}

.report-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.report-card {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.report-card:hover {
    border-color: var(--accent-terracotta);
    background: var(--bg-elevated);
}

.report-card-date {
    text-align: center;
}

.report-day {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.report-month {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.report-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.report-card-count {
    font-weight: 600;
    color: var(--text-primary);
}

.report-card-breakdown {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Account Links */
.account-links {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.5rem;
}

.account-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    color: var(--text-body);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.account-link:hover {
    color: var(--accent-terracotta);
}

.account-link-label {
    font-size: 0.9375rem;
}

.account-link-arrow {
    font-size: 1.25rem;
    opacity: 0.5;
    transition: transform var(--transition-fast);
}

.account-link:hover .account-link-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* Legacy stat-card support */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    position: relative;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-terracotta);
    box-shadow: var(--shadow-glow);
}

.stat-card h3 {
    font-family: 'Crimson Pro', serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
}

.stat-trend.positive {
    color: var(--color-success);
}

.stat-trend.negative {
    color: var(--color-error);
}

.stat-trend .icon {
    width: 16px;
    height: 16px;
}

.quick-actions {
    margin-bottom: 3rem;
}

.quick-actions h2 {
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.empty-state .icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* === REPORTS PAGE - ELEVATED === */
.reports-page {
    max-width: 900px;
    margin: 0 auto;
}

.reports-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.reports-page-header h1 {
    margin-bottom: 0.25rem;
}

.reports-page-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

.back-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-terracotta);
}

.date-filter {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.date-filter form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-fields {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.filter-separator {
    color: var(--text-muted);
    padding-bottom: 0.75rem;
}

.date-filter .form-group {
    margin-bottom: 0;
}

.date-filter label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.date-filter input[type="date"] {
    width: auto;
    min-width: 150px;
    margin-bottom: 0;
}

/* Reports List */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.report-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.report-row:last-child {
    border-bottom: none;
}

.report-row:hover {
    background: var(--bg-elevated);
}

.report-row-date {
    display: flex;
    flex-direction: column;
}

.report-row-day {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.report-row-full {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.report-row-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.report-row-total {
    font-weight: 600;
    color: var(--text-primary);
}

.report-row-breakdown {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.report-row-actions {
    display: flex;
    gap: 0.5rem;
}

/* Legacy table support */
.reports-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.reports-table th,
.reports-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.reports-table th {
    background: var(--bg-elevated);
    font-family: 'Crimson Pro', serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.reports-table td {
    color: var(--text-body);
}

.reports-table tr:hover td {
    background: var(--bg-elevated);
}

.reports-table tr:last-child td {
    border-bottom: none;
}

.no-reports {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

/* === PREFERENCES PAGE - ELEVATED === */
.preferences-page {
    max-width: 700px;
    margin: 0 auto;
}

.preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.preferences-header h1 {
    margin-bottom: 0.25rem;
}

.preferences-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* Subscription Status */
.subscription-status {
    display: flex;
    gap: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.status-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Preference Form */
.preferences-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pref-section {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.pref-section-header {
    margin-bottom: 1.25rem;
}

.pref-section-header h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.pref-section-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Toggle switches */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-ink);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-item:hover {
    border-color: var(--accent-terracotta);
}

.toggle-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.toggle-item-label {
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-item-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* CSS-only toggle switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    transition: var(--transition-fast);
    border-radius: 26px;
}

.toggle-switch .slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: var(--transition-fast);
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: var(--accent-terracotta);
    border-color: var(--accent-terracotta);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(22px);
    background-color: var(--bg-ink);
}

/* Checkbox Cards */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.checkbox-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1rem;
    background: var(--bg-ink);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.checkbox-card:hover {
    border-color: var(--accent-terracotta);
}

.checkbox-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-card:has(input:checked) {
    background: rgba(193, 127, 89, 0.15);
    border-color: var(--accent-terracotta);
}

.checkbox-card-label {
    font-size: 0.9375rem;
    color: var(--text-body);
}

.checkbox-card:has(input:checked) .checkbox-card-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Bundle Picker */
.bundle-picker {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

.bundle-card {
    display: flex;
    align-items: flex-start;
    text-align: left;
    padding: 1rem 1.125rem;
}

.checkbox-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 0.25rem;
}

.checkbox-card-title {
    font-family: var(--font-headline);
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.checkbox-card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.bundle-card:has(input:checked) .checkbox-card-title {
    color: var(--accent-terracotta-light);
}

.coverage-pricing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.875rem 1.125rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.coverage-price-label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coverage-price-value {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    color: var(--accent-gold);
    font-weight: 600;
}

@media (min-width: 640px) {
    .bundle-picker {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cost Input */
.cost-input-wrapper {
    display: flex;
    align-items: center;
    max-width: 180px;
}

.cost-prefix {
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
}

.cost-input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 0;
}

/* Format Options */
.format-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-ink);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.format-option:hover {
    border-color: var(--accent-terracotta);
}

.format-option:has(input:checked) {
    background: rgba(193, 127, 89, 0.1);
    border-color: var(--accent-terracotta);
}

.format-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-terracotta);
    flex-shrink: 0;
}

.format-option-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.format-option-label {
    font-weight: 500;
    color: var(--text-primary);
}

.format-option-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Preferences Actions */
.preferences-actions {
    padding-top: 0.5rem;
}

/* === DANGER ZONE === */
.danger-zone {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(199, 91, 91, 0.3);
    border-radius: var(--radius-md);
    background: rgba(199, 91, 91, 0.05);
}

.danger-zone h3 {
    font-size: 1rem;
    color: var(--color-error);
    margin-bottom: 0.5rem;
}

.danger-zone p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Not Subscribed */
.not-subscribed {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.not-subscribed h2 {
    margin-bottom: 0.75rem;
}

.not-subscribed p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Legacy checkbox support */
.checkbox-group {
    display: grid;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-ink);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkbox-label:hover {
    border-color: var(--accent-terracotta);
}

.checkbox-label input {
    margin: 0;
}

.checkbox-label span {
    color: var(--text-body);
}

/* Legacy preference-section support */
.preference-section {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.preference-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* === ABOUT PAGE === */
/* === ABOUT PAGE - EDITORIAL LAYOUT === */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}

.about-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeUp 0.6s ease-out both;
}

.about-eyebrow {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-terracotta);
    margin-bottom: 1rem;
}

.about-header h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-header .lead {
    font-size: 1.125rem;
    color: var(--text-body);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.about-section-number {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-terracotta);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* About Sources Section */
.about-sources {
    margin-bottom: 4rem;
    animation: fadeUp 0.6s ease-out 0.1s both;
}

.about-sources-header {
    margin-bottom: 1rem;
}

.about-sources-header h2 {
    margin-bottom: 0;
}

.about-sources-intro {
    color: var(--text-body);
    margin-bottom: 2rem;
}

.data-sources {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.data-source-card {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all var(--transition-smooth);
}

.data-source-card:hover {
    border-color: var(--accent-terracotta);
    transform: translateY(-2px);
}

.source-jurisdiction {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.source-portal {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-terracotta);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.data-source-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}

/* About Data Section */
.about-data {
    margin-bottom: 4rem;
    animation: fadeUp 0.6s ease-out 0.2s both;
}

.about-data-header {
    margin-bottom: 1.5rem;
}

.about-data-header h2 {
    margin-bottom: 0;
}

.data-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-paper);
}

.data-field {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
}

.data-field:nth-child(even) {
    border-right: none;
}

.data-field:nth-last-child(-n+2) {
    border-bottom: none;
}

.data-field-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-terracotta);
    margin-bottom: 0.25rem;
}

.data-field-value {
    font-size: 0.9375rem;
    color: var(--text-body);
}

.data-fields-disclaimer {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* About Process Section */
.about-process {
    margin-bottom: 4rem;
    animation: fadeUp 0.6s ease-out 0.3s both;
}

.about-process-header {
    margin-bottom: 1.5rem;
}

.about-process-header h2 {
    margin-bottom: 0;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-paper);
}

.process-step-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.process-step-item:last-child {
    border-bottom: none;
}

.process-step-item:hover {
    background: var(--bg-elevated);
}

.process-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-terracotta);
}

.process-step-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.process-step-content p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* About Contact Section */
.about-contact {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    animation: fadeUp 0.6s ease-out 0.4s both;
}

.about-contact p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.contact-email {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: var(--accent-terracotta);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-email:hover {
    color: var(--accent-gold);
}

/* === BILLING STATUS === */
.billing-status {
    max-width: 700px;
    margin: 0 auto;
}

.billing-card {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.billing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.billing-info h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.billing-info .status-badge {
    margin-top: 0.5rem;
}

.billing-price {
    text-align: right;
}

.billing-price .amount {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.billing-price .period {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.billing-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.billing-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.billing-detail-item .label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.billing-detail-item .value {
    font-weight: 500;
    color: var(--text-primary);
}

.billing-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* === STATUS BADGES === */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: 'Crimson Pro', serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge-large {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.status-active, .status-completed, .status-healthy, .status-closed, .status-sent {
    background: rgba(125, 154, 125, 0.2);
    color: var(--color-success);
}

.status-pending, .status-in-progress, .status-processing, .status-trialing {
    background: rgba(123, 158, 184, 0.2);
    color: var(--color-info);
}

.status-partial, .status-warning, .status-paused, .status-retrying {
    background: rgba(212, 168, 75, 0.2);
    color: var(--color-warning);
}

.status-failed, .status-error, .status-bounced, .status-canceled, .status-payment-failed {
    background: rgba(199, 91, 91, 0.2);
    color: var(--color-error);
}

.status-unsubscribed, .status-inactive, .status-pending-payment {
    background: rgba(138, 133, 128, 0.2);
    color: var(--text-muted);
}

/* === ADMIN DASHBOARD === */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 70px);
    max-width: none;
    margin: 0;
    padding: 0;
}

.admin-sidebar {
    background: var(--bg-paper);
    border-right: 1px solid var(--border-subtle);
    padding: 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.admin-nav-header {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    box-sizing: border-box;
}

.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-terracotta);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bg-ink);
}

.admin-nav-list {
    list-style: none;
    margin: 0;
    padding: 0.75rem 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.admin-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.admin-nav-link.active {
    color: var(--accent-terracotta);
    background: rgba(193, 127, 89, 0.1);
    border-left-color: var(--accent-terracotta);
}

.admin-nav-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.admin-nav-link:hover svg,
.admin-nav-link.active svg {
    opacity: 1;
}

.admin-layout main,
.admin-main {
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--bg-ink);
    min-height: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-paper);
    box-sizing: border-box;
}

.admin-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: 'IBM Plex Mono', monospace;
}

.admin-content {
    padding: 2rem;
}

/* All admin page containers share consistent styling */
.admin-dashboard,
.admin-system,
.admin-batches,
.admin-subscribers,
.admin-permits,
.admin-reports {
    width: 100%;
}

/* === ELEVATED ADMIN - SYSTEM HEALTH === */
.system-health {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.health-primary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.health-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: pulse 2s ease-in-out infinite;
}

.health-healthy .health-indicator {
    background: var(--color-success);
    box-shadow: 0 0 8px rgba(125, 154, 125, 0.5);
}

.health-warning .health-indicator {
    background: var(--color-warning);
    box-shadow: 0 0 8px rgba(212, 168, 75, 0.5);
}

.health-error .health-indicator {
    background: var(--color-error);
    box-shadow: 0 0 8px rgba(199, 91, 91, 0.5);
    animation: pulse-error 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes pulse-error {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.health-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.health-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.health-stats {
    display: flex;
    gap: 2rem;
}

.health-stat {
    text-align: center;
    padding: 0 1rem;
    border-left: 1px solid var(--border-subtle);
}

.health-stat:first-child {
    border-left: none;
}

.health-stat-value {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.health-stat-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.health-stat-warning .health-stat-value {
    color: var(--color-warning);
}

/* === ELEVATED ADMIN - SECTION STYLING === */
.admin-section {
    margin-bottom: 2rem;
}

.admin-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-section-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-terracotta);
    letter-spacing: 0.05em;
}

.admin-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.section-view-all {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-terracotta);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.section-view-all:hover {
    color: var(--accent-gold);
}

/* Legacy stats card support */
.stats-section {
    margin-bottom: 2rem;
}

.stats-card {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.stats-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stats-card-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stats-card-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-card-healthy {
    border-color: rgba(125, 154, 125, 0.4);
}

.stats-card-healthy .stats-card-value {
    color: var(--color-success);
}

.stats-card-warning {
    border-color: rgba(212, 168, 75, 0.4);
}

.stats-card-warning .stats-card-value {
    color: var(--color-warning);
}

.stats-card-error {
    border-color: rgba(199, 91, 91, 0.4);
}

.stats-card-error .stats-card-value {
    color: var(--color-error);
}

/* Section titles (legacy) */
.section-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-link {
    font-size: 0.875rem;
    color: var(--accent-terracotta);
}

/* Alert cards */
.alerts-section {
    margin-bottom: 2rem;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.alert-warning {
    border-left-color: var(--color-warning);
}

.alert-error {
    border-left-color: var(--color-error);
}

.alert-info {
    border-left-color: var(--color-info);
}

.alert-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

.alert-warning .alert-icon {
    color: var(--color-warning);
}

.alert-error .alert-icon {
    color: var(--color-error);
}

.alert-info .alert-icon {
    color: var(--color-info);
}

.alert-content {
    flex: 1;
}

.alert-title {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.alert-message {
    color: var(--text-body);
    font-size: 0.9375rem;
    margin: 0;
}

/* Admin tables */
.admin-table-container {
    width: 100%;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.admin-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-family: 'Crimson Pro', serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-body);
    font-size: 0.9375rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-elevated);
}

.admin-table .cell-primary {
    color: var(--text-primary);
    font-weight: 500;
}

.admin-table .cell-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* Quick actions grid */
.quick-actions-section {
    margin-bottom: 2rem;
}

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

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-body);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.quick-action-btn:hover:not(.disabled) {
    background: var(--bg-elevated);
    border-color: var(--accent-terracotta);
    color: var(--text-primary);
}

.quick-action-btn:hover:not(.disabled) svg {
    color: var(--accent-terracotta);
}

.quick-action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-action-btn span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
}

.modal-description {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(.disabled) {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Filters */
.filters-section {
    width: 100%;
    margin-bottom: 1.5rem;
}

.filters-form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    padding: 1rem;
    box-sizing: border-box;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem 0.75rem;
    background: var(--bg-ink);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 150px;
    margin-bottom: 0;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent-terracotta);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.filter-actions-divider {
    width: 1px;
    height: 1.5rem;
    background: var(--border-subtle);
    margin: 0 0.25rem;
}

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.info-value.mono {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8125rem;
    word-break: break-all;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tier-badge-large {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.tier-daily {
    background: rgba(193, 127, 89, 0.2);
    color: var(--accent-terracotta);
}

.tier-weekly {
    background: rgba(212, 168, 75, 0.2);
    color: var(--accent-gold);
}

/* Format badges */
.format-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.format-xlsx {
    background: rgba(125, 154, 125, 0.2);
    color: var(--color-success);
}

.format-csv {
    background: rgba(212, 168, 75, 0.2);
    color: var(--color-warning);
}

.format-badge-sub {
    font-size: 0.65rem;
    opacity: 0.8;
}

/* Back link */
.back-link {
    margin-bottom: 1rem;
}

.link-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.link-back:hover {
    color: var(--text-primary);
}

/* Text utilities */
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-success { color: var(--color-success); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }
.text-center { text-align: center; }

/* Spacing utilities */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Display utilities - use !important to override component-specific display rules */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

/* Flexbox utilities */
.flex-1 { flex: 1; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }
.gap-1 { gap: 0.375rem; }

/* Text size utilities */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* Additional color utilities */
.text-body { color: var(--text-body); }
.text-accent-warm { color: var(--accent-terracotta); }
.text-accent-primary { color: var(--accent-gold); }

/* Icon sizing utilities */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-inline { display: inline-block; vertical-align: middle; margin-right: 0.375rem; }

/* Select height utility */
.select-multi { height: 80px; }

/* Progress bar width utilities (0-100 in steps of 5) */
.progress-0 { width: 0%; }
.progress-5 { width: 5%; }
.progress-10 { width: 10%; }
.progress-15 { width: 15%; }
.progress-20 { width: 20%; }
.progress-25 { width: 25%; }
.progress-30 { width: 30%; }
.progress-35 { width: 35%; }
.progress-40 { width: 40%; }
.progress-45 { width: 45%; }
.progress-50 { width: 50%; }
.progress-55 { width: 55%; }
.progress-60 { width: 60%; }
.progress-65 { width: 65%; }
.progress-70 { width: 70%; }
.progress-75 { width: 75%; }
.progress-80 { width: 80%; }
.progress-85 { width: 85%; }
.progress-90 { width: 90%; }
.progress-95 { width: 95%; }
.progress-100 { width: 100%; }

/* Opacity utilities */
.opacity-60 { opacity: 0.6; }
.opacity-100 { opacity: 1; }

/* Animation utilities */
@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}
.fade-out { animation: fadeOut 0.3s ease-out forwards; }

/* Animation delay utilities (for staggered animations) */
.anim-delay-0 { animation-delay: 0s; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }
.anim-delay-7 { animation-delay: 0.7s; }
.anim-delay-8 { animation-delay: 0.8s; }
.anim-delay-9 { animation-delay: 0.9s; }

/* Confetti animation delays (for SVG animations without inline styles) */
.confetti-delay-0 { --delay: 0s; }
.confetti-delay-1 { --delay: 0.05s; }
.confetti-delay-2 { --delay: 0.1s; }
.confetti-delay-3 { --delay: 0.15s; }
.confetti-delay-4 { --delay: 0.2s; }
.confetti-delay-5 { --delay: 0.25s; }
.confetti-delay-6 { --delay: 0.3s; }
.confetti-delay-7 { --delay: 0.35s; }
.confetti-delay-8 { --delay: 0.4s; }

/* Container utility */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 200px 1fr;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-illustration {
        order: -1;
    }

    .hero-illustration::before {
        width: 200px;
        height: 200px;
    }

    .hero-illustration svg.hero-building {
        max-width: 300px;
    }

    .hero-text h1::after {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        align-items: center;
    }

    .hero-social-proof {
        margin-left: auto;
        margin-right: auto;
    }

    .value-props-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .signup-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .signup-illustration {
        padding: 2rem;
    }

    .signup-illustration svg {
        max-width: 180px;
    }

    .login-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .login-illustration {
        padding: 2rem;
    }

    .login-illustration svg {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        gap: 1rem;
    }

    header ul {
        gap: 1.5rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .hero {
        padding: 2rem 1.5rem;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .hero-text h1 .word {
        display: inline;
    }

    .hero-text p {
        font-size: 1.0625rem;
    }

    .hero-illustration::before {
        width: 160px;
        height: 160px;
        filter: blur(25px);
    }

    .hero-illustration svg.hero-building {
        max-width: 260px;
    }

    .hero-social-proof {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }

    .features-bento {
        grid-template-columns: 1fr;
    }

    .feature-hero {
        grid-row: auto;
    }

    .value-props-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .value-prop {
        padding: 1.5rem 0;
    }

    .value-prop h3 {
        font-size: 1.25rem;
    }

    /* Dashboard mobile */
    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-actions .btn {
        flex: 1;
    }

    .pulse-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pulse-stat-featured {
        border-left: none;
        border-top: 3px solid var(--accent-terracotta);
    }

    .report-card {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .report-card .btn {
        grid-column: 1 / -1;
    }

    .report-card-breakdown {
        display: none;
    }

    /* Reports page mobile */
    .reports-page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-fields {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .filter-separator {
        display: none;
    }

    .report-row {
        grid-template-columns: 1fr auto;
        gap: 1rem;
    }

    .report-row-date {
        grid-column: 1 / -1;
    }

    .report-row-breakdown {
        display: none;
    }

    /* Preferences mobile */
    .preferences-header {
        flex-direction: column;
        gap: 1rem;
    }

    .subscription-status {
        flex-direction: column;
        gap: 1rem;
    }

    /* Admin mobile */
    .system-health {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .health-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .health-stat {
        border-left: none;
        padding: 0;
    }

    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* About page mobile */
    .data-sources {
        grid-template-columns: 1fr;
    }

    .data-fields {
        grid-template-columns: 1fr;
    }

    .data-field {
        border-right: none;
    }

    .data-field:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--border-subtle);
    }

    .data-field:last-child {
        border-bottom: none;
    }

    .process-step-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .who-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .who-list {
        gap: 0.5rem;
    }

    .who-item {
        font-size: 1rem;
    }

    .cta-section {
        padding: 2.5rem 1.5rem;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-subhead {
        font-size: 1.0625rem;
    }

    .cta-proof {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cta-proof-divider {
        width: 40px;
        height: 1px;
    }

    .cta-proof-number {
        font-size: 1.5rem;
    }

    .signup-illustration {
        display: none;
    }

    .signup-form-container {
        padding: 0;
    }

    .login-illustration {
        display: none;
    }

    .login-form-container {
        padding: 0;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-card-header .auth-icon {
        width: 40px;
        height: 40px;
    }

    .mfa-input {
        font-size: 1.25rem;
        letter-spacing: 0.375rem;
    }

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

    .admin-sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100vh;
        z-index: 100;
        transition: left var(--transition-smooth);
    }

    .admin-sidebar.open {
        left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .date-filter form {
        flex-direction: column;
        align-items: stretch;
    }

    .date-filter input[type="date"] {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .report-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .reports-table {
        font-size: 0.875rem;
    }

    .reports-table th,
    .reports-table td {
        padding: 0.75rem 1rem;
    }

    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group input,
    .filter-group select {
        min-width: auto;
        width: 100%;
    }

    .filter-actions {
        margin-left: 0;
        justify-content: flex-end;
    }

    .billing-header {
        flex-direction: column;
        gap: 1rem;
    }

    .billing-price {
        text-align: left;
    }

    .billing-actions {
        flex-direction: column;
    }
}

/* === LEGACY SUBSCRIBE SECTION SUPPORT (Landing Page) === */
.subscribe-section {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.subscribe-section h2 {
    margin-bottom: 0.5rem;
}

.subscribe-section > p {
    margin-bottom: 2rem;
}

.subscribe-form {
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form .form-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.subscribe-form input[type="email"],
.subscribe-form input[type="text"] {
    flex: 1;
    background: var(--bg-ink);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    margin: 0;
}

.subscribe-form input::placeholder {
    color: var(--text-muted);
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.15);
}

.subscribe-note {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    font-style: italic;
}

/* === ADDITIONAL ADMIN STYLES === */
.jurisdiction-section,
.recent-batches-section {
    margin-bottom: 2rem;
}

.stats-grid-compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stats-grid-compact .stats-card {
    padding: 1rem;
}

.stats-grid-compact .stats-card-value {
    font-size: 1.5rem;
}

.stats-grid-compact .stats-card-label {
    font-size: 0.75rem;
}

.batch-stats-section,
.batch-timing-section,
.batch-permits-section {
    margin-bottom: 1.5rem;
}

.status-summary {
    margin-bottom: 1.5rem;
}

.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.status-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-body);
}

.status-summary-badge strong {
    font-weight: 600;
    color: var(--text-primary);
}

.status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.status-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-banner-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.status-banner-info strong {
    font-size: 1.125rem;
    color: var(--text-primary);
}

.status-banner-info span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.subscriber-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.subscriber-email {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.subscriber-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.subscriber-actions {
    display: flex;
    gap: 0.5rem;
}

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

.preference-card {
    padding: 1rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.preference-card h4 {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}

.preference-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preference-list li {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.permit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.permit-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-family: 'IBM Plex Mono', monospace;
}

.permit-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
}

.permit-jurisdiction {
    font-size: 0.9375rem;
    color: var(--text-body);
}

.permit-section {
    margin-bottom: 1.5rem;
}

/* Version badge */
.version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(212, 168, 75, 0.15);
    color: var(--accent-gold);
    letter-spacing: 0.02em;
}

.version-badge-sm {
    padding: 0.125rem 0.375rem;
    font-size: 0.6875rem;
}

/* Change history timeline */
.change-timeline {
    padding: 0.5rem 0 0.5rem 1.5rem;
    border-left: 2px solid var(--border-medium);
}

.timeline-entry {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-terracotta);
    border: 2px solid var(--bg-ink);
    transform: translateX(-50%);
}

.timeline-content {
    padding: 0.75rem 1rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
}

.timeline-changes {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.change-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    flex-wrap: wrap;
}

.change-field {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
}

.change-old {
    color: var(--text-muted);
    text-decoration: line-through;
    word-break: break-word;
}

.change-arrow {
    flex-shrink: 0;
    color: var(--accent-terracotta);
}

.change-new {
    color: var(--accent-gold);
    font-weight: 500;
    word-break: break-word;
}

/* Responsive: timeline change items stack on mobile */
@media (max-width: 768px) {
    .change-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .change-field {
        min-width: unset;
    }

    .change-arrow {
        display: none;
    }

    .change-old::before {
        content: "Was: ";
        font-weight: 500;
    }

    .change-new::before {
        content: "Now: ";
        font-weight: 500;
    }
}

.dlq-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.dlq-count {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dlq-count-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dlq-count-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dlq-actions {
    display: flex;
    gap: 0.5rem;
}

.system-section {
    width: 100%;
    margin-bottom: 2rem;
}

.generate-report-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.generate-form,
.manual-retry-form,
.test-email-form,
.dlq-section,
.dlq-status-card,
.admin-form-card {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.form-row .form-group input,
.form-row .form-group select {
    margin-bottom: 0;
}

.filter-group-wide,
.form-group-wide {
    flex: 1;
    min-width: 200px;
}

.status-form {
    padding: 1rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.results-summary {
    margin-bottom: 1rem;
}

.results-count {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.results-count strong {
    color: var(--text-primary);
}

.cell-wrap {
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
}

.error-section {
    margin-bottom: 1.5rem;
}

.pagination-section {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .stats-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-banner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .status-banner-content {
        flex-direction: column;
    }

    .subscriber-header {
        flex-direction: column;
        gap: 1rem;
    }

    .subscriber-actions {
        width: 100%;
    }

    .subscriber-actions .btn {
        flex: 1;
    }

    .permit-header {
        flex-direction: column;
        gap: 1rem;
    }

    .permit-number {
        font-size: 1.25rem;
    }

    .dlq-status-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dlq-actions {
        width: 100%;
    }

    .dlq-actions .btn {
        flex: 1;
    }

    .manual-retry-form .form-row,
    .test-email-form .form-row {
        flex-direction: column;
    }

    .form-group-wide {
        min-width: auto;
        width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .preferences-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        max-width: none;
    }
}

/* =============================================================================
   SUBSCRIPTION OVERVIEW - Revenue & Status
   ============================================================================= */

/* Revenue Hero Strip */
.sub-revenue-strip {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.75rem 2rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.sub-revenue-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-terracotta), var(--accent-gold), transparent);
}

.sub-revenue-main {
    flex: 1;
}

.sub-revenue-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-terracotta);
    margin-bottom: 0.375rem;
}

.sub-revenue-amount {
    font-family: 'Playfair Display', serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.sub-revenue-detail {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.sub-revenue-divider {
    width: 1px;
    height: 4rem;
    background: var(--border-medium);
    flex-shrink: 0;
}

.sub-revenue-metrics {
    display: flex;
    gap: 2rem;
}

.sub-revenue-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.sub-revenue-metric-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sub-revenue-metric-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Status Cards Row */
.sub-status-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.sub-status-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    position: relative;
}

a.sub-status-card:hover {
    border-color: var(--border-medium);
    background: var(--bg-elevated);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.sub-status-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    flex-shrink: 0;
}

.sub-status-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.sub-status-card-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sub-status-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-status-card-arrow {
    font-size: 1.375rem;
    color: var(--text-faint);
    transition: transform var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}

a.sub-status-card:hover .sub-status-card-arrow {
    transform: translateX(2px);
    color: var(--accent-terracotta);
}

/* Card state variants */
.sub-status-card-healthy .sub-status-card-icon {
    background: rgba(125, 154, 125, 0.15);
    color: var(--color-success);
}

.sub-status-card-warning {
    border-color: rgba(212, 168, 75, 0.3);
}

.sub-status-card-warning .sub-status-card-icon {
    background: rgba(212, 168, 75, 0.15);
    color: var(--color-warning);
}

.sub-status-card-warning .sub-status-card-value {
    color: var(--color-warning);
}

/* Webhooks Section */
.sub-webhooks-section {
    margin-bottom: 2rem;
}

.sub-webhooks-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sub-webhooks-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sub-webhooks-filter label {
    white-space: nowrap;
    height: 2rem;
    line-height: 2rem;
}

.sub-webhooks-filter select {
    height: 2rem;
    padding: 0 0.625rem;
    background: var(--bg-ink);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 2rem;
    margin: 0;
    vertical-align: middle;
}

.sub-webhooks-filter select:focus {
    outline: none;
    border-color: var(--accent-terracotta);
}

.sub-webhooks-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.sub-webhooks-toolbar .btn svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .sub-status-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sub-revenue-strip {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.25rem;
        text-align: center;
    }

    .sub-revenue-divider {
        width: 100%;
        height: 1px;
    }

    .sub-revenue-amount {
        font-size: 2rem;
    }

    .sub-status-cards {
        grid-template-columns: 1fr;
    }

    .sub-webhooks-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sub-webhooks-filter {
        flex-wrap: wrap;
    }
}

/* =============================================================================
   LIVE DASHBOARD - Real-time Operations Center
   ============================================================================= */

/* Live Mode Indicator */
.live-mode-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}

.live-mode-paused .live-dot {
    background: var(--text-muted);
    animation: none;
}

.live-mode-error .live-dot {
    background: var(--color-error);
}

.live-text {
    color: var(--text-primary);
    font-weight: 500;
}

.live-status {
    color: var(--text-muted);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Pipeline Section */
.pipeline-section {
    position: relative;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.pipeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.pipeline-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pipeline-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.pipeline-status {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
}

.pipeline-status-idle {
    background: rgba(138, 133, 128, 0.15);
    color: var(--text-muted);
}

.pipeline-status-active {
    background: rgba(104, 211, 145, 0.15);
    color: var(--color-success);
}

.pipeline-status-error {
    background: rgba(252, 129, 129, 0.15);
    color: var(--color-error);
}

.pipeline-status-healthy {
    background: rgba(104, 211, 145, 0.15);
    color: var(--color-success);
}

.pipeline-status-warning {
    background: rgba(246, 173, 85, 0.15);
    color: var(--color-warning);
}

.pipeline-container {
    overflow-x: auto;
    padding: 1rem 0;
}

.pipeline-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 700px;
    padding: 0 1rem;
}

/* Pipeline Node */
.pipeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.pipeline-node-ring {
    position: relative;
    width: 56px;
    height: 56px;
}

.pipeline-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pipeline-ring-bg {
    stroke: var(--border-subtle);
}

.pipeline-ring-progress {
    stroke: var(--accent-terracotta);
    transition: stroke-dashoffset 0.5s ease;
}

.pipeline-node-icon {
    position: absolute;
    top: 28px; /* Center within the 56px ring, not the entire node */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all var(--transition-smooth);
}

.pipeline-node-active .pipeline-node-icon {
    border-color: var(--accent-terracotta);
    color: var(--accent-terracotta);
    box-shadow: 0 0 20px rgba(193, 127, 89, 0.3);
}

.pipeline-node-active .pipeline-node-icon::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid var(--accent-terracotta);
    border-radius: 50%;
    animation: pipelinePulse 1.5s ease-out infinite;
}

.pipeline-node-label {
    margin-top: 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pipeline-node-count {
    margin-top: 0.25rem;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

@keyframes pipelinePulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Pipeline Connection */
.pipeline-connection {
    flex: 1;
    position: relative;
    height: 2px;
    margin: 0 0.5rem;
    margin-bottom: 2.5rem;
}

.pipeline-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-subtle);
}

.pipeline-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    overflow: hidden;
}

.pipeline-connection-active .pipeline-particles::before,
.pipeline-connection-active .pipeline-particles::after {
    content: '';
    position: absolute;
    top: -2px;
    width: 8px;
    height: 6px;
    background: var(--accent-terracotta);
    border-radius: 50%;
    animation: particleFlow 1.5s linear infinite;
    box-shadow: 0 0 10px var(--accent-terracotta);
}

.pipeline-connection-active .pipeline-particles::after {
    animation-delay: 0.75s;
}

@keyframes particleFlow {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(100% - 8px); opacity: 0; }
}

/* Dashboard Grid - Stats + Activity Feed (legacy - kept for backwards compat) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Stats Section - override global section margin */
.dashboard-grid .stats-section,
.dashboard-grid .activity-section {
    margin-bottom: 0;
}

.stats-section {
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ============================================================================
   Compact Stats Strip - Horizontal layout for dashboard metrics
   ============================================================================ */
.stats-strip {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-strip-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 2.5rem 0.5rem 1.5rem;
    position: relative;
    transition: all var(--transition-smooth);
}

.stats-strip-item:first-child {
    padding-left: 0;
}

.stats-strip-item:last-child {
    padding-right: 0;
}

.stats-strip-item:hover {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.stats-strip-item-warning .stats-strip-value {
    color: var(--color-warning);
}

.stats-strip-item-warning .stats-strip-icon {
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.1);
}

.stats-strip-divider {
    width: 1px;
    height: 2.5rem;
    background: var(--border-subtle);
    flex-shrink: 0;
}

.stats-strip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--accent-terracotta);
    flex-shrink: 0;
}

.stats-strip-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    min-width: 2ch;
    padding-left:0.75rem;
    transform: translateY(-4px);
}

.stats-strip-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.stats-strip-item .stat-delta {
    position: absolute;
    top: 0;
    right: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 600;
}

.stats-strip-item.stat-updated {
    animation: statStripPulse 0.6s ease;
}

@keyframes statStripPulse {
    0%, 100% {
        background: transparent;
        transform: scale(1);
    }
    50% {
        background: var(--bg-elevated);
        transform: scale(1.02);
    }
}

/* ============================================================================
   Expanded Activity Feed - Full-width tabular layout
   ============================================================================ */
.activity-section-expanded {
    max-height: 320px;
    margin-bottom: 1.5rem;
}

.activity-feed-tabular {
    padding: 0;
}

.activity-feed-tabular .activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.625rem 1.25rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--border-subtle);
}

.activity-feed-tabular .activity-item:last-child {
    border-bottom: none;
}

.activity-feed-tabular .activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.activity-feed-tabular .activity-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.activity-feed-tabular .activity-message {
    font-family: 'Crimson Pro', serif;
    font-size: 0.9375rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-feed-tabular .activity-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive: Stack stats strip on mobile */
@media (max-width: 768px) {
    .stats-strip {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .stats-strip-item {
        width: 100%;
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }

    .stats-strip-item:first-child,
    .stats-strip-item:last-child {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .stats-strip-divider {
        width: 100%;
        height: 1px;
    }

    .activity-section-expanded {
        max-height: 250px;
    }

    .activity-feed-tabular .activity-item {
        grid-template-columns: auto 1fr;
        gap: 0.75rem;
    }

    .activity-feed-tabular .activity-time {
        grid-column: 2;
        justify-self: start;
        font-size: 0.6875rem;
    }
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-terracotta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-smooth);
}

.stat-card:hover::before,
.stat-card-updated::before {
    transform: scaleX(1);
}

.stat-card-updated {
    animation: statPulse 0.6s ease;
}

@keyframes statPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.stat-card-warning {
    border-color: var(--color-warning);
}

.stat-card-warning::before {
    background: var(--color-warning);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--accent-terracotta);
    margin-bottom: 1rem;
}

.stat-content {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-delta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-delta-visible {
    opacity: 1;
}

.stat-delta-up {
    color: var(--color-success);
}

.stat-delta-down {
    color: var(--color-error);
}

.stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Activity Feed Section */
.activity-section {
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.activity-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.activity-live-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: rgba(104, 211, 145, 0.1);
    border-radius: var(--radius-sm);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--color-success);
}

.activity-live-text {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.typing-indicator {
    display: flex;
    gap: 3px;
    align-items: center;
}

.typing-indicator span {
    width: 4px;
    height: 4px;
    background: var(--color-success);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.activity-feed {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) var(--bg-paper);
}

/* Webkit scrollbar styling for activity feed */
.activity-feed::-webkit-scrollbar {
    width: 8px;
}

.activity-feed::-webkit-scrollbar-track {
    background: var(--bg-paper);
    border-radius: 4px;
}

.activity-feed::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.activity-feed::-webkit-scrollbar-thumb:hover {
    background: var(--accent-terracotta);
}

.activity-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    animation: activitySlideIn 0.3s ease-out;
    border-left: 3px solid transparent;
    transition: all var(--transition-fast);
}

.activity-item:hover {
    background: var(--bg-elevated);
}

.activity-item-success {
    border-left-color: var(--color-success);
}

.activity-item-error {
    border-left-color: var(--color-error);
}

.activity-item-scrape {
    border-left-color: var(--accent-terracotta);
}

.activity-item-info {
    border-left-color: var(--text-muted);
}

@keyframes activitySlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.activity-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.activity-item-success .activity-icon {
    color: var(--color-success);
}

.activity-item-error .activity-icon {
    color: var(--color-error);
}

.activity-item-scrape .activity-icon {
    color: var(--accent-terracotta);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-message {
    display: block;
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.4;
}

.activity-time {
    display: block;
    margin-top: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Jurisdiction Status Cards */
.jurisdiction-cards-section {
    margin-bottom: 2rem;
}

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

.jurisdiction-card {
    position: relative;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.jurisdiction-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.jurisdiction-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--text-muted);
    transition: background var(--transition-fast);
}

.jurisdiction-card-completed .jurisdiction-card-accent {
    background: var(--color-success);
}

.jurisdiction-card-in_progress .jurisdiction-card-accent,
.jurisdiction-card-active .jurisdiction-card-accent {
    background: var(--accent-terracotta);
}

.jurisdiction-card-failed .jurisdiction-card-accent {
    background: var(--color-error);
}

.jurisdiction-card-missing .jurisdiction-card-accent,
.jurisdiction-card-pending .jurisdiction-card-accent {
    background: var(--color-warning);
}

.jurisdiction-card-content {
    padding: 1.25rem;
    padding-left: 1.5rem;
}

.jurisdiction-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.jurisdiction-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.jurisdiction-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.jurisdiction-card-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.jurisdiction-stat {
    display: flex;
    flex-direction: column;
}

.jurisdiction-stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.jurisdiction-stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.jurisdiction-progress-container {
    margin-bottom: 1rem;
}

.jurisdiction-progress {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.jurisdiction-progress-bar {
    height: 100%;
    background: var(--accent-terracotta);
    border-radius: 2px;
    transition: width 0.5s ease;
    position: relative;
}

.jurisdiction-progress-bar.progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.jurisdiction-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.jurisdiction-circuit {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.circuit-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-success);
}

.circuit-closed .circuit-dot {
    background: var(--color-success);
}

.circuit-open .circuit-dot {
    background: var(--color-error);
}

.circuit-half_open .circuit-dot {
    background: var(--color-warning);
}

.jurisdiction-card-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(193, 127, 89, 0.05),
        transparent
    );
    pointer-events: none;
}

.jurisdiction-card-active .jurisdiction-card-sweep {
    animation: cardSweep 2s ease-in-out infinite;
}

@keyframes cardSweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Live Dashboard Specific */
.live-dashboard {
    position: relative;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-body);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.quick-action-btn:hover:not(.disabled) {
    border-color: var(--accent-terracotta);
    color: var(--accent-terracotta);
    transform: translateY(-2px);
}

.quick-action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-action-btn svg {
    stroke-width: 1.5;
}

.quick-action-btn span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Pipeline Count Animation */
.pipeline-node-count.counting {
    animation: countPulse 0.3s ease-out;
}

@keyframes countPulse {
    50% { transform: scale(1.3); color: var(--accent-gold); }
}

/* Circuit Breaker Explainer Panel */
.info-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.info-toggle:hover {
    border-color: var(--accent-terracotta);
    color: var(--accent-terracotta);
}

.info-toggle svg {
    width: 14px;
    height: 14px;
}

.explainer-panel {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-terracotta);
    border-radius: var(--radius-md);
    animation: slideDown 0.2s ease-out;
}

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

.explainer-panel h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.explainer-panel p {
    margin-bottom: 1rem;
    color: var(--text-body);
    font-size: 0.875rem;
}

.circuit-states {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.state-card {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.state-card .state-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.state-closed .state-dot {
    background: var(--color-success);
}

.state-open .state-dot {
    background: var(--color-error);
}

.state-half-open .state-dot {
    background: var(--color-warning);
}

.explainer-panel h4 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.explainer-panel ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-body);
    font-size: 0.8125rem;
}

.explainer-panel li {
    margin-bottom: 0.25rem;
}

/* Operational Tools Section */
.operational-tools-section {
    margin-bottom: 2rem;
}

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

.scenario-card {
    padding: 1.25rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.scenario-card:hover {
    border-color: var(--border-medium);
}

.scenario-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.scenario-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.scenario-card-icon.icon-warning {
    background: rgba(212, 168, 75, 0.15);
    color: var(--accent-gold);
}

.scenario-card-icon.icon-error {
    background: rgba(199, 91, 91, 0.15);
    color: var(--color-error);
}

.scenario-card h4 {
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin: 0;
}

.scenario-card p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.scenario-card-actions {
    display: flex;
    gap: 0.5rem;
}

.scenario-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.scenario-badge.badge-warning {
    background: rgba(212, 168, 75, 0.15);
    color: var(--accent-gold);
}

.scenario-badge.badge-error {
    background: rgba(199, 91, 91, 0.15);
    color: var(--color-error);
}

/* Schedule Management Section */
.schedule-section {
    margin-bottom: 2rem;
}

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

.schedule-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.schedule-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--accent-terracotta);
}

.schedule-card-content {
    flex: 1;
}

.schedule-card-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.schedule-card-meta {
    display: flex;
    gap: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.schedule-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.schedule-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.schedule-toggle.enabled {
    background: var(--accent-terracotta);
    border-color: var(--accent-terracotta);
}

.schedule-toggle.enabled::after {
    left: 22px;
    background: var(--text-primary);
}

.schedule-toggle:hover {
    border-color: var(--accent-terracotta);
}

/* Block Modal Styles */
.block-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.block-type-btn {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.block-type-btn:hover {
    border-color: var(--border-medium);
}

.block-type-btn.active {
    border-color: var(--accent-terracotta);
    color: var(--accent-terracotta);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .live-dot,
    .pipeline-node-active .pipeline-node-icon::before,
    .pipeline-connection-active .pipeline-particles::before,
    .pipeline-connection-active .pipeline-particles::after,
    .jurisdiction-card-sweep,
    .jurisdiction-progress-bar.progress-animated::after,
    .typing-indicator span {
        animation: none;
    }

    .stat-card-updated {
        animation: none;
    }

    .activity-item {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .activity-section {
        max-height: 300px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pipeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .pipeline-header-right {
        flex-wrap: wrap;
        width: 100%;
    }

    .pipeline-track {
        min-width: 600px;
    }

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

    .jurisdiction-cards {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}


/* === ADMIN MODALS (SHARED) === */

.modal-overlay {
    display: none;
    position: fixed;
    inset: var(--modal-top-offset, 0px) 0 var(--modal-bottom-offset, 0px);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-paper);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    max-height: min(90vh, calc(100% - 2rem));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) var(--bg-paper);
}

.modal-content.wide {
    max-width: 560px;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-paper);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-terracotta);
}

.modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.modal-form-group {
    margin-bottom: 1rem;
}

.modal-form-group label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.modal-form-group input,
.modal-form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-form-group input:focus,
.modal-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.15);
}

.modal-form-group select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-form-group select:focus {
    outline: none;
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.15);
}

.modal-form-group small {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 1.25rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-form-row {
        grid-template-columns: 1fr;
    }
}


/* === ADMIN HOLIDAYS === */

.holidays-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.holiday-card {
    position: relative;
    background: var(--bg-paper);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-smooth);
    animation: cardFadeIn 0.4s ease-out backwards;
}

.holiday-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.holidays-list .holiday-card:nth-child(1) { animation-delay: 0.05s; }
.holidays-list .holiday-card:nth-child(2) { animation-delay: 0.1s; }
.holidays-list .holiday-card:nth-child(3) { animation-delay: 0.15s; }
.holidays-list .holiday-card:nth-child(4) { animation-delay: 0.2s; }
.holidays-list .holiday-card:nth-child(5) { animation-delay: 0.25s; }
.holidays-list .holiday-card:nth-child(6) { animation-delay: 0.3s; }
.holidays-list .holiday-card:nth-child(7) { animation-delay: 0.35s; }
.holidays-list .holiday-card:nth-child(8) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .holiday-card {
        animation: none;
    }
}

.holiday-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: background var(--transition-fast);
}

.holiday-card-accent.recurring {
    background: var(--accent-terracotta, #c17f59);
}

.holiday-card-accent.one-time {
    background: var(--accent-gold, #d4a84b);
}

.holiday-card-accent.federal {
    background: var(--color-info, #7b9eb8);
}

.holiday-card-content {
    padding: 1rem 1.25rem 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.holiday-card-info {
    flex: 1;
    min-width: 0;
}

.holiday-card-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem 0;
    line-height: 1.3;
}

.holiday-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.holiday-meta-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.holiday-meta-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: var(--text-body);
}

.holiday-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.holiday-type-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.holiday-type-badge.recurring {
    background: rgba(193, 127, 89, 0.15);
    color: var(--accent-terracotta, #c17f59);
    border: 1px solid rgba(193, 127, 89, 0.3);
}

.holiday-type-badge.one-time {
    background: rgba(212, 168, 75, 0.15);
    color: var(--accent-gold, #d4a84b);
    border: 1px solid rgba(212, 168, 75, 0.3);
}

.holiday-type-badge.federal {
    background: rgba(123, 158, 184, 0.15);
    color: var(--color-info, #7b9eb8);
    border: 1px solid rgba(123, 158, 184, 0.25);
}

.holiday-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* holiday-year-tabs, holiday-year-tab, holiday-empty-state:
   Defined in page-specific <style> block in admin/holidays/list.html */

/* Holiday type toggle */
.holiday-type-toggle {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.holiday-type-toggle-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.holiday-type-toggle-btn.active {
    background: var(--accent-terracotta);
    color: var(--bg-dark);
}

.holiday-type-toggle-btn:hover:not(.active) {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .holiday-card-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .holiday-card-actions {
        align-self: flex-end;
    }
}
