:root {
    --radius-lg: 20px;
    --radius-xl: 28px;
    --blur-card: 18px;
    --color-primary: #1F74FF;
    --color-accent: #DC143C;
    --color-danger: #E51E2A;
    --color-success: #00C853;
    --color-warning: #FFD700;
    --color-cta: #FFD700;
    --color-text: #1A1A1A;
    --color-muted: rgba(26, 26, 26, 0.62);
    --color-background: #FFFFFF;
    --color-surface: rgba(248, 249, 250, 0.94);
    --color-elevated: rgba(248, 249, 250, 0.88);
    --color-ghost: #F8F9FA;
    --shadow-soft: 0 45px 95px -45px rgba(26, 26, 26, 0.38);
    --border-soft: rgba(26, 26, 26, 0.08);
}

.light-theme {
    --color-text: #1A1A1A;
    --color-muted: rgba(26, 26, 26, 0.62);
    --color-background: #FFFFFF;
    --color-surface: rgba(248, 249, 250, 0.94);
    --color-elevated: rgba(248, 249, 250, 0.88);
    --border-soft: rgba(26, 26, 26, 0.08);
    --shadow-soft: 0 35px 90px -45px rgba(26, 26, 26, 0.32);
}

.dark-theme {
    --color-accent: #E51E2A;
    --color-text: #FFFFFF;
    --color-muted: rgba(255, 255, 255, 0.7);
    --color-background: #000000;
    --color-surface: rgba(26, 26, 26, 0.92);
    --color-elevated: rgba(26, 26, 26, 0.83);
    --border-soft: rgba(255, 255, 255, 0.12);
    --shadow-soft: 0 45px 95px -40px rgba(0, 0, 0, 0.85);
}

*, *::before, *::after {
    box-sizing: border-box;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body {
    font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f2f5ff, #ffe9f2);
    color: var(--color-text);
    min-height: 100vh;
    margin: 0;
}

.fg-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 12% 18%, rgba(31, 116, 255, 0.22), transparent 50%),
        radial-gradient(circle at 80% 5%, rgba(220, 20, 60, 0.16), transparent 42%),
        var(--color-background);
}

.app-frame {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 100vh;
}

.sidebar {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1.5rem;
    height: calc(100vh - 3rem);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.sidebar-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-pin {
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.visitor-card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
    padding: 0.9rem;
    display: grid;
    gap: 0.6rem;
}

.visitor-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(31, 116, 255, 0.18);
    display: grid;
    place-items: center;
    font-weight: 600;
    color: var(--color-primary);
}

.sidebar-collapsed .sidebar {
    width: 80px;
    padding: 1.25rem 0.8rem;
}

.sidebar-collapsed .brand div,
.sidebar-collapsed .visitor-card,
.sidebar-collapsed .sidebar-actions form,
.sidebar-collapsed .sidebar-actions a {
    display: none;
}

.sidebar-collapsed .nav-link span {
    display: none;
}

.sidebar-collapsed .sidebar-pin {
    margin: 0 auto;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100vh;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--color-elevated);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(var(--blur-card));
    position: sticky;
    top: 1rem;
    z-index: 10;
}

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

.brand img {
    width: 48px;
    height: 48px;
}

.brand strong {
    font-size: 1.1rem;
    display: block;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 14px;
    font-size: 0.92rem;
    border: 1px solid rgba(31, 116, 255, 0.12);
    color: rgba(26, 26, 26, 0.7);
    background: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dark-theme .nav-link {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(17, 17, 17, 0.85);
}

.nav-link.is-active {
    border-color: rgba(31, 116, 255, 0.6);
    box-shadow: 0 12px 30px -18px rgba(31, 116, 255, 0.6);
    color: var(--color-primary);
    background: #fff;
}

.dark-theme .nav-link.is-active {
    background: rgba(31, 116, 255, 0.2);
}

.nav-link:hover {
    transform: translateY(-1px);
    border-color: rgba(31, 116, 255, 0.3);
}

.journey-chip,
.quick-actions a,
.feature-badge,
.action-chip,
.cta-duo .btn,
.button-glow,
.btn {
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.journey-chip:hover,
.quick-actions a:hover,
.feature-badge:hover,
.action-chip:hover,
.cta-duo .btn:hover,
.button-glow:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px -20px rgba(31, 116, 255, 0.4);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sidebar-toggle {
    border: 1px solid var(--border-soft);
    background: transparent;
    color: var(--color-text);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
    display: none;
    margin-right: auto;
}

.theme-toggle {
    border: 1px solid var(--border-soft);
    background: rgba(31, 116, 255, 0.08);
    color: var(--color-text);
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(31, 116, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: rgba(31, 116, 255, 0.15);
}

.theme-toggle__icon {
    display: none;
    font-size: 1.3rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.theme-toggle[data-theme-state="system"] [data-theme-icon="system"],
.theme-toggle[data-theme-state="dark"] [data-theme-icon="dark"],
.theme-toggle[data-theme-state="light"] [data-theme-icon="light"] {
    display: inline-flex;
}

.theme-toggle--pill {
    border-radius: 999px;
    width: 78px;
    height: 32px;
    padding: 0 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.theme-toggle__track {
    position: absolute;
    inset: 4px;
    border-radius: 999px;
    background: rgba(31, 116, 255, 0.15);
}

.theme-toggle--pill .theme-toggle__icon {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    opacity: 0.4;
}

.theme-toggle--pill[data-theme-state="dark"] [data-theme-icon="dark"],
.theme-toggle--pill[data-theme-state="light"] [data-theme-icon="light"],
.theme-toggle--pill[data-theme-state="system"] [data-theme-icon="system"] {
    opacity: 1;
    color: var(--color-primary);
}

.avatar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: rgba(248, 249, 250, 0.55);
    color: var(--color-text);
}

.dark-theme .avatar-pill {
    background: rgba(26, 26, 26, 0.5);
}

.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #FFFFFF;
    display: grid;
    place-items: center;
    font-weight: 600;
}

.avatar-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.journey-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.journey-chip {
    border-radius: var(--radius-lg);
    padding: 0.9rem;
    display: flex;
    gap: 0.85rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: var(--color-surface);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
}

.journey-chip span {
    display: block;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.chip-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(31, 116, 255, 0.15);
    color: var(--color-primary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.header-actions form,
.header-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn {
    position: relative;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.6rem 1.35rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    isolation: isolate;
    background: rgba(31, 116, 255, 0.04);
    color: var(--color-text);
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -20px rgba(31, 116, 255, 0.45);
}

.btn:hover::after {
    opacity: 0.5;
}

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

.btn:focus-visible {
    outline: 2px solid rgba(31, 116, 255, 0.45);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), rgba(31, 116, 255, 0.85));
    color: #FFFFFF;
    border-color: rgba(31, 116, 255, 0.4);
    box-shadow: 0 20px 35px -18px rgba(31, 116, 255, 0.65);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 215, 0, 0.7));
    color: #1A1A1A;
    border-color: rgba(255, 215, 0, 0.6);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-soft);
    color: var(--color-text);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-primary);
    border-color: transparent;
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger), rgba(229, 30, 42, 0.85));
    color: #FFFFFF;
    border-color: rgba(229, 30, 42, 0.6);
}

.btn-soft {
    background: rgba(31, 116, 255, 0.1);
    color: var(--color-primary);
    border-color: rgba(31, 116, 255, 0.2);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
}

.btn-wide {
    width: 100%;
}

.btn[disabled],
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.link {
    color: var(--color-primary);
    text-decoration: none;
}

.input-field,
select,
textarea {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: transparent;
    padding: 0.65rem 0.85rem;
    color: var(--color-text);
}

.input-field:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(31, 116, 255, 0.35);
}

select {
    background-color: rgba(255, 255, 255, 0.08);
}

.dark-theme select {
    background-color: rgba(17, 24, 39, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.dark-theme select option {
    background-color: #0b0f1a;
    color: #fff;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--color-primary);
}

.fg-card {
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(var(--blur-card));
    box-shadow: var(--shadow-soft);
}

.fg-card-muted {
    background: rgba(248, 249, 250, 0.55);
}

.dark-theme .fg-card-muted {
    background: rgba(26, 26, 26, 0.7);
}

.hero-panel {
    display: grid;
    gap: 1rem;
}

.hero-panel h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.landing-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2.25rem;
    border-radius: calc(var(--radius-xl) + 10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: radial-gradient(circle at 20% 20%, rgba(31, 255, 209, 0.35), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(31, 116, 255, 0.3), transparent 45%),
        linear-gradient(135deg, rgba(31, 116, 255, 0.8), rgba(5, 199, 188, 0.8));
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/images/hero-family.svg') no-repeat right bottom/260px;
    opacity: 0.08;
}

.hero-copy h1 {
    font-size: clamp(1.8rem, 3.3vw, 3rem);
    margin: 0;
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.85);
}

.cta-duo {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-glow {
    background: linear-gradient(120deg, #19fb9b, var(--color-primary));
    color: #000;
    box-shadow: 0 18px 40px -15px rgba(0, 0, 0, 0.4);
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    background: transparent;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.hero-visual {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-device {
    width: 220px;
    height: 420px;
    border-radius: 40px;
    background: linear-gradient(180deg, #ffffff, #d7e8ff);
    box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.6);
    position: relative;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.hero-device span {
    height: 34px;
    border-radius: 12px;
    background: rgba(31, 116, 255, 0.1);
}

.hero-bubble {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 60%);
    filter: blur(90px);
    z-index: -1;
}

.bubble-floating {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.35);
    animation: float 8s ease-in-out infinite;
}

.bubble-floating.small {
    width: 60px;
    height: 60px;
    top: 15%;
    right: 10%;
    animation-duration: 6s;
}

.bubble-floating.medium {
    width: 100px;
    height: 100px;
    bottom: 10%;
    left: 5%;
    animation-duration: 9s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

.landing-features {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.landing-features .fg-card {
    backdrop-filter: blur(12px);
}

.admin-hero {
    position: relative;
    border-radius: calc(var(--radius-xl) + 6px);
    overflow: hidden;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(5, 199, 188, 0.12), rgba(31, 116, 255, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.15), transparent 40%);
}

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

.metric-glass {
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

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

.quick-actions a {
    border-radius: 16px;
    border: 1px solid rgba(31, 116, 255, 0.2);
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--color-text);
    background: rgba(31, 116, 255, 0.07);
}

.button-glow {
    border-radius: 16px;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(120deg, var(--color-primary), rgba(5, 199, 188, 0.9));
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 18px 45px -20px rgba(31, 116, 255, 0.8);
}
.stat-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.stat-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 0.9rem 1rem;
    background: rgba(31, 116, 255, 0.06);
}

.dark-theme .stat-card {
    background: rgba(31, 116, 255, 0.12);
}

.stat-card strong {
    display: block;
    font-size: 1.4rem;
    margin-top: 0.25rem;
}

.badge-soft,
.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(31, 116, 255, 0.08);
    border: 1px solid var(--border-soft);
}

.feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.progress-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.progress-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: rgba(26, 26, 26, 0.08);
    overflow: hidden;
}

.dark-theme .progress-track {
    background: rgba(255, 255, 255, 0.12);
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), rgba(0, 200, 83, 0.85));
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.fg-grid {
    display: grid;
    gap: 1.25rem;
}

.fg-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.fg-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pill {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(26, 26, 26, 0.15);
}

.pill-cta {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    color: var(--color-warning);
}

.text-muted {
    color: var(--color-muted);
}

.highlight {
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    background: rgba(31, 116, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.task-grid,
.task-stack {
    display: grid;
    gap: 1rem;
}

.task-card {
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 0.75rem;
}

.task-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.badge-category {
    font-size: 0.8rem;
    border-radius: 10px;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(31, 116, 255, 0.3);
    color: var(--color-primary);
}

.task-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.task-card__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fab {
    position: fixed;
    bottom: 2.5rem;
    right: 2rem;
    width: 62px;
    height: 62px;
    border-radius: 22px;
    border: none;
    background: linear-gradient(135deg, var(--color-primary), rgba(31, 116, 255, 0.8));
    color: #FFFFFF;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    box-shadow: 0 35px 55px -25px rgba(31, 116, 255, 0.55);
    cursor: pointer;
    z-index: 30;
}

.global-flash {
    margin-bottom: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.45);
    color: var(--color-text);
    box-shadow: var(--shadow-soft);
}

.list-tile {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
    padding: 0.75rem 0;
}

.ledger-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.goal-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 1rem;
    background: rgba(31, 116, 255, 0.05);
}

.goal-card__head {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.timeline {
    display: grid;
    gap: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(31, 116, 255, 0.3);
}

.timeline__item {
    position: relative;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.2rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 6px rgba(31, 116, 255, 0.12);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
}

.modal__dialog {
    width: min(520px, 92vw);
    background: var(--color-elevated);
    border-radius: calc(var(--radius-lg) + 4px);
    border: 1px solid var(--border-soft);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(var(--blur-card));
}

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

.modal__close {
    border: none;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    background: var(--color-elevated);
    border: 1px solid var(--border-soft);
    color: var(--color-text);
    box-shadow: var(--shadow-soft);
    z-index: 90;
}

.fg-footer {
    text-align: center;
    color: rgba(26, 26, 26, 0.6);
    padding-bottom: 2rem;
}

.dark-theme .fg-footer {
    color: rgba(255, 255, 255, 0.6);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.hero-panel--burst {
    position: relative;
    overflow: hidden;
}

.hero-panel--burst::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(31, 116, 255, 0.18), transparent 45%),
        radial-gradient(circle at 20% 80%, rgba(220, 20, 60, 0.15), transparent 40%);
    pointer-events: none;
}

.focus-meter {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.meter-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 10px solid rgba(31, 116, 255, 0.25);
    position: relative;
}

.meter-ring__value {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--color-surface);
    font-size: 1.4rem;
    font-weight: 600;
    border: 1px solid var(--border-soft);
}

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

.insight-card {
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid var(--border-soft);
    background: rgba(31, 116, 255, 0.05);
}

.insight-card__value {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

.task-card--split {
    grid-template-columns: minmax(0, 1fr) auto;
}

.task-card__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    min-width: 120px;
}

.task-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(0, 200, 83, 0.12);
    color: var(--color-success);
}

.micro-pill {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chips button {
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    padding: 0.35rem 0.9rem;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
}

.filter-chips button.is-active {
    border-color: rgba(31, 116, 255, 0.5);
    color: var(--color-primary);
}

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

.approval-card {
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    border: 1px solid var(--border-soft);
    background: var(--color-surface);
}

.evidence-wall {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.evidence-wall img {
    width: 74px;
    height: 74px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--border-soft);
}

.consensus-bar {
    height: 8px;
    background: rgba(26, 26, 26, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.consensus-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), rgba(0, 200, 83, 0.8));
}

.wallet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 1.25rem;
}

.balance-card {
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(31, 116, 255, 0.2), rgba(220, 20, 60, 0.18));
    border: 1px solid rgba(31, 116, 255, 0.35);
    color: var(--color-text);
}

.balance-card__value {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    margin: 0.2rem 0;
}

.ledger {
    margin-top: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 1rem;
    background: var(--color-surface);
}

.ledger__item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.ledger__item:last-child {
    border-bottom: none;
}

.goal-grid {
    display: grid;
    gap: 1rem;
}

.goal-card__progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(26, 26, 26, 0.1);
    overflow: hidden;
    margin: 0.5rem 0;
}

.goal-card__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), rgba(0, 200, 83, 0.8));
}

.goal-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-chip {
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-text);
}

.card-beam {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);
    padding: 1.25rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.button-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.button-stack .btn {
    justify-content: center;
}

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

.mobile-dock {
    display: none;
}

@media (max-width: 1024px) {
    .app-frame {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(280px, 80vw);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.3s ease;
        z-index: 30;
    }
    .sidebar.is-open {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .journey-strip {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    .hero-grid,
    .wallet-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .mobile-dock {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        background: var(--color-elevated);
        border-top: 1px solid var(--border-soft);
        padding: 0.5rem;
        z-index: 40;
    }
    .mobile-dock a {
        text-decoration: none;
        color: var(--color-muted);
        font-size: 0.75rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }
    .mobile-dock a.is-active {
        color: var(--color-primary);
    }
    .fab {
        bottom: 5rem;
        right: 1.25rem;
    }
}
