:root,
[data-theme="dark"] {
    color-scheme: dark;
    --bg-0: #050506;
    --bg-1: #08090c;
    --bg-2: #0e1116;
    --bg-3: #141a22;
    --bg-4: #1c2430;
    --text-0: #fafafa;
    --text-1: #e4e4e7;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --text-4: #52525b;
    --accent: #3effa0;
    --accent-dim: rgba(62, 255, 160, 0.1);
    --accent-hover: #66ffb8;
    --accent-glow: rgba(62, 255, 160, 0.35);
    --accent-border: rgba(62, 255, 160, 0.22);
    --purple: #a78bfa;
    --purple-dim: rgba(167, 139, 250, 0.08);
    /* Brand gradient (accent → purple) — wizard step badge, progress, accents */
    --gradient-brand: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
    --gradient-brand-h: linear-gradient(90deg, var(--accent) 0%, var(--purple) 100%);
    --gradient-brand-soft: linear-gradient(135deg, rgba(62, 255, 160, 0.16) 0%, rgba(167, 139, 250, 0.12) 100%);
    --gradient-brand-glow:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(62, 255, 160, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
    --red: #fb7185;
    --red-dim: rgba(251, 113, 133, 0.08);
    --green: #3effa0;
    --green-dim: rgba(62, 255, 160, 0.08);
    --amber: #fbbf24;
    --amber-dim: rgba(251, 191, 36, 0.08);
    --blue: #60a5fa;
    --border: rgba(255, 255, 255, 0.07);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --glass: rgba(5, 5, 6, 0.88);
    --overlay: rgba(0, 0, 0, 0.52);
    --on-accent: #041008;
    --sheet-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --display: 'Syne', var(--font);
    --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 220ms;
    --shell-max: 1440px;
    --content-max: 720px;
    --sidebar-w: 280px;
    /* Spacing scale (authenticated app) */
    --page-pad: clamp(20px, 5vw, 28px);
    --page-pad-top: 12px;
    --page-pad-bottom: 32px;
    --section-gap: 32px;
    --block-gap: 20px;
    --card-pad: 24px;
    --card-gap: 20px;
    --card-radius: 12px;
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --stack-sm: 12px;
    --stack-md: 18px;
    --stack-lg: 28px;
    --surface-card: linear-gradient(145deg, rgba(14, 17, 22, 0.9) 0%, rgba(8, 9, 12, 0.95) 100%);
    --surface-stat: linear-gradient(145deg, rgba(14, 17, 22, 0.85) 0%, rgba(8, 9, 12, 0.9) 100%);
    --surface-sidebar: linear-gradient(165deg, rgba(14, 17, 22, 0.98) 0%, rgba(5, 5, 6, 0.99) 100%);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);
    --shadow-stat-hover: 0 0 24px rgba(62, 255, 160, 0.06);
    --text-hero-glow: 0 0 40px rgba(62, 255, 160, 0.08);
    --surface-1: #141a22;
    --bp-rail: 768px;
    /* Alt tab cubugu kaldirildi; alt rezervasyon yalnizca AI koc dock'una gore (--ai-dock-offset). */
    --bottom-nav-h: 0px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ═══ BRAND GRADIENT UTILITIES (accent → purple) ═══ */
.text-gradient-brand {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bg-gradient-brand {
    background: var(--gradient-brand);
    color: var(--on-accent);
}

.bg-gradient-brand-h {
    background: var(--gradient-brand-h);
    color: var(--on-accent);
}

.ui-gradient-line {
    height: 2px;
    border: none;
    border-radius: 2px;
    background: var(--gradient-brand-h);
}

.ui-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--on-accent);
    background: var(--gradient-brand);
    border-radius: 12px;
}

.ui-dot-gradient {
    background: var(--gradient-brand-h);
}

.border-gradient-brand {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
        var(--gradient-brand) border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

html, body, #app {
    height: 100%;
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body, #app {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

/* ═══ APP SHELL & GLOW ═══ */
.app-fullscreen-wrap {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    background: var(--bg-0);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(16px, 4vw, 24px);
    box-sizing: border-box;
}

/* Landing (/) — tam genişlik; header gölge/blur kesilmesin */
.app-fullscreen-wrap--landing {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    overflow-x: clip;
    overflow-y: auto;
}

.app-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-0);
    overflow: hidden;
}

.app-shell {
    display: flex;
    max-width: var(--shell-max);
    margin: 0 auto;
    width: 100%;
}

.app-glow {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 100% 55% at 50% -8%, rgba(62, 255, 160, 0.14) 0%, transparent 52%),
        radial-gradient(ellipse 70% 40% at 80% 100%, rgba(62, 255, 160, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 10% 60%, rgba(96, 165, 250, 0.04) 0%, transparent 50%);
}

.app-glow--fullscreen {
    position: fixed;
}

.app-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 100dvh;
    max-width: 100%;
}

.app-main--guest {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* ═══ SIDEBAR / DRAWER ═══ */
.app-backdrop {
    position: fixed;
    inset: 0;
    z-index: 240;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    cursor: pointer;
    animation: fadeIn 0.3s var(--ease) both;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(var(--sidebar-w), 88vw);
    z-index: 250;
    transform: translateX(-105%);
    transition: transform 0.45s var(--ease);
    background-color: var(--bg-0);
    background-image: var(--surface-sidebar);
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
}

.app-sidebar.open {
    transform: translateX(0);
}

.app-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 24px 20px;
    overflow: hidden;
}

.app-sidebar-head {
    flex-shrink: 0;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.app-sidebar-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-sidebar-brand-btn {
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.app-sidebar-brand-btn:hover .brand-logo--sidebar {
    color: var(--accent);
}

.app-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.app-sidebar-close:hover {
    border-color: var(--accent-border);
    color: var(--text-0);
}

.app-sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

/* Profile avatar (sidebar + profile page) */
.profile-avatar {
    position: relative;
    flex-shrink: 0;
    width: var(--profile-avatar-size, 72px);
    height: var(--profile-avatar-size, 72px);
}

.profile-avatar-picker,
.profile-avatar-static {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

.profile-avatar-static {
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
}

.profile-avatar--sm .profile-avatar-picker,
.profile-avatar--sm .profile-avatar-static {
    border-radius: 10px;
}

.profile-avatar-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.profile-avatar--sm .profile-avatar-fallback {
    font-size: 12px;
}

.profile-avatar--md .profile-avatar-fallback {
    font-size: 22px;
}

.profile-avatar--lg .profile-avatar-fallback,
.profile-avatar--xl .profile-avatar-fallback {
    font-size: 28px;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.profile-avatar-edit {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.62);
    color: var(--text-0);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.profile-avatar--sm .profile-avatar-edit span {
    display: none;
}

.profile-avatar-picker:hover .profile-avatar-edit,
.profile-avatar-picker:focus-within .profile-avatar-edit,
.profile-avatar-static:hover .profile-avatar-edit,
.profile-avatar-static:focus-visible .profile-avatar-edit {
    opacity: 1;
}

.profile-avatar-busy {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.45);
    animation: profile-avatar-pulse 1s ease-in-out infinite;
}

@keyframes profile-avatar-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.75; }
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-hero-text {
    flex: 1;
    min-width: 0;
}

.profile-avatar-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.45;
}

.app-sidebar-user {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar-nav {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
    margin-right: -2px;
}

.app-sidebar-group {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-4);
    margin: 18px 0 6px 4px;
}

.app-sidebar-group:first-child {
    margin-top: 0;
}

.app-sidebar-link {
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 9px 12px 9px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-2);
    cursor: pointer;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.app-sidebar-link:hover {
    background: color-mix(in srgb, var(--text-0) 6%, transparent);
    color: var(--text-0);
}

.app-sidebar-link.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.app-sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 0 2px 2px 0;
    background: var(--accent);
}

.app-sidebar-link.muted {
    color: var(--text-3);
}

.app-sidebar-link.danger {
    color: var(--red);
}

.app-sidebar-foot {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 5, 6, 0.92) 12%);
}

.app-sidebar-logout {
    margin-top: 4px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Hamburger menu — phone-style app launcher */
.app-sidebar--launcher {
    width: min(100vw, 420px);
    background-color: var(--bg-0);
    background-image: var(--surface-sidebar);
}

.app-sidebar-head--compact {
    margin-bottom: 10px;
    padding-bottom: 12px;
}

.app-sidebar-edit-hint {
    flex-shrink: 0;
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.35;
}

.app-sidebar-launcher {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px;
}

.app-sidebar-primary {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.app-sidebar-link-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    flex-shrink: 0;
}

.app-sidebar-link-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.app-sidebar-section-label {
    flex-shrink: 0;
    margin: 0 0 8px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-4);
}

.app-sidebar-launcher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 8px;
    align-content: start;
    align-items: start;
}

@media (max-width: 380px) {
    .app-sidebar-launcher-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.app-sidebar-launcher .home-launcher-tile {
    min-height: 0;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 2px;
}

/* The data-nav-size sizing only targets .home-launcher; the drawer launcher
   needs its own proper icon size so glyphs don't render tiny. */
.app-sidebar-launcher .home-launcher-icon,
.app-sidebar-launcher .home-launcher-icon-wrap.fu-app-icon {
    width: 56px;
    height: 56px;
    font-size: 23px;
    border-radius: 16px;
}

/* Reserve two lines for every label so tiles with 1- vs 2-line labels stay
   perfectly aligned (no row-height jumps). */
.app-sidebar-launcher .home-launcher-label {
    min-height: 2.55em;
    line-height: 1.25;
}

.app-sidebar-launcher .home-launcher-tile--active .home-launcher-icon {
    box-shadow: 0 0 0 2px var(--accent);
}

/* Mobile drawer — grouped list nav (replaces icon grid) */
.mobile-drawer-nav-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px 8px;
}

.mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-drawer-nav__section {
    margin: 14px 8px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-4);
}

.mobile-drawer-nav__section:first-child {
    margin-top: 4px;
}

.mobile-drawer-nav__section--shortcuts {
    color: var(--accent);
}

.mobile-drawer-nav__row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.mobile-drawer-nav__row:hover {
    background: var(--bg-2);
    color: var(--text-0);
}

.mobile-drawer-nav__row.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.mobile-drawer-nav__row--add {
    background: linear-gradient(135deg, rgba(62, 255, 160, 0.12), rgba(62, 255, 160, 0.04));
    border: 1px solid var(--accent-border);
}

.mobile-drawer-nav__row-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-2);
    color: var(--text-1);
}

.mobile-drawer-nav__row.active .mobile-drawer-nav__row-icon {
    background: rgba(62, 255, 160, 0.15);
    color: var(--accent);
}

.mobile-drawer-nav__row--add .mobile-drawer-nav__row-icon {
    background: var(--accent-dim);
    color: var(--accent);
}

.mobile-drawer-nav__row-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-drawer-nav__pin {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--accent);
    opacity: 0.85;
}

.mobile-drawer-nav__utilities {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.app-sidebar-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.app-sidebar-user-link {
    padding: 0;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    text-align: left;
}

.app-sidebar-dock {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.app-sidebar-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 8px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.app-sidebar-dock-btn:hover {
    border-color: var(--accent-border);
    color: var(--text-0);
}

.app-sidebar-dock-btn--primary {
    grid-column: 1 / -1;
    background: var(--accent-dim);
    border-color: var(--accent-border);
    color: var(--accent);
    font-size: 13px;
}

.app-sidebar-dock-btn.danger {
    color: var(--red);
    border-color: rgba(255, 80, 100, 0.25);
}

.nav-edit-badge--pin {
    top: auto;
    bottom: -4px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    font-size: 11px;
    line-height: 22px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-3);
}

.nav-edit-badge--pin.active {
    background: var(--accent-dim);
    border-color: var(--accent-border);
    color: var(--accent);
}

.fu-show-in-menu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-1);
    cursor: pointer;
}

.fu-show-in-menu-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.layout-degraded-banner {
    position: sticky;
    top: 0;
    z-index: 1200;
    padding: 10px var(--page-pad);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    color: var(--text-1);
    background: color-mix(in srgb, var(--amber, #f59e0b) 18%, var(--surface-1, #1a1a1a));
    border-bottom: 1px solid color-mix(in srgb, var(--amber, #f59e0b) 35%, transparent);
}

/* ═══ HEADER ═══ */
.app-header {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: var(--stack-sm);
    padding: 18px var(--page-pad) 14px;
    background: transparent;
}

.app-header-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.app-header-menu:hover {
    border-color: var(--accent-border);
    box-shadow: 0 0 20px var(--accent-dim);
}

.app-header-menu-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-1);
    border-radius: 1px;
    transition: background var(--duration) var(--ease);
}

.app-header-menu:hover .app-header-menu-bar {
    background: var(--accent);
}

.app-header-title {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-0);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    background: none;
    border: none;
    font-family: var(--font);
    cursor: pointer;
    padding: 8px 4px;
    transition: color var(--duration) var(--ease);
}

.app-header-link:hover {
    color: var(--accent);
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.app-header-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md, 10px);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.app-header-add:hover {
    background: rgba(62, 255, 160, 0.16);
    border-color: var(--accent);
}

.app-header-add:active {
    transform: scale(0.96);
}

.app-header-add-label {
    display: none;
}

/* Mobile: compact + icon — clear primary action, matches menu button footprint */
@media (max-width: 639px) {
    .app-header-add {
        width: 40px;
        height: 40px;
        padding: 0;
        border: none;
        border-radius: 10px;
        background: var(--accent);
        color: var(--on-accent);
        box-shadow: 0 2px 10px rgba(62, 255, 160, 0.28);
    }

    .app-header-add .ui-icon {
        font-size: 20px;
    }

    .app-header-add .ui-icon svg {
        stroke-width: 2.5;
    }

    .app-header-add:hover {
        background: #2ee68a;
        box-shadow: 0 4px 14px rgba(62, 255, 160, 0.38);
    }
}

@media (min-width: 640px) {
    .app-header-add-label {
        display: inline;
    }
}

.ed-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
    background: var(--bg-1);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease;
}

.ed-view-toggle:hover {
    border-color: var(--accent-border);
    color: var(--text-0);
}

.ed-stat-value.is-up { color: var(--red); }
.ed-stat-value.is-down { color: var(--accent); }

/* Kompakt hero (baslik amaclı; tutar yerine kisa metin) — tek standart, inline font-size yerine */
.ed-hero--compact .ed-amount,
.ed-amount--compact {
    font-size: 22px;
}

.ed-change--muted {
    color: var(--text-3);
}

/* ═══ OBLIGATION CHECKLIST (sade gorunum) ═══ */
.obl-check {
    display: flex;
    flex-direction: column;
    gap: var(--stack-md, 16px);
}

.obl-month {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.obl-month__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-1);
    color: var(--text-1);
    cursor: pointer;
}

.obl-month__nav:hover { border-color: var(--accent-border); color: var(--text-0); }

.obl-month__label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-0);
    text-transform: capitalize;
    min-width: 140px;
    text-align: center;
}

.obl-summary {
    text-align: center;
    padding: 4px 0 8px;
}

.obl-summary__overline {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.obl-summary__amount {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text-0);
    line-height: 1.1;
    margin-top: 2px;
}

.obl-summary__meta {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

.obl-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--bg-2);
    overflow: hidden;
    margin: 12px auto 0;
    max-width: 320px;
}

.obl-progress__bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: width .3s ease;
}

.obl-done {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.obl-group {
    border: 1px solid var(--border);
    border-radius: var(--card-radius, 14px);
    background: var(--bg-1);
    padding: 12px 14px;
}

.obl-group__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.obl-group__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    flex: none;
}

.obl-group__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
    margin: 0;
    flex: 1;
    min-width: 0;
}

.obl-group__count {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}

.obl-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.obl-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    min-height: 44px;
}

.obl-row__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.obl-row__name {
    font-size: 14px;
    color: var(--text-0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.obl-row.is-paid .obl-row__name {
    color: var(--text-3);
    text-decoration: line-through;
}

.obl-row__due {
    font-size: 11px;
    color: var(--text-4);
}

.obl-row__amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.obl-row.is-paid .obl-row__amount { color: var(--text-3); }

.obl-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--on-accent);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.obl-tick.is-on {
    background: var(--accent);
    border-color: var(--accent);
}

.obl-row__del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border: none;
    background: transparent;
    color: var(--text-4);
    cursor: pointer;
    border-radius: 8px;
}

.obl-row__del:hover { color: var(--red); background: var(--bg-2); }

.obl-group__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-3);
}

.obl-group__remaining {
    font-weight: 700;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
}

.obl-add-bar,
.obl-empty__actions {
    display: flex;
    gap: 8px;
}

.obl-empty__actions { justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.obl-add-bar .ed-action-btn,
.obl-empty__actions .ed-action-btn { flex: 1; min-width: 140px; }

.obl-add-card { margin-top: 4px; }
.obl-add-card .ed-form-grid { margin-bottom: 12px; }

.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    padding: 0 0 calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Pull-to-refresh indicator (mobile) */
.ptr-indicator {
    position: fixed;
    top: env(safe-area-inset-top);
    left: 50%;
    transform: translate(-50%, -48px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2, #161a22);
    border: 1px solid var(--bg-4, #2a2f3a);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    z-index: 2200;
}

.ptr-indicator__spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--bg-4, #2a2f3a);
    border-top-color: var(--accent, #6ea8fe);
}

.ptr-indicator.is-armed {
    border-color: var(--accent, #6ea8fe);
}

.ptr-indicator.is-refreshing .ptr-indicator__spinner {
    animation: ptr-spin 0.7s linear infinite;
}

@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

.app-content::-webkit-scrollbar {
    width: 6px;
}

.app-content::-webkit-scrollbar-thumb {
    background: var(--bg-4);
    border-radius: 3px;
}

.nav-item--pinned .nav-label {
    font-weight: 600;
}

.nav-item--pinned.active {
    color: var(--accent);
}

/* ═══ BOTTOM NAV ═══ */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(var(--bottom-nav-cols, 3), minmax(0, 1fr));
    align-items: end;
    gap: 0;
    padding: 8px 2px calc(8px + env(safe-area-inset-bottom));
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-top: 1px solid var(--border);
    z-index: 100;
}

.bottom-nav-shortcut-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.42);
    cursor: default;
    animation: bottomNavBackdropIn 0.2s var(--ease) forwards;
}

@keyframes bottomNavBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bottom-nav-shortcut-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    display: grid;
    grid-template-columns: repeat(var(--bottom-nav-cols, 6), minmax(0, 1fr));
    padding: 0 4px 6px;
    pointer-events: none;
    z-index: 101;
}

.bottom-nav-shortcut-panel {
    justify-self: center;
    align-self: end;
    pointer-events: auto;
    min-width: 196px;
    max-width: min(248px, 44vw);
    margin-bottom: 4px;
    padding: 10px 8px 8px;
    border-radius: 14px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    animation: bottomNavShortcutIn 0.24s var(--ease) forwards;
}

@keyframes bottomNavShortcutIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bottom-nav-shortcut-title {
    margin: 0 8px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
}

.bottom-nav-shortcut-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bottom-nav-shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-1);
    cursor: pointer;
    text-align: left;
    transition: background var(--duration) var(--ease);
}

.bottom-nav-shortcut-item:hover,
.bottom-nav-shortcut-item:focus-visible {
    background: var(--bg-2);
}

.bottom-nav-shortcut-item--primary {
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
}

.bottom-nav-shortcut-icon {
    flex-shrink: 0;
    width: 28px;
    font-size: 16px;
    line-height: 1;
    text-align: center;
}

.bottom-nav-shortcut-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.bottom-nav-shortcut-hint {
    font-size: 10px;
    color: var(--text-4);
    white-space: nowrap;
}

.nav-item {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
    min-height: 44px;
    transition: all var(--duration) var(--ease);
    -webkit-touch-callout: none;
    user-select: none;
    touch-action: manipulation;
}

.nav-item.peek {
    transform: scale(0.94);
    opacity: 0.88;
}

.nav-icon {
    display: block;
    font-size: 17px;
    line-height: 1;
    color: var(--text-3);
    transition: color var(--duration) var(--ease);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    color: var(--text-0);
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1px;
    color: var(--text-4);
    transition: color var(--duration) var(--ease);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item:hover .nav-label {
    color: var(--text-2);
}

.nav-item.active .nav-label {
    color: var(--text-0);
    font-weight: 600;
}

.nav-item--add {
    justify-self: center;
    align-self: center;
    width: 44px;
    height: 44px;
    margin-top: -18px;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, #2ee68a 100%);
    color: var(--on-accent);
    box-shadow: 0 4px 16px var(--accent-glow);
    cursor: pointer;
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.nav-item--add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--accent-glow);
}

.nav-item--add:active {
    transform: scale(0.96);
}

.nav-item--add.active {
    box-shadow: 0 0 0 2px var(--accent-border), 0 6px 22px var(--accent-glow);
}

.nav-item--add::after {
    display: none;
}

.nav-add-icon {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-0);
    box-shadow: 0 0 12px var(--accent-glow);
}

.nav-item--center .nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item--center.active .nav-icon {
    background: var(--accent);
    color: var(--bg-0);
    border-color: transparent;
}

.nav-item--center .nav-label {
    font-weight: 600;
}

.bottom-nav-more {
    align-self: center;
    justify-self: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-3);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.bottom-nav-more:hover,
.bottom-nav-more[aria-expanded="true"] {
    background: var(--bg-2);
    color: var(--text-1);
}

.bottom-nav--edit .nav-item--add {
    margin-top: 0;
    width: auto;
    height: auto;
    background: var(--bg-2);
    color: var(--text-0);
    box-shadow: none;
}

@keyframes navJiggle {
    0%, 100% { transform: rotate(-1.2deg); }
    50% { transform: rotate(1.2deg); }
}

.nav-item--jiggle,
.home-launcher-tile--jiggle {
    animation: navJiggle 0.28s ease-in-out infinite;
}

.bottom-nav--edit .nav-item--jiggle.nav-item--add {
    animation: navJiggle 0.28s ease-in-out infinite;
}

.nav-item--dragging,
.home-launcher-tile--dragging {
    opacity: 0.55;
    z-index: 2;
    animation: none !important;
}

.nav-item--drag-over,
.home-launcher-tile--drag-over {
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
}

.nav-edit-badge {
    position: absolute;
    top: -4px;
    left: 50%;
    margin-left: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-1);
    font-size: 16px;
    line-height: 18px;
    text-align: center;
    z-index: 3;
    cursor: pointer;
}

.nav-edit-badge--remove {
    background: var(--red);
    border-color: transparent;
    color: #fff;
}

.nav-edit-banner {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.nav-edit-banner-hint {
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
}

.nav-edit-banner-done {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    background: var(--accent);
    color: var(--on-accent);
    cursor: pointer;
}

.nav-customize-backdrop {
    position: fixed;
    inset: 0;
    z-index: 319;
    border: none;
    background: rgba(0, 0, 0, 0.45);
}

.nav-customize-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom));
    z-index: 320;
    max-height: 78dvh;
    overflow-y: auto;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    animation: bottomNavShortcutIn 0.28s var(--ease) forwards;
}

.nav-customize-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.nav-customize-sheet-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.nav-customize-sheet-handle {
    width: 40px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 2px;
    background: var(--bg-3);
}

.nav-customize-sheet-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

@media (min-width: 1024px) {
    .nav-customize-backdrop {
        z-index: 400;
    }

    .nav-customize-sheet {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: min(440px, calc(100vw - 80px));
        max-height: min(85dvh, 560px);
        padding: 20px 20px 16px;
        border-radius: var(--card-radius, 12px);
        border: 1px solid var(--border);
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
        animation: fadeIn 0.2s var(--ease) both;
    }

    .nav-customize-sheet-handle {
        display: none;
    }

    .nav-edit-banner {
        display: none;
    }
}

.nav-customize-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 12px;
    margin-bottom: 6px;
    border: none;
    border-radius: 12px;
    background: var(--bg-2);
    color: var(--text-0);
    font-size: 15px;
    cursor: pointer;
    text-align: left;
}

.nav-customize-option.danger {
    color: var(--red);
    background: transparent;
    border: 1px solid var(--border);
}

.nav-customize-section {
    margin: 12px 0;
}

.nav-customize-section-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav-customize-size-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.nav-customize-size-btn {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-1);
    cursor: pointer;
}

.nav-customize-size-btn.active {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--text-0);
}

.nav-customize-pick-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-customize-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-1);
    font-size: 13px;
    cursor: pointer;
}

.nav-customize-intro {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-3);
}

.nav-customize-section-hint {
    margin: -4px 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-4);
}

.nav-customize-pick-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: min(42vh, 320px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.nav-customize-pick-group-label {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-4);
}

.bottom-nav[data-nav-size="sm"] .nav-label { font-size: 9px; }
.bottom-nav[data-nav-size="sm"] .nav-icon { font-size: 15px; }
.bottom-nav[data-nav-size="lg"] .nav-label { font-size: 11px; }
.bottom-nav[data-nav-size="lg"] .nav-icon { font-size: 19px; }

.home-load-error {
    margin-bottom: 16px;
}

.home-load-error__text {
    font-size: 13px;
    color: var(--text-3);
    margin: 0 0 12px;
}

.home-launcher {
    margin-bottom: 16px;
}

.home-launcher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 8px;
}

.home-launcher-grid--compact {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.home-launcher-grid--compact::-webkit-scrollbar {
    display: none;
}

.home-launcher-grid--compact .home-launcher-tile {
    flex: 0 0 76px;
    max-width: 76px;
}

.home-launcher-grid--compact .home-launcher-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.home-launcher-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 10px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.home-launcher-icon,
.home-launcher-icon-wrap.fu-app-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    color: var(--accent);
    overflow: hidden;
}

.home-launcher-icon .ui-icon svg {
    stroke-width: 2.15;
}

.fu-app-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.fu-og-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
}

.fu-og-preview-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.fu-og-preview-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
}

.fu-og-preview-site {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-3);
}

.fu-form-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--text-3);
}

.fu-viewer-tab-icon-wrap.fu-app-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    font-size: 12px;
}

.fu-viewer-tab-icon-wrap .fu-app-icon-img {
    border-radius: 6px;
}

.home-launcher-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-1);
    text-align: center;
    max-width: 100%;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.home-launcher[data-nav-size="sm"] .home-launcher-label { font-size: 9px; }
.home-launcher[data-nav-size="sm"] .home-launcher-icon { width: 46px; height: 46px; font-size: 18px; }
.home-launcher[data-nav-size="lg"] .home-launcher-label { font-size: 12px; }
.home-launcher[data-nav-size="lg"] .home-launcher-icon { width: 58px; height: 58px; font-size: 24px; }

.home-launcher--edit .home-launcher-tile {
    cursor: grab;
}

.app-main--nav-edit .app-content {
    pointer-events: auto;
}

/* ═══ FINANCE UNIVERSE ═══ */
.finance-universe--edit {
    padding-top: 48px;
}

.fu-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.fu-title {
    margin: 4px 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-0);
}

.fu-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.45;
}

.fu-more-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.fu-workspace-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.fu-workspace-tab {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    touch-action: manipulation;
}

.fu-workspace-tab.active {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    color: var(--text-0);
}

.budget-hub-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
}

.budget-hub-tab {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s ease, color 0.15s ease;
}

.budget-hub-tab.active {
    background: var(--accent-dim);
    color: var(--text-0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ed-hero--compact {
    margin-bottom: 12px;
}

.ed-hero--compact .coach-sub {
    margin-bottom: 0;
}

.fu-workspace-tab--add {
    padding: 8px 12px;
    font-size: 18px;
}

.fu-workspace-tab--jiggle {
    animation: navJiggle 0.28s ease-in-out infinite;
}

.fu-workspace-tab--dragging {
    opacity: 0.55;
    animation: none !important;
}

.fu-workspace-tab--drag-over {
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
}

.fu-workspace-icon {
    font-size: 15px;
    line-height: 1;
}

.fu-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-3);
    font-size: 14px;
}

.fu-add-tile .fu-add-tile-icon {
    background: var(--accent-dim);
    border-color: var(--accent-border);
    color: var(--accent);
    font-size: 28px;
}

.fu-form-field {
    margin-bottom: 12px;
}

.fu-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
}

.fu-form-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-0);
    font-size: 15px;
}

.fu-form-input--icon {
    max-width: 80px;
    text-align: center;
    font-size: 22px;
}

.fu-form-error {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--red);
}

.fu-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.fu-form-actions .ed-action-btn {
    flex: 1;
}

.finance-universe-sheet--catalog {
    max-height: min(92vh, 720px);
    overflow-y: auto;
}

.fu-catalog-search {
    margin-bottom: 10px;
}

.fu-catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.fu-catalog-filters--cat {
    margin-bottom: 14px;
}

.fu-catalog-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.fu-catalog-chip.active {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    color: var(--text-0);
}

.fu-catalog-chip--sm {
    font-size: 11px;
    padding: 5px 10px;
}

.fu-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 2px;
    margin-bottom: 12px;
}

.fu-catalog-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    cursor: pointer;
    touch-action: manipulation;
}

.fu-catalog-tile:disabled {
    opacity: 0.55;
    cursor: default;
}

.fu-catalog-tile--added {
    border-color: var(--accent-border);
}

.fu-catalog-tile-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    overflow: hidden;
}

.fu-catalog-tile-monogram {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--text-2);
}

.fu-catalog-tile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fu-catalog-tile-name {
    font-size: 10px;
    line-height: 1.25;
    text-align: center;
    color: var(--text-1);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fu-catalog-tile-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fu-catalog-custom {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.fu-catalog-custom summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    list-style: none;
}

.fu-catalog-custom summary::-webkit-details-marker {
    display: none;
}

.fu-catalog-custom-body {
    padding-top: 12px;
}

.fu-form-actions--footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.fu-viewer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-0);
    z-index: 1;
}

.fu-viewer-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 4px;
    border-bottom: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(16px);
}

.fu-viewer-back {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.fu-viewer-tabs {
    flex: 1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    min-width: 0;
}

.fu-viewer-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 140px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    cursor: pointer;
}

.fu-viewer-tab.active {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    color: var(--text-0);
}

.fu-viewer-tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fu-viewer-tab-close {
    margin-left: 2px;
    opacity: 0.7;
    font-size: 14px;
    line-height: 1;
}

.fu-viewer-external {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: var(--bg-2);
    color: var(--text-1);
    font-size: 16px;
    cursor: pointer;
}

.fu-embed-hint {
    flex-shrink: 0;
    margin: 0;
    padding: 6px 12px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-3);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
}

.fu-embed-fallback {
    position: absolute;
    inset: 0;
    top: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background: var(--bg-0);
    color: var(--text-2);
    font-size: 14px;
    z-index: 2;
}

.fu-viewer-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

.app-content:has(.fu-viewer) {
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* ═══ DESKTOP LAYOUT ═══ */
@media (min-width: 1024px) {
    :root {
        --content-max: 880px;
    }

    html, body, #app {
        overflow: auto;
    }

    .app-shell {
        align-items: stretch;
        height: 100dvh;
        min-height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .app-backdrop {
        display: none;
    }

    .app-header-menu {
        display: none;
    }

    .app-header {
        grid-template-columns: 1fr auto;
        max-width: none;
        margin: 0;
        width: 100%;
        padding: 20px max(40px, calc((100% - var(--content-max)) / 2)) 12px;
    }

    .app-header-title {
        text-align: left;
        font-size: 20px;
    }

    .app-main {
        flex: 1;
        min-width: 0;
        min-height: 0;
        height: 100dvh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .app-content {
        max-width: none;
        margin: 0;
        width: 100%;
        padding-left: max(32px, calc((100% - var(--content-max)) / 2));
        padding-right: max(32px, calc((100% - var(--content-max)) / 2));
    }

    .bottom-nav {
        display: none;
    }

    /* Dil + çıkış yalnızca sol menü altında (Panel/Profile tekrarlarını gizle) */
    .hide-on-desktop-sidebar-dupe {
        display: none !important;
    }

    .ed-page {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 1280px) {
    :root {
        --content-max: 960px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .app-main {
        max-width: 640px;
        margin: 0 auto;
        width: 100%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ═══ EDITORIAL PAGE LAYOUT ═══ */
.ed-page {
    padding: var(--page-pad-top) var(--page-pad) var(--page-pad-bottom);
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Hero */
.ed-hero {
    padding: 14px 0 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--stack-md);
}

.ed-overline {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: var(--accent);
    margin-bottom: 5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.ed-amount {
    font-size: clamp(28px, 8vw, 42px);
    font-weight: 700;
    letter-spacing: -1.5px;
    color: var(--text-0);
    line-height: 1.1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
    text-shadow: var(--text-hero-glow);
    overflow-wrap: anywhere;
    max-width: 100%;
}

.ed-change {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
}
.ed-change.up { color: var(--accent); }
.ed-change.down { color: var(--red); }

/* Rates Strip */
.ed-rates {
    display: flex;
    gap: 0;
    margin-bottom: var(--stack-lg);
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    max-width: 100%;
    overflow: hidden;
}

.ed-rate {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0 clamp(6px, 2vw, 12px);
    border-right: 1px solid var(--border-subtle);
}
.ed-rate:first-child { padding-left: 0; }
.ed-rate:last-child { border-right: none; padding-right: 0; }

.ed-rate-code {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-3);
    text-transform: uppercase;
}

.ed-rate-val {
    font-size: clamp(12px, 3.2vw, 15px);
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Actions */
.ed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--stack-sm);
    margin-bottom: var(--section-gap);
    max-width: 100%;
}

/* Horizontal chip row — scroll inside page, never widen layout */
.ed-actions-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--stack-sm);
    margin-bottom: var(--section-gap);
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.ed-actions-scroll::-webkit-scrollbar {
    display: none;
}

.ed-actions-scroll .ed-action-btn {
    flex: 0 0 auto;
    min-width: auto;
    white-space: nowrap;
    padding: 10px 16px;
}

.ed-action-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font);
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    letter-spacing: -0.1px;
}

.ed-actions--single .ed-action-btn,
.ed-actions:has(> .ed-action-btn:only-child) .ed-action-btn {
    flex: 1 1 100%;
}

/* Üç eşit segment (ör. Hafta/Ay/Yıl) — kompakt segmented control;
   grid sayesinde her zaman tek satır, asla 2+1 sarmaz. */
.ed-actions--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.ed-actions--3 .ed-action-btn {
    flex: none;
    min-height: 0;
    padding: 9px 4px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: none;
}

.ed-actions--3 .ed-action-btn:hover {
    color: var(--text-0);
    background: rgba(255, 255, 255, 0.04);
}

.ed-actions--3 .ed-action-btn.primary {
    background: var(--accent-dim);
    color: var(--accent);
    box-shadow: none;
}

.ed-action-btn:hover {
    border-color: var(--text-4);
    color: var(--text-0);
}

.ed-action-btn.primary {
    background: var(--accent-dim);
    border-color: var(--accent-border);
    color: var(--accent);
    box-shadow: 0 0 24px rgba(62, 255, 160, 0.08);
}
.ed-action-btn.primary:hover {
    background: rgba(62, 255, 160, 0.14);
    border-color: var(--accent);
    box-shadow: 0 0 28px rgba(62, 255, 160, 0.15);
}

.category-picker-btn--pending {
    border-style: dashed;
    opacity: 0.92;
}

/* Sections */
.ed-section {
    margin-bottom: var(--section-gap);
    max-width: 100%;
    min-width: 0;
}

.ed-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--stack-md);
    margin-bottom: var(--stack-md);
    min-width: 0;
}

.ed-section-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-2);
    text-transform: uppercase;
}

.ed-section-meta {
    font-size: 11px;
    color: var(--text-4);
    font-weight: 500;
}

.ed-section-link {
    font-size: 12px;
    color: var(--text-3);
    cursor: pointer;
    font-weight: 500;
    transition: color var(--duration) var(--ease);
}
.ed-section-link:hover { color: var(--accent); }

/* Chart */
.ed-chart {
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}
.ed-chart svg { width: 100%; height: 100%; display: block; }

/* Editorial List */
.ed-list {
    display: flex;
    flex-direction: column;
}

.ed-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--stack-md);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
    min-width: 0;
    max-width: 100%;
}
.ed-list-item:last-child { border-bottom: none; }

.ed-list-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ed-list-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-0);
    letter-spacing: -0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ed-list-sub {
    font-size: 12px;
    color: var(--text-3);
}

.ed-list-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.ed-list-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}
.ed-list-amount.expense { color: var(--red); }

.ed-list-pct {
    font-size: 11px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

/* Expense list (Giderlerim / timeline) */
.expense-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.expense-list-date {
    margin: 20px 0 6px;
    padding: 0 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.expense-list-date:first-child {
    margin-top: 4px;
}

.expense-row {
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--bg-2);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.expense-row--editing {
    border-color: rgba(62, 255, 160, 0.35);
    box-shadow: 0 0 0 1px rgba(62, 255, 160, 0.12);
}

.expense-row-main {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.expense-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    flex-shrink: 0;
}

.expense-row-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.expense-row-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-0);
    letter-spacing: -0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-row-meta {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-row-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--red);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.expense-row-actions {
    display: flex;
    gap: 8px;
    padding-top: 2px;
    border-top: 1px solid var(--border-subtle);
}

.expense-row-action {
    flex: 1;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-1);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.expense-row-action:hover:not(:disabled) {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    color: var(--text-0);
}

.expense-row-action--danger {
    color: var(--red);
    border-color: rgba(244, 63, 94, 0.25);
}

.expense-row-action--danger:hover:not(:disabled) {
    background: var(--red-dim);
    border-color: rgba(244, 63, 94, 0.4);
    color: var(--red);
}

.expense-row-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.expense-inline-edit {
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[data-theme="light"] .expense-row {
    background: var(--surface-card, var(--bg-1));
}

/* AI Card */
.ed-card-ai {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: var(--card-pad);
    margin-bottom: var(--section-gap);
    cursor: pointer;
    position: relative;
    transition: border-color var(--duration) var(--ease);
}
.ed-card-ai:hover { border-color: var(--purple); }

.ed-card-ai--glow {
    background: linear-gradient(145deg, rgba(88, 48, 150, 0.12) 0%, rgba(14, 17, 22, 0.95) 55%);
    border-color: rgba(167, 139, 250, 0.22);
    box-shadow: 0 0 48px rgba(167, 139, 250, 0.08);
}

/* ═══ INTRO WIZARD ═══ */
.intro-wizard {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 5, 6, 0.94);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.4s var(--ease) both;
}

.intro-wizard-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--gradient-brand-glow);
}

.intro-wizard-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: 92dvh;
    overflow-y: auto;
    padding: 8px 4px 24px;
}

.intro-progress {
    height: 2px;
    background: var(--bg-3);
    border-radius: 2px;
    margin-bottom: 28px;
    overflow: hidden;
}

.intro-progress-fill {
    height: 100%;
    background: var(--gradient-brand-h);
    transition: width 0.5s var(--ease);
}

.intro-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.intro-tag--purple { color: var(--purple); }

.intro-title {
    font-size: clamp(26px, 5vw, 32px);
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--text-0);
    margin: 0 0 12px;
    line-height: 1.15;
}

.intro-desc {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-3);
    margin: 0 0 24px;
}

.intro-benefit-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.intro-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg-4);
    transition: all var(--duration) var(--ease);
}

.intro-dot.active {
    width: 20px;
    border-radius: 3px;
    background: var(--accent);
}

.intro-benefit-card {
    padding: 20px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.intro-benefit-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-0);
    margin: 0 0 8px;
}

.intro-benefit-card p {
    font-size: 14px;
    color: var(--text-3);
    margin: 0;
    line-height: 1.5;
}

.intro-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .intro-mode-grid { grid-template-columns: 1fr; }
}

.intro-mode-card {
    position: relative;
    text-align: left;
    padding: 20px 16px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    font-family: var(--font);
    color: inherit;
}

.intro-mode-card:hover {
    border-color: rgba(167, 139, 250, 0.35);
}

.intro-mode-card.active {
    border-color: var(--purple);
    box-shadow: 0 0 32px rgba(167, 139, 250, 0.15);
    background: linear-gradient(145deg, rgba(88, 48, 150, 0.15) 0%, rgba(14, 17, 22, 0.9) 100%);
}

.intro-mode-card--pro.active {
    border-color: var(--accent);
    box-shadow: 0 0 32px rgba(62, 255, 160, 0.12);
}

.intro-mode-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--accent);
}

.intro-mode-icon {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--purple);
    margin-bottom: 12px;
}

.intro-mode-icon--pro { color: var(--accent); }

.intro-mode-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 6px;
}

.intro-mode-desc {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.45;
}

.intro-ai-card { margin-bottom: 20px; }

.intro-key-block { margin-top: 16px; }

.intro-error {
    font-size: 13px;
    color: var(--red);
    margin-top: 12px;
}

.intro-pro-card {
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(88, 48, 150, 0.2) 0%, rgba(14, 17, 22, 0.95) 50%);
    border: 1px solid rgba(167, 139, 250, 0.25);
    box-shadow: 0 0 40px rgba(167, 139, 250, 0.1);
}

.intro-pro-price {
    margin-bottom: 20px;
}

.intro-pro-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -1px;
}

.intro-pro-period {
    font-size: 14px;
    color: var(--text-3);
}

.intro-pro-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.intro-pro-features li {
    font-size: 14px;
    color: var(--text-2);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.intro-pro-note {
    font-size: 12px;
    color: var(--text-4);
    line-height: 1.5;
    margin: 0;
}

.intro-checklist {
    margin-bottom: 24px;
}

.intro-check-item {
    font-size: 14px;
    color: var(--text-2);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.intro-prefs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.intro-pref {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-2);
    cursor: pointer;
}

.intro-pref input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.intro-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.intro-btn-back { flex: 0; }

.intro-btn-next { flex: 1; }

.intro-skip {
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-4);
    cursor: pointer;
    padding: 8px;
    transition: color var(--duration) var(--ease);
}

.intro-skip:hover { color: var(--text-2); }

/* ═══ AI ORCHESTRATION HERO (settings) ═══ */
.ai-orchestration-hero {
    margin-bottom: 24px;
    padding: 20px 18px;
    border-radius: 16px;
    border: 1px solid rgba(62, 255, 160, 0.22);
    background: linear-gradient(155deg, rgba(30, 48, 42, 0.55) 0%, rgba(12, 14, 18, 0.92) 48%, rgba(28, 22, 48, 0.4) 100%);
    box-shadow: 0 0 40px rgba(62, 255, 160, 0.06);
}
.ai-orchestration-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent, #3effa0);
    margin: 0 0 10px;
}
.ai-orchestration-title {
    font-size: clamp(1.25rem, 4.5vw, 1.55rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 12px;
}
.ai-orchestration-lead,
.ai-orchestration-save {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 10px;
}
.ai-orchestration-save {
    color: var(--text-primary);
    font-weight: 500;
}
.ai-orchestration-points {
    margin: 14px 0 12px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-orchestration-points li {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
}
.ai-orchestration-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #3effa0);
    opacity: 0.85;
}
.ai-orchestration-foot {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.5;
}
.ai-settings-page .ai-welcome-title {
    font-size: 1.15rem;
}

/* ═══ AI CAPABILITY GRID ═══ */
.ai-cap-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
@media (min-width: 640px) {
    .ai-cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ai-cap-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--duration), box-shadow var(--duration);
}
.ai-cap-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--brand-glow);
}
.ai-cap-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ai-cap-card-desc { font-size: 11px; color: var(--text-tertiary); line-height: 1.4; }
.ai-cap-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 4px;
}
.ai-readiness-hint {
    font-size: 12px;
    color: var(--warning, #f5a623);
    margin: 6px 0;
}

/* ═══ PROVIDER GRID (purple) ═══ */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 100%;
}

@media (max-width: 520px) {
    .provider-grid { grid-template-columns: repeat(2, 1fr); }
}

.provider-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 12px;
    min-height: 72px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(30, 22, 48, 0.6) 0%, rgba(10, 12, 16, 0.95) 100%);
    border: 1px solid rgba(167, 139, 250, 0.12);
    cursor: pointer;
    text-align: left;
    font-family: var(--font);
    transition: all var(--duration) var(--ease);
    overflow: hidden;
}

.provider-card-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 50% 0%, rgba(167, 139, 250, 0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
    pointer-events: none;
}

.provider-card:hover {
    border-color: rgba(167, 139, 250, 0.35);
    transform: translateY(-2px);
}

.provider-card:hover .provider-card-glow { opacity: 1; }

.provider-card.active {
    border-color: var(--purple);
    box-shadow: 0 0 28px rgba(167, 139, 250, 0.2);
}

.provider-card.active .provider-card-glow { opacity: 1; }

.provider-card-name {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    letter-spacing: -0.2px;
}

.provider-card-hint {
    position: relative;
    z-index: 1;
    font-size: 10px;
    color: var(--purple);
    opacity: 0.85;
}

/* ═══ AI SETTINGS ═══ */
.ai-settings-page .ed-hero {
    display: none;
}

.ai-beta-platform {
    padding: 8px 0 24px;
}

.ai-beta-platform-card {
    margin-top: 20px;
    padding: 18px 16px;
    border-radius: 14px;
    border: 1px solid var(--accent-border);
    background: var(--accent-dim);
}

.ai-beta-platform-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 8px;
}

.ai-beta-platform-card strong {
    display: block;
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 10px;
}

.ai-beta-platform-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
}

.intro-pro-card--beta {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.ai-welcome {
    margin-bottom: 24px;
    padding: 24px 0 8px;
}

.ai-welcome-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.ai-welcome-title {
    font-family: var(--font);
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-0);
    line-height: 1.2;
    margin: 0 0 12px;
}

.ai-welcome-lead {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-2);
    margin: 0 0 20px;
    max-width: 52ch;
}

.ai-welcome-benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.ai-welcome-benefits li {
    position: relative;
    padding-left: 26px;
    font-size: 14px;
    color: var(--text-1);
    line-height: 1.45;
}

.ai-welcome-benefits li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    box-shadow: 0 0 12px var(--accent-glow);
}

.ai-welcome-benefits li::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.42em;
    width: 6px;
    height: 3px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

.ai-why-card {
    margin-bottom: 28px;
    cursor: default;
}

.ai-setup-section {
    margin-bottom: 32px;
}

.ai-setup-pick-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-0);
    margin: 12px 0 6px;
}

.ai-setup-pick-desc {
    font-size: 13px;
    color: var(--text-3);
    margin: 0 0 16px;
    line-height: 1.5;
}

.ai-guide {
    margin: 24px 0 20px;
    padding: 20px 18px;
    border-radius: 14px;
    border: 1px solid var(--accent-border);
    background: linear-gradient(145deg, rgba(62, 255, 160, 0.06) 0%, var(--bg-2) 48%);
}

.ai-guide-title {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-0);
    margin: 0 0 10px;
}

.ai-guide-intro {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-2);
    margin: 0 0 14px;
}

.ai-guide-console-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 4px;
}

.ai-guide-console-link:hover {
    text-decoration: underline;
}

.ai-guide-steps {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-guide-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ai-guide-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
}

.ai-guide-step-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-1);
    padding-top: 3px;
}

.ai-guide-tip {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--purple-dim);
    border: 1px solid rgba(167, 139, 250, 0.2);
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-2);
}

.ai-guide-tip-label {
    font-weight: 600;
    color: var(--purple);
    margin-right: 4px;
}

.ai-guide-security {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--text-4);
    line-height: 1.5;
}

.ai-key-form {
    margin-top: 8px;
    padding-top: 4px;
}

.ai-form-error {
    font-size: 13px;
    color: var(--red);
    margin: 0 0 12px;
}

.ai-empty {
    font-size: 14px;
    color: var(--text-2);
    text-align: center;
    padding: 20px 0 6px;
    margin: 0;
}

.ai-empty-hint {
    font-size: 12px;
    color: var(--text-4);
    text-align: center;
    margin: 0 0 8px;
}

.ai-default-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-left: 6px;
}

.ai-saved-actions {
    margin-bottom: 12px;
}

.ai-delete-btn {
    color: var(--red) !important;
}

.ai-add-another {
    width: 100%;
    margin-top: 16px;
}

.ai-saved-section {
    margin-top: 8px;
}

.ed-ai-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--purple);
    margin-bottom: 8px;
}

.ed-ai-text {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0;
}

.ed-ai-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 16px;
    color: var(--text-4);
}

/* Loading */
.ed-loading {
    padding: 40px 24px;
}

.ed-loading-bar {
    height: 2px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.ed-loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: var(--accent);
    animation: edLoad 1.2s ease-in-out infinite;
}

@keyframes edLoad {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* ═══ PAGE TRANSITIONS & BENEFIT LOADER ═══ */

.page-transition-host {
    position: relative;
    min-height: 100%;
}

.page-transition-body {
    min-height: 100%;
}

.page-transition-body.page-enter {
    animation: pageEnter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

.nav-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 5, 6, 0.82);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-transition-overlay--visible {
    opacity: 1;
    pointer-events: auto;
    animation: overlayIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.action-busy-overlay--contained {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: inherit;
    background: rgba(5, 5, 6, 0.78);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-busy-overlay--contained.action-busy-overlay--visible {
    opacity: 1;
    pointer-events: auto;
    animation: overlayIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.guest-auth--busy-host {
    position: relative;
}

.ed-page--busy-host {
    position: relative;
}

/* ═══ BRAND WORDMARK (logo — no icon) ═══ */
.brand-wordmark {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.38em;
    text-indent: 0.38em;
    color: var(--text-0);
    text-transform: uppercase;
    line-height: 1;
}

.brand-wordmark--hero {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    display: block;
    margin-bottom: 24px;
}

.brand-wordmark--splash {
    font-size: clamp(1.75rem, 8vw, 2.75rem);
    letter-spacing: 0.42em;
    text-indent: 0.42em;
}

.brand-wordmark--sidebar {
    font-size: 0.72rem;
    letter-spacing: 0.34em;
    text-indent: 0.34em;
    display: block;
}

.benefit-loader-wordmark {
    margin-bottom: 28px;
    opacity: 0;
    animation: benefitTagIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.benefit-loader {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.benefit-loader--overlay {
    max-width: 320px;
}

.benefit-loader--inline {
    padding: 48px 24px 32px;
}

.benefit-loader-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 220px;
    background: radial-gradient(ellipse, rgba(62, 255, 160, 0.18) 0%, transparent 70%);
    pointer-events: none;
    animation: benefitGlow 3s ease-in-out infinite;
}

@keyframes benefitGlow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.benefit-loader-core {
    position: relative;
    text-align: center;
}

.benefit-loader-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    opacity: 0;
    animation: benefitTagIn 0.5s 0.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.benefit-loader--critical .benefit-loader-tag {
    color: #ff4d5e;
    text-shadow: 0 0 24px rgba(255, 77, 94, 0.35);
}

.benefit-loader--critical .benefit-loader-title {
    color: #ff6b7a;
}

.benefit-loader--critical .benefit-loader-desc {
    color: rgba(255, 120, 130, 0.92);
}

.benefit-loader--critical .benefit-loader-glow {
    background: radial-gradient(circle, rgba(255, 77, 94, 0.18) 0%, transparent 62%);
}

.benefit-loader--critical .benefit-loader-dot.active {
    background: #ff4d5e;
}

.benefit-loader--warning .benefit-loader-tag {
    color: #ffb020;
}

.benefit-loader--warning .benefit-loader-title {
    color: #ffc857;
}

.benefit-loader--warning .benefit-loader-dot.active {
    background: #ffb020;
}

.benefit-loader--info .benefit-loader-tag {
    color: #7eb8ff;
}

@keyframes benefitTagIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.benefit-loader-text-wrap {
    animation: benefitTextIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes benefitTextIn {
    from {
        opacity: 0;
        transform: translateY(14px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

.benefit-loader-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--text-1);
    margin: 0 0 10px;
    line-height: 1.25;
}

.benefit-loader--overlay .benefit-loader-title {
    font-size: 24px;
}

.benefit-loader-desc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-3);
    margin: 0 auto;
    max-width: 300px;
}

.benefit-loader-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
}

.benefit-loader-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--bg-4);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.benefit-loader-dot.active {
    width: 18px;
    border-radius: 3px;
    background: var(--accent);
}

.benefit-loader-track {
    margin-top: 32px;
    height: 2px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
}

.benefit-loader-track-fill {
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: benefitTrack 1.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes benefitTrack {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

/* ═══ EDITORIAL SECTIONS (shared) ═══ */

/* Section card style for inner pages */
.ed-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: var(--card-pad);
    margin-bottom: var(--card-gap);
    box-shadow: var(--shadow-card);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.ed-card-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-3);
    text-transform: uppercase;
    margin-bottom: var(--stack-md);
}

/* Stat grid */
.ed-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--stack-sm);
    margin-bottom: var(--stack-md);
    max-width: 100%;
}

/* Tek stat varsa boşta yarım kalmasın — tüm satırı kapla. */
.ed-stats:has(> .ed-stat:only-child) {
    grid-template-columns: 1fr;
}

.ed-stat {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-stat);
    border: 1px solid var(--border);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.ed-stat:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-stat-hover);
}

.ed-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-3);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ed-stat-value {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══ AI COACH (elite) ═══ */
.coach-page {
    padding-bottom: 32px;
}

.coach-hero {
    position: relative;
    padding: 8px 0 32px;
    margin-bottom: 8px;
    border-bottom: none;
}

.coach-hero-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, 120%);
    height: 200px;
    background: radial-gradient(ellipse, rgba(167, 139, 250, 0.14) 0%, rgba(62, 255, 160, 0.08) 40%, transparent 70%);
    pointer-events: none;
}

.coach-title {
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-0);
    margin: 0 0 6px;
    line-height: 1.12;
    max-width: 100%;
}

.coach-sub {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-3);
    margin: 0;
    max-width: 42ch;
}

.coach-section {
    margin-bottom: var(--section-gap);
    max-width: 100%;
}

.coach-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--stack-md);
    margin-bottom: var(--stack-md);
}

.coach-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-3);
}

.coach-section-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
}

.coach-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.coach-metric {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 16px 14px;
    min-height: 108px;
    border-radius: 16px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.coach-metric:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
}

.coach-metric-value {
    font-size: clamp(22px, 5.5vw, 28px);
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.coach-metric-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-3);
    line-height: 1.35;
    margin-top: auto;
}

.coach-metric-bar {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    opacity: 0.9;
}

.coach-metric--red .coach-metric-value { color: #ff8fa3; }
.coach-metric--red .coach-metric-bar {
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    box-shadow: 0 0 16px rgba(251, 113, 133, 0.45);
}

.coach-metric--green .coach-metric-value { color: var(--accent); }
.coach-metric--green .coach-metric-bar {
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.coach-metric--amber .coach-metric-value { color: var(--amber); }
.coach-metric--amber .coach-metric-bar {
    background: linear-gradient(90deg, transparent, var(--amber), transparent);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.35);
}

.coach-metric--purple .coach-metric-value { color: var(--purple); }
.coach-metric--purple .coach-metric-bar {
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.35);
}

.coach-metric--red:hover { box-shadow: 0 8px 32px rgba(251, 113, 133, 0.08); }
.coach-metric--green:hover { box-shadow: 0 8px 32px rgba(62, 255, 160, 0.1); }
.coach-metric--amber:hover { box-shadow: 0 8px 32px rgba(251, 191, 36, 0.08); }
.coach-metric--purple:hover { box-shadow: 0 8px 32px rgba(167, 139, 250, 0.1); }

.coach-insights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coach-insight {
    position: relative;
    padding: 20px 18px;
    border-radius: 14px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    overflow: hidden;
}

.coach-insight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0.85;
}

.coach-insight--critical::before { background: linear-gradient(90deg, transparent, var(--red), transparent); }
.coach-insight--warning::before { background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.coach-insight--opportunity::before { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.coach-insight--info::before { background: linear-gradient(90deg, transparent, var(--blue), transparent); }

.coach-insight-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.coach-insight--critical .coach-insight-badge { color: var(--red); }
.coach-insight--warning .coach-insight-badge { color: var(--amber); }
.coach-insight--opportunity .coach-insight-badge { color: var(--accent); }
.coach-insight--info .coach-insight-badge { color: var(--blue); }

.coach-insight-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text-0);
    margin: 0 0 8px;
    line-height: 1.3;
}

.coach-insight-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-2);
    margin: 0;
}

.coach-empty {
    position: relative;
    text-align: center;
    padding: 36px 24px 32px;
    margin-top: 8px;
    border-radius: 20px;
    background: linear-gradient(165deg, rgba(88, 48, 150, 0.1) 0%, rgba(14, 17, 22, 0.6) 45%, rgba(8, 9, 12, 0.9) 100%);
    border: 1px solid rgba(167, 139, 250, 0.15);
    overflow: hidden;
}

.coach-empty-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 180px;
    background: radial-gradient(circle, rgba(62, 255, 160, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

.coach-empty-tag {
    position: relative;
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.coach-empty-title {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-0);
    margin: 0 0 10px;
}

.coach-empty-desc {
    position: relative;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-3);
    margin: 0 auto 24px;
    max-width: 28ch;
}

.coach-empty-actions {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 280px;
    margin: 0 auto;
}

/* ═══ INSIGHT LIST (legacy) ═══ */
.ed-insight-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.ed-insight-item {
    background: var(--bg-1);
    padding: 20px;
    transition: background var(--duration) var(--ease);
}
.ed-insight-item:hover { background: var(--bg-2); }

.ed-insight-severity {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.ed-insight-severity.critical { color: var(--red); }
.ed-insight-severity.warning { color: var(--amber); }
.ed-insight-severity.opportunity { color: var(--accent); }
.ed-insight-severity.info { color: var(--blue); }

.ed-insight-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-0);
    letter-spacing: -0.2px;
    margin-bottom: 6px;
}

.ed-insight-text {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
}

/* ═══ PANEL / PROFILE LIST ═══ */
.ed-menu {
    display: flex;
    flex-direction: column;
}

.ed-menu-group {
    margin-bottom: 28px;
}

.ed-menu-group-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-4);
    text-transform: uppercase;
    padding: 0 0 12px;
    margin-bottom: 0;
}

.ed-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}
.ed-menu-item:last-child { border-bottom: none; }
.ed-menu-item:hover { padding-left: 4px; }

.ed-menu-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
    letter-spacing: -0.1px;
}

.ed-menu-arrow {
    font-size: 14px;
    color: var(--text-4);
}

.ed-menu-value {
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

/* Danger variant */
.ed-menu-item.danger .ed-menu-label { color: var(--red); }

/* ═══ BUDGET PAGE ═══ */
.ed-progress {
    height: 4px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
    margin: 12px 0;
}

.ed-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.5s var(--ease);
}
.ed-progress-fill.warn { background: var(--amber); }
.ed-progress-fill.over { background: var(--red); }

/* ═══ CURRENCY PAGE ═══ */
.ed-currency-list {
    display: flex;
    flex-direction: column;
}

.ed-currency-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.ed-currency-row:last-child { border-bottom: none; }

.ed-currency-code {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    letter-spacing: 0.5px;
    min-width: 48px;
}

.ed-currency-name {
    flex: 1;
    font-size: 12px;
    color: var(--text-3);
    margin-left: 12px;
}

.ed-currency-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.ed-currency-buy {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
}

.ed-currency-sell {
    font-size: 11px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

/* ═══ FORMS (Login, Register, etc.) ═══ */
.ed-fullscreen {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px clamp(24px, 5vw, 48px);
    background: transparent;
    max-width: min(480px, 100%);
    margin: 0 auto;
    width: 100%;
}

.guest-page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(420px, 100%);
    margin: 0 auto;
    padding: calc(42px + env(safe-area-inset-top, 0px)) 0 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

@media (max-height: 740px) {
    .guest-page {
        padding-top: calc(24px + env(safe-area-inset-top, 0px));
        padding-bottom: 18px;
    }
}

.guest-page__body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.guest-page__brand {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
}

.guest-page__logo {
    display: block;
    margin-bottom: 16px;
}

.guest-page__brand .brand-logo--hero {
    display: block;
    margin-inline: auto;
    text-align: center;
}

.guest-page__brand .ed-form-title {
    text-align: center;
}

.guest-page .ed-form-sub {
    text-align: center;
}

.guest-page .ed-form-link {
    text-align: center;
    margin-top: 24px;
}

.guest-page .ed-input-group {
    width: 100%;
    text-align: left;
}

.ed-form-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--text-0);
    margin-bottom: 8px;
}

.ed-form-sub {
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 32px;
    line-height: 1.5;
}

.ed-input-group {
    margin-bottom: var(--stack-md);
}

.ed-input-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-3);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ed-input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-0);
    outline: none;
    transition: border-color var(--duration) var(--ease);
}

.ed-input[type="date"] {
    min-height: 48px;
}
.ed-input:focus { border-color: var(--accent); }
.ed-input::placeholder { color: var(--text-4); }

/* UiDateField — native picker kept, locale text hidden, formatted text overlaid */
.ui-date {
    position: relative;
    width: 100%;
}
.ui-date__native {
    width: 100%;
    color: transparent !important;
}
.ui-date__native::-webkit-datetime-edit { color: transparent; }
.ui-date__native::-webkit-datetime-edit-fields-wrapper { color: transparent; }
.ui-date__native::-webkit-calendar-picker-indicator {
    opacity: 0.75;
    cursor: pointer;
    filter: var(--date-picker-filter, invert(0.7));
}
.ui-date__overlay {
    position: absolute;
    left: 16px;
    right: 42px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: var(--text-0);
    font-size: 15px;
    font-family: var(--font);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
}
.ui-date__overlay--ph { color: var(--text-4); }
.ui-date.is-disabled { opacity: 0.55; }
[data-theme="light"] .ui-date__native::-webkit-calendar-picker-indicator {
    filter: none;
}

.ed-input:-webkit-autofill,
.ed-input:-webkit-autofill:hover,
.ed-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-0);
    caret-color: var(--text-0);
    transition: background-color 9999s ease-out;
    -webkit-box-shadow: 0 0 0 1000px var(--bg-1) inset;
    box-shadow: 0 0 0 1000px var(--bg-1) inset;
}

.ed-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #2ee68a 100%);
    color: var(--on-accent);
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    letter-spacing: -0.2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.ed-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.ed-btn:active { transform: translateY(0); }
.ed-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ed-btn-outline {
    width: 100%;
    background: transparent;
    color: var(--text-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}
.ed-btn-outline:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-dim);
}

.ed-btn-ghost {
    width: auto;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    box-shadow: none;
}
.ed-btn-ghost:hover {
    background: rgba(62, 255, 160, 0.14);
    box-shadow: 0 0 20px rgba(62, 255, 160, 0.12);
    transform: translateY(-1px);
}

.ed-form-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
    margin-top: 20px;
    cursor: pointer;
}
.ed-form-link:hover { color: var(--text-0); }
.ed-form-link span { color: var(--accent); font-weight: 500; }

.ed-error {
    background: var(--red-dim);
    border: 1px solid rgba(244, 63, 94, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--red);
}

/* ═══ SECURITY PAGE ═══ */
.ed-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.ed-toggle-row:last-child { border-bottom: none; }

.ed-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
}

.ed-toggle-sub {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 3px;
}

/* Toggle switch */
.ed-toggle {
    width: 44px;
    height: 24px;
    background: var(--bg-3);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background var(--duration) var(--ease);
    border: 1px solid var(--border);
}
.ed-toggle.active { background: var(--accent); border-color: var(--accent); }
.ed-toggle::after {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform var(--duration) var(--ease);
}
.ed-toggle.active::after { transform: translateX(20px); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ LANGUAGE SWITCHER ═══ */
.lang-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.lang-switcher-btn {
    border: none;
    border-radius: 9px;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-3);
    background: transparent;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.lang-switcher-btn:hover {
    color: var(--text-1);
    background: var(--bg-3);
}

.lang-switcher-btn.active {
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent) 0%, #2ee68a 100%);
    box-shadow: 0 4px 20px var(--accent-glow);
}

[data-theme="light"] .lang-switcher-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, #22c55e 100%);
}

.app-sidebar-foot .lang-switcher {
    margin-bottom: 0;
}

.lang-switcher--compact {
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
}

.lang-switcher--compact .lang-switcher-btn {
    padding: 8px 6px;
    font-size: 11px;
    border-radius: 7px;
}

/* ═══ UTILITY ═══ */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-red { color: var(--red); }

/* ═══ RECEIPT DROPZONE ═══ */
.ed-dropzone {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
    outline: none;
    margin-bottom: 16px;
}
.ed-dropzone:hover,
.ed-dropzone:focus {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 32px rgba(62, 255, 160, 0.08);
}
.ed-dropzone-active {
    border-color: var(--accent) !important;
    background: rgba(62, 255, 160, 0.1) !important;
    box-shadow: 0 0 40px rgba(62, 255, 160, 0.12);
}
.ed-dropzone-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 6px;
}
.ed-dropzone-sub {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.5;
}
.ed-dropzone-preview {
    margin-top: 12px;
    max-height: 160px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.ed-dropzone-preview img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    display: block;
    background: var(--bg-2);
}
.ed-dropzone-file {
    font-size: 12px;
    color: var(--accent);
    margin-top: 8px;
    word-break: break-all;
}
.ed-file-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ═══ BILLING (Iyzico) ═══ */
.billing-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.billing-card {
    max-width: 420px;
    width: 100%;
    padding: 28px 24px;
    border-radius: 16px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    text-align: center;
}

.billing-card--ok { border-color: rgba(62, 255, 160, 0.35); }
.billing-card--fail { border-color: rgba(255, 100, 100, 0.35); }

.billing-desc {
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.55;
    margin: 12px 0 20px;
}

.billing-history { margin-top: 20px; }

.billing-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.billing-history-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.billing-history-item time {
    grid-column: 1 / -1;
    font-size: 11px;
    color: var(--text-4);
}

.billing-history-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.billing-history-status--success { color: var(--accent); }
.billing-history-status--failure { color: var(--red); }

.billing-page--checkout {
    flex-direction: column;
    align-items: stretch;
    max-width: 520px;
    margin: 0 auto;
}

.billing-checkout-head {
    text-align: center;
    margin-bottom: 20px;
}

.billing-checkout-head h1 {
    font-size: 20px;
    margin: 0 0 8px;
}

.billing-iyzico-form {
    width: 100%;
    min-height: 420px;
}

/* ═══ PLAN PICKER (subscription) ═══ */
.plan-section-desc {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
    margin: -4px 0 16px;
    max-width: 520px;
}

.plan-picker { margin-bottom: 8px; }

.plan-credits {
    padding: 16px 18px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(62, 255, 160, 0.08) 0%, rgba(14, 17, 22, 0.95) 100%);
    border: 1px solid rgba(62, 255, 160, 0.2);
    box-shadow: 0 0 28px rgba(62, 255, 160, 0.06);
}

.plan-credits-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 10px;
}

.plan-credits-val {
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.plan-credits-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.plan-credits-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) 0%, #7dffc4 100%);
    box-shadow: 0 0 12px rgba(62, 255, 160, 0.45);
    transition: width 0.5s var(--ease);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 640px) {
    .plan-grid { grid-template-columns: 1fr; }
}

/* Budget planner (/research) */
.plan-stepper {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.plan-stepper-btn {
    flex: 0 0 48px;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-0);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.plan-stepper-btn:hover {
    border-color: var(--accent-border);
    color: var(--accent);
}
.plan-stepper-input {
    text-align: center;
    -moz-appearance: textfield;
}
.plan-stepper-input::-webkit-outer-spin-button,
.plan-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.plan-breakdown {
    display: flex;
    flex-direction: column;
}
.plan-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-subtle, var(--border));
}
.plan-line:last-child { border-bottom: none; }
.plan-line-label {
    color: var(--text-2);
    font-size: 14px;
}
.plan-line-amt {
    color: var(--text-0);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.plan-line--total {
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.plan-line--total .plan-line-label {
    color: var(--text-0);
    font-weight: 700;
}
.plan-line--total .plan-line-amt {
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
}

.plan-card {
    position: relative;
    text-align: left;
    padding: 18px 16px 16px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
    font-family: var(--font);
    color: inherit;
    overflow: hidden;
}

.plan-card:disabled {
    opacity: 0.65;
    cursor: wait;
}

.plan-card-glow {
    position: absolute;
    inset: -40% -20% auto auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.2) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.plan-card:hover {
    border-color: rgba(167, 139, 250, 0.35);
    transform: translateY(-1px);
}

.plan-card:hover .plan-card-glow { opacity: 1; }

.plan-card.selected,
.plan-card.current {
    border-color: var(--purple);
    box-shadow: 0 0 32px rgba(167, 139, 250, 0.14);
    background: linear-gradient(145deg, rgba(88, 48, 150, 0.14) 0%, rgba(14, 17, 22, 0.92) 100%);
}

.plan-card--pro.selected,
.plan-card--pro.current,
.plan-card--premium.selected,
.plan-card--premium.current {
    border-color: var(--accent);
    box-shadow: 0 0 32px rgba(62, 255, 160, 0.12);
}

.plan-card--free .plan-card-glow {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
}

.plan-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--accent);
    text-transform: uppercase;
}

.plan-card-badge--current {
    color: var(--purple);
}

.plan-card-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-0);
    margin-bottom: 6px;
    padding-right: 56px;
}

.plan-card-price {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.plan-card-price small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: 2px;
}

.plan-card-desc {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.45;
    margin: 0 0 12px;
    min-height: 34px;
}

.plan-card-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-card-features li {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.4;
    padding: 3px 0 3px 14px;
    position: relative;
}

.plan-card-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.5);
}

.plan-card--pro .plan-card-features li::before,
.plan-card--premium .plan-card-features li::before {
    background: var(--accent);
    box-shadow: 0 0 6px rgba(62, 255, 160, 0.45);
}

.plan-picker-msg {
    font-size: 13px;
    margin-top: 14px;
    line-height: 1.45;
}

.plan-picker-msg.ok { color: var(--accent); }
.plan-picker-msg.error { color: var(--red); }

.plan-picker-hint {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px dashed rgba(167, 139, 250, 0.35);
    background: rgba(88, 48, 150, 0.08);
}

.plan-picker-hint p {
    font-size: 13px;
    color: var(--text-2);
    margin: 0 0 12px;
    line-height: 1.45;
}

/* ═══ Loading settings (profile) ═══ */
.loading-settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-1);
    cursor: pointer;
}

.loading-settings-interval {
    margin-top: 8px;
}

.loading-settings-row-gap {
    margin-top: 8px;
}

/* ═══ PURCHASE PAGE (Alışveriş Yaptım) ═══ */
.purchase-page .app-content,
.purchase-page {
    padding-bottom: calc(120px + var(--ai-dock-offset, 0px) + env(safe-area-inset-bottom));
}

.purchase-header {
    margin-bottom: 18px;
}

.purchase-header--slim {
    margin-bottom: 10px;
}

.purchase-header-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.purchase-header-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-1);
}

.purchase-header--slim .purchase-header-title {
    font-size: 18px;
}

.purchase-header-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.45;
}

.purchase-header-time {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-3);
}

.purchase-header--slim .purchase-header-time {
    margin-top: 0;
    font-size: 11px;
    flex-shrink: 0;
}

/* Alt form — ultra kompakt */
.purchase-form-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-1);
}

.purchase-compact-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.purchase-compact-block--merchant {
    gap: 3px;
}

.purchase-compact-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-4);
    line-height: 1.2;
}

.purchase-compact-merchant-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.purchase-compact-merchant-row .ed-input--dense {
    flex: 1;
    min-width: 0;
}

.ed-input--dense {
    padding: 6px 10px;
    font-size: 13px;
    min-height: 32px;
    border-radius: 8px;
}

.ed-btn--dense,
.ed-btn-outline--dense {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}

.purchase-compact-error {
    margin: 0;
    font-size: 11px;
    padding: 6px 8px;
}

.category-picker-loading,
.fin-context-picker-loading {
    font-size: 11px;
    color: var(--text-3);
    margin: 0;
}

.category-picker--compact .category-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 4px;
    max-height: 128px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 1px 2px 0;
    scrollbar-width: thin;
}

.category-picker--compact .category-picker-chip {
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-picker--compact .category-picker-request {
    margin-top: 6px;
    padding-top: 6px;
}

.category-picker-request-btn {
    padding: 0;
    border: none;
    background: none;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
}

.category-picker-request-btn:hover {
    color: var(--accent);
}

.category-picker--compact .category-picker-request-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.category-picker-request-error {
    margin: 4px 0 0;
    font-size: 11px;
}

.fin-context-picker--compact {
    gap: 4px;
}

.fin-context-picker--compact .fin-context-picker-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-4);
}

.fin-context-picker--compact .fin-context-picker-chips {
    gap: 4px;
    max-height: 72px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.fin-context-picker--compact .fin-context-chip {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.purchase-form-compact .purchase-ai-categorize {
    flex-shrink: 0;
    margin: 0;
    font-size: 10px;
    white-space: nowrap;
}

.purchase-form-compact .expense-ai {
    margin: 0;
}

.purchase-form-compact .expense-ai--collapsed {
    border-radius: 8px;
}

.purchase-form-compact .expense-ai-toggle {
    padding: 7px 10px;
    font-size: 11px;
    gap: 8px;
}

.purchase-form-compact .expense-ai--open {
    padding: 10px;
}

.purchase-form-compact .expense-ai-desc--short {
    margin: 0 0 8px;
    font-size: 10px;
}

.purchase-save-bar--compact {
    margin-top: 6px;
    padding: 6px 0 2px;
}

/* Kompakt form kısa olduğunda sticky save-bar yukarı çekilip merchant /
   akıllı giriş alanlarının üstüne biniyordu — normal akışta en altta kalsın.
   Specificity, temel .purchase-save-bar sticky kuralını geçecek şekilde .purchase-page ile artırıldı. */
.purchase-page .purchase-save-bar--compact {
    position: static;
    bottom: auto;
    background: none;
}

.purchase-save-btn--compact {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    min-height: 40px;
}

.purchase-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.purchase-section {
    margin: 0;
}

.category-picker-hint,
.fin-context-picker-hint {
    font-size: 12px;
    color: var(--text-3);
    margin: 0 0 10px;
    line-height: 1.4;
}

.category-picker-grid,
.fin-context-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-picker-chip,
.fin-context-chip {
    flex: 0 1 auto;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fin-context-picker-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}

.category-picker-chip--active,
.fin-context-chip--active {
    border-color: var(--accent);
    background: rgba(62, 255, 160, 0.12);
    color: var(--accent);
}

.category-picker-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.category-picker-request {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.fin-context-picker {
    margin: 0;
}

.fin-context-picker-loading {
    font-size: 13px;
    color: var(--text-3);
}

.purchase-ai-categorize {
    margin-top: 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.purchase-save-bar {
    position: sticky;
    bottom: calc(var(--bottom-nav-h) + var(--ai-dock-offset, 52px) + env(safe-area-inset-bottom));
    z-index: 10;
    margin-top: 8px;
    padding: 12px 0 4px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-1) 28%);
}

.purchase-save-btn {
    width: 100%;
    font-size: 15px;
    font-weight: 700;
    padding: 16px;
}

.purchase-page .expense-ai {
    margin-bottom: 0;
}

.amount-input {
    margin-bottom: 22px;
}

.amount-input-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 4px;
}

.amount-input-hint {
    font-size: 12px;
    color: var(--text-3);
    margin: 0 0 10px;
    line-height: 1.4;
}

.amount-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--card-radius);
    border: 2px solid var(--border);
    background: var(--bg-2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.amount-input-box.focused {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(62, 255, 160, 0.12);
}

.amount-input-currency {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.amount-input-field {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
    outline: none;
    font-family: var(--font);
}

.amount-input-field::placeholder {
    color: var(--text-4);
    font-weight: 600;
}

.amount-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.amount-quick-chip {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--duration) var(--ease);
}

.amount-quick-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.purchase-save-btn {
    font-size: 15px;
    font-weight: 700;
    padding: 16px;
}

/* ═══ EXPENSE AI INPUT ═══ */
.expense-ai {
    margin-bottom: 20px;
    padding: 18px 16px;
    border-radius: var(--card-radius);
    border: 1px solid var(--accent-border);
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
}

.expense-ai--collapsed {
    padding: 0;
    border-style: dashed;
    background: var(--bg-2);
    box-shadow: none;
}

.expense-ai-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    text-align: left;
}

.expense-ai-toggle-icons {
    flex-shrink: 0;
    opacity: 0.85;
}

.expense-ai-toggle-text {
    flex: 1;
}

.expense-ai-toggle-chevron {
    font-size: 10px;
    color: var(--text-3);
}

.expense-ai--open {
    padding: 14px 14px 16px;
}

.expense-ai-desc--short {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.4;
    margin: 0 0 12px;
}

.expense-ai--open .expense-ai-mic {
    width: 56px;
    height: 56px;
}

.expense-ai--open .expense-ai-dropzone {
    min-height: 72px;
    padding: 12px;
}

.expense-ai--open .ed-dropzone-title {
    font-size: 13px;
}

.expense-ai--open .ed-dropzone-sub {
    font-size: 11px;
}

.expense-ai-tag {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--purple);
    margin-bottom: 6px;
}

.expense-ai-desc {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.45;
    margin: 0 0 14px;
}

.expense-ai-banner {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.expense-ai-banner--warn {
    border: 1px dashed rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.06);
    color: var(--text-2);
}

.expense-ai-banner p { margin: 0 0 10px; }

.expense-ai-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.expense-ai-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    font-family: var(--font);
}

.expense-ai-mode.active {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 24px rgba(62, 255, 160, 0.12);
}

.expense-ai-voice {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 4px;
}

.expense-ai-mic {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: rgba(62, 255, 160, 0.08);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.expense-ai-mic.listening {
    animation: expense-mic-pulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 32px rgba(62, 255, 160, 0.35);
}

@keyframes expense-mic-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.expense-ai-mic-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(62, 255, 160, 0.25);
    pointer-events: none;
}

.expense-ai-mic-icon {
    font-size: 22px;
    line-height: 1;
}

.expense-ai-voice-hint,
.expense-ai-transcript {
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
    margin: 0;
}

.expense-ai-transcript {
    margin-top: 10px;
    color: var(--text-2);
    font-style: italic;
}

.expense-ai-dropzone { margin-bottom: 0; }

.expense-ai-error {
    font-size: 12px;
    color: var(--red);
    margin-top: 12px;
}

.expense-ai-preview {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(62, 255, 160, 0.25);
    background: rgba(62, 255, 160, 0.06);
}

.expense-ai-preview-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--accent);
    margin-bottom: 8px;
}

.expense-ai-preview-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-0);
    margin-bottom: 6px;
}

.expense-ai-preview-merchant {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 12px;
}

.expense-ai-preview .ed-action-btn {
    width: 100%;
}

/* ═══ EXPENSE REVIEW (edit before save) ═══ */
.expense-ai-review {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    background: var(--surface-2, rgba(255,255,255,0.04));
    border: 1px solid var(--border-1, rgba(255,255,255,0.08));
}

.expense-ai-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.expense-ai-review-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
}

.expense-ai-review-flag {
    font-size: 11px;
    font-weight: 700;
    color: #b54708;
    background: rgba(251, 191, 36, 0.18);
    padding: 3px 8px;
    border-radius: 999px;
}

.expense-ai-review-conf {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    background: var(--surface-3, rgba(255,255,255,0.06));
    padding: 3px 8px;
    border-radius: 999px;
}

.expense-ai-review-media img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 10px;
    display: block;
    margin: 0 auto 12px;
}

.expense-ai-review-transcript {
    font-size: 13px;
    font-style: italic;
    color: var(--text-2);
    margin: 0 0 12px;
}

.expense-ai-review-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: var(--surface-1, rgba(0,0,0,0.12));
    margin-bottom: 10px;
}

.expense-ai-review-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.expense-ai-review-field > span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
}

.expense-ai-review-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.expense-ai-review-actions > button {
    flex: 1;
}

/* ═══ MEDIA VIEWER MODAL ═══ */
.media-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.media-modal-card {
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 16px;
    background: var(--surface-2, #181818);
    border: 1px solid var(--border-1, rgba(255,255,255,0.1));
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.media-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-1, rgba(255,255,255,0.08));
}

.media-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
}

.media-modal-close {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px;
}

.media-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.media-modal-image {
    width: 100%;
    border-radius: 10px;
}

.media-modal-audio {
    width: 100%;
}

.media-modal-meta-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
}

.media-modal-meta-text {
    font-size: 13px;
    color: var(--text-2);
    margin: 4px 0 0;
}

.media-modal-meta-text--mono {
    font-family: ui-monospace, monospace;
    white-space: pre-wrap;
    font-size: 12px;
}

.media-modal-download {
    text-align: center;
    text-decoration: none;
}

.media-modal-loading,
.media-modal-error {
    text-align: center;
    color: var(--text-3);
    padding: 24px;
}

/* ═══ LIGHT THEME ═══ */
[data-theme="light"] {
    color-scheme: light;
    --bg-0: #f4f4f5;
    --bg-1: #ffffff;
    --bg-2: #f4f4f5;
    --bg-3: #e4e4e7;
    --bg-4: #d4d4d8;
    --text-0: #09090b;
    --text-1: #18181b;
    --text-2: #3f3f46;
    --text-3: #71717a;
    --text-4: #a1a1aa;
    --accent: #16a34a;
    --accent-dim: rgba(22, 163, 74, 0.1);
    --accent-hover: #15803d;
    --accent-glow: rgba(22, 163, 74, 0.22);
    --accent-border: rgba(22, 163, 74, 0.28);
    --purple-dim: rgba(124, 58, 237, 0.08);
    --gradient-brand-soft: linear-gradient(135deg, rgba(22, 163, 74, 0.14) 0%, rgba(124, 58, 237, 0.1) 100%);
    --gradient-brand-glow:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(22, 163, 74, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    --red-dim: rgba(225, 29, 72, 0.08);
    --green: #16a34a;
    --green-dim: rgba(22, 163, 74, 0.1);
    --amber-dim: rgba(217, 119, 6, 0.1);
    --border: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.04);
    --glass: rgba(255, 255, 255, 0.92);
    --overlay: rgba(15, 23, 42, 0.38);
    --on-accent: #ffffff;
    --sheet-shadow: 0 -8px 40px rgba(15, 23, 42, 0.12);
    --surface-card: linear-gradient(145deg, #ffffff 0%, #f8faf9 100%);
    --surface-stat: linear-gradient(145deg, #ffffff 0%, #f4f4f5 100%);
    --surface-sidebar: linear-gradient(165deg, #ffffff 0%, #f4f4f5 100%);
    --shadow-card: 0 4px 18px rgba(15, 23, 42, 0.07);
    --shadow-stat-hover: 0 0 20px rgba(22, 163, 74, 0.1);
    --text-hero-glow: none;
}

[data-theme="light"] .app-glow {
    background:
        radial-gradient(ellipse 100% 55% at 50% -8%, rgba(22, 163, 74, 0.1) 0%, transparent 52%),
        radial-gradient(ellipse 70% 40% at 80% 100%, rgba(22, 163, 74, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 10% 60%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

[data-theme="light"] .app-header,
[data-theme="light"] .bottom-nav {
    background: var(--glass);
    border-color: var(--border);
}

[data-theme="light"] .app-sidebar {
    background: var(--surface-sidebar);
    border-color: var(--border);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .nav-transition-overlay,
[data-theme="light"] .action-busy-overlay--contained {
    background: rgba(244, 244, 245, 0.92);
}

[data-theme="light"] .coach-metric,
[data-theme="light"] .coach-insight {
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
}

[data-theme="light"] .coach-metric:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-card);
}

[data-theme="light"] .ed-card-ai,
[data-theme="light"] .ed-card-ai--glow,
[data-theme="light"] .ed-card-ai--static {
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
}

[data-theme="light"] .plan-credits {
    background: linear-gradient(145deg, rgba(22, 163, 74, 0.08) 0%, var(--bg-1) 100%);
    border-color: var(--accent-border);
    box-shadow: none;
}

[data-theme="light"] .ed-dropzone:hover,
[data-theme="light"] .ed-dropzone:focus {
    box-shadow: none;
}

[data-theme="light"] .ed-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #22c55e 100%);
    color: var(--on-accent);
}

[data-theme="light"] .ed-btn-ghost:hover {
    background: var(--accent-dim);
    box-shadow: none;
}

[data-theme="light"] .ed-action-btn {
    color: var(--text-1);
    background: var(--bg-1);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .ed-action-btn:hover:not(:disabled) {
    color: var(--text-0);
    border-color: rgba(0, 0, 0, 0.2);
    background: var(--bg-2);
}

[data-theme="light"] .ed-action-btn:disabled {
    color: var(--text-2);
    opacity: 1;
}

[data-theme="light"] .ed-action-btn.primary {
    color: #15803d;
    background: rgba(22, 163, 74, 0.14);
}

[data-theme="light"] .ed-action-btn.primary:hover:not(:disabled) {
    color: #14532d;
    background: rgba(22, 163, 74, 0.2);
}

[data-theme="light"] .expense-ai,
[data-theme="light"] .expense-ai--open {
    background: var(--surface-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

[data-theme="light"] .expense-ai--collapsed {
    background: var(--bg-1);
}

[data-theme="light"] .expense-ai-mode {
    background: var(--bg-1);
    color: var(--text-1);
}

[data-theme="light"] .expense-ai-mode.active {
    background: var(--accent-dim);
    box-shadow: none;
}

[data-theme="light"] .expense-ai-mic {
    background: var(--bg-2);
    border-color: var(--border);
}

[data-theme="light"] .home-launcher-icon,
[data-theme="light"] .home-launcher-icon-wrap.fu-app-icon {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    color: #15803d;
}

[data-theme="light"] .app-sidebar-dock-btn,
[data-theme="light"] .app-sidebar-link:hover {
    background: var(--accent-dim);
}

[data-theme="light"] .amount-input-box,
[data-theme="light"] .ui-data-view {
    background: var(--bg-1);
}

[data-theme="light"] .app-backdrop {
    background: var(--overlay);
}

[data-theme="light"] .profile-avatar-fallback {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    color: #15803d;
    border: 1px solid var(--accent-border);
}

/* ═══ THEME TOGGLE ═══ */
.theme-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
}

.theme-toggle-btn {
    border: none;
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-3);
    background: transparent;
    cursor: pointer;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.theme-toggle-btn.active {
    background: var(--bg-1);
    color: var(--text-0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .theme-toggle-btn.active {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* ═══ BOTTOM SHEETS / MODALS ═══ */
.pm-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--overlay);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: pmFadeIn 0.22s var(--ease);
}

@keyframes pmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pm-sheet {
    width: 100%;
    max-width: 480px;
    max-height: min(88dvh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--bg-1);
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: var(--sheet-shadow);
    animation: pmSlideUp 0.28s var(--ease);
}

@keyframes pmSlideUp {
    from { transform: translateY(16px); opacity: 0.6; }
    to { transform: none; opacity: 1; }
}

.pm-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 10px auto 0;
    flex-shrink: 0;
}

.pm-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px 8px;
    flex-shrink: 0;
}

.pm-sheet-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-0);
    letter-spacing: -0.02em;
}

.pm-sheet-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
    line-height: 1.45;
}

.pm-sheet-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    font-family: var(--font);
}

.pm-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 16px;
    -webkit-overflow-scrolling: touch;
}

.pm-sheet-foot {
    flex-shrink: 0;
    padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: var(--bg-1);
}

.pm-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 10px;
}

.pm-sheet-actions .ed-btn,
.pm-sheet-actions .ed-btn-outline {
    width: auto;
    min-height: 46px;
    padding: 12px 16px;
    margin: 0;
}

.pm-sheet-actions .ed-btn {
    box-shadow: 0 2px 12px var(--accent-glow);
}

.pm-sheet--help {
    max-height: min(92dvh, 780px);
    animation: pmHelpSheetIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pmHelpSheetIn {
    from {
        transform: translateY(28px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

.page-help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    transition:
        transform 0.2s var(--ease),
        color 0.2s var(--ease),
        border-color 0.2s var(--ease),
        background 0.2s var(--ease);
    flex-shrink: 0;
}

[data-theme="light"] .page-help-trigger {
    color: var(--text-3);
}

.app-root.impulse-guard-open .page-help-trigger {
    opacity: 0;
    pointer-events: none;
}

.page-help-trigger:hover,
.page-help-trigger:focus-visible {
    transform: scale(1.06);
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-dim);
    outline: none;
}

.page-help-trigger-icon {
    width: 18px;
    height: 18px;
}

.page-help-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.page-help-actions {
    padding: 14px 14px 12px;
    border-radius: 12px;
    border: 1px solid var(--accent-border);
    background: var(--accent-dim);
}

.page-help-actions-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 10px;
}

.page-help-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-help-bullets li {
    position: relative;
    padding-left: 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-1);
}

.page-help-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.page-help-section {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}

.page-help-section:last-of-type {
    border-bottom: none;
}

.page-help-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.page-help-section-body {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-2);
    margin: 0;
    white-space: pre-line;
}

.page-help-benefit {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--bg-2) 0%, var(--bg-3) 100%);
}

.page-help-benefit-kicker {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
}

.page-help-benefit-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-0);
    margin: 0 0 8px;
}

.page-help-benefit-body {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-2);
    margin: 0;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.legal-shell-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.legal-shell-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.onboarding-page {
    position: relative;
}

.pm-alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 12px;
}

.pm-alert--error {
    background: var(--red-dim);
    border: 1px solid rgba(251, 113, 133, 0.25);
    color: var(--red);
}

/* ═══ RECEIPT SCAN (calmer) ═══ */
.receipt-scan-drop {
    margin-bottom: 16px;
    padding: 20px 16px;
}

.ed-dropzone--soft {
    border-style: solid;
    border-color: var(--border);
    background: var(--bg-2);
}

.ed-dropzone--soft:hover,
.ed-dropzone--soft:focus {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    box-shadow: none;
}

.ed-dropzone--soft.ed-dropzone-active {
    border-color: var(--accent) !important;
    background: var(--accent-dim) !important;
    box-shadow: none !important;
}

.receipt-scan-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.85;
}

.receipt-scan-store {
    margin-bottom: 12px;
}

.receipt-scan-advanced {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-2);
    overflow: hidden;
}

.receipt-scan-advanced summary {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    list-style: none;
}

.receipt-scan-advanced summary::-webkit-details-marker { display: none; }

.receipt-scan-advanced[open] summary {
    border-bottom: 1px solid var(--border);
}

.receipt-scan-advanced .ed-input-group {
    padding: 12px 14px 14px;
    margin: 0;
}

.receipt-scan-results {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.receipt-scan-results .ed-overline {
    display: block;
    margin-bottom: 8px;
}

.ed-hero-stat {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.ed-hero-stat .ed-amount--rate {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 8px 0;
}

.ed-empty {
    text-align: center;
    padding: 40px 0;
}

.ed-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 8px;
}

.ed-empty-desc {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.6;
}

.ed-form-grid {
    display: grid;
    gap: var(--stack-md);
    margin-bottom: var(--stack-sm);
}

.ed-form-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.ed-card-ai--static {
    cursor: default;
}

.ed-ai-text--pre {
    white-space: pre-wrap;
}

/* Family / income section cards */
.family-card,
.family-page .family-card,
.income-page .family-card {
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--card-radius);
    padding: var(--card-pad);
    margin-bottom: var(--card-gap);
}

.family-card .ed-section-title,
.income-page .family-card .ed-section-title {
    margin-bottom: var(--stack-md);
}

.family-card--invite {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.family-card--muted {
    opacity: 0.95;
}

.family-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.family-page-title {
    font-size: 1.5rem;
    margin: 0;
}

.family-page-sub {
    margin-top: 8px;
}

.family-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-0);
    text-transform: capitalize;
}

.family-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    flex-shrink: 0;
}

.family-hint {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
    margin: 0 0 12px;
}

.family-hint--tight {
    margin-bottom: 0;
}

/* Elevated inputs on dark family cards */
.family-page .family-input,
.family-page .family-card .ed-input {
    background: var(--bg-2);
    border-color: var(--border);
}

.family-page .family-input:focus,
.family-page .family-card .ed-input:focus {
    background: var(--bg-1);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.family-page .family-input-group {
    margin-bottom: 0;
}

/* Budget summary */
.family-budget {
    margin-top: 4px;
}

.family-budget-hero {
    margin-bottom: 16px;
}

.family-budget-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
}

.family-budget-amount {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-0);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.family-budget-hero.is-warn .family-budget-amount { color: var(--amber); }
.family-budget-hero.is-over .family-budget-amount { color: var(--red); }
.family-budget-hero.is-ok .family-budget-amount { color: var(--accent); }

.family-budget-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

@media (max-width: 400px) {
    .family-budget-row {
        grid-template-columns: 1fr;
    }
}

.family-budget-chip {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border-subtle);
}

.family-budget-chip-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
    margin-bottom: 4px;
}

.family-budget-chip-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    font-variant-numeric: tabular-nums;
}

.family-budget-chip--pct.is-warn .family-budget-chip-value { color: var(--amber); }
.family-budget-chip--pct.is-over .family-budget-chip-value { color: var(--red); }
.family-budget-chip--pct.is-ok .family-budget-chip-value { color: var(--accent); }

.family-progress {
    height: 6px;
    background: var(--bg-2);
    border-radius: 3px;
    overflow: hidden;
}

.family-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.4s var(--ease);
}

.family-progress-fill.warn { background: var(--amber); }
.family-progress-fill.over { background: var(--red); }

/* Invite panel */
.family-card--invite-send {
    border-color: var(--border);
    background: var(--bg-3);
}

.family-panel-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.family-panel-head .ed-section-title,
.family-panel-title {
    margin-bottom: 6px;
}

.family-panel-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    position: relative;
}

.family-panel-icon::before {
    content: "@";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.family-invite-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.family-invite-btn,
.family-page .family-card .family-invite-btn,
.family-page .family-create-btn,
.family-page .family-note-submit {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 520px) {
    .family-invite-form {
        flex-direction: row;
        align-items: flex-end;
        flex-wrap: wrap;
    }

    .family-invite-form .family-input-group {
        flex: 1 1 220px;
        min-width: 0;
    }

    .family-invite-btn {
        width: auto;
        min-width: 148px;
        flex-shrink: 0;
        align-self: flex-end;
    }
}

.family-section {
    margin-bottom: var(--card-gap);
}

.family-count-badge {
    font-size: 12px;
    font-weight: 700;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.family-member-list,
.family-pending-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.family-member-item,
.family-pending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
}

.family-member-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    letter-spacing: 0.02em;
}

.family-member-body {
    flex: 1;
    min-width: 0;
}

.family-member-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.family-member-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
}

.family-member-you {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    margin-left: 4px;
}

.family-member-email {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-role-pill {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--bg-2);
    color: var(--text-3);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.family-role-pill--owner,
.family-role-pill--admin {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent-border);
}

.family-icon-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    font-family: inherit;
}

.family-icon-btn.danger {
    color: var(--red);
    border-color: rgba(251, 113, 133, 0.35);
    background: var(--red-dim);
}

.family-icon-btn:hover:not(:disabled) {
    border-color: var(--accent-border);
    color: var(--text-0);
}

.family-pending-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
    position: relative;
}

.family-pending-icon::before {
    content: "…";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--amber);
    letter-spacing: -2px;
}

.family-pending-body {
    flex: 1;
    min-width: 0;
}

.family-pending-email {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-pending-meta {
    font-size: 12px;
    color: var(--text-3);
}

.family-pill-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.family-pill-btn:hover:not(:disabled) {
    border-color: var(--accent-border);
    color: var(--text-0);
}

.family-incoming-invite {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.family-incoming-invite:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

@media (min-width: 520px) {
    .family-incoming-invite {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .family-incoming-body {
        flex: 1;
        min-width: 160px;
    }

    .family-invite-actions {
        margin-left: auto;
    }
}

.family-incoming-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    flex-shrink: 0;
    position: relative;
}

.family-incoming-icon::before {
    content: "+";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 300;
    color: var(--accent);
}

.family-segmented {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    padding: 3px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border-subtle);
}

.family-segmented-btn {
    flex: 1;
    min-height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.family-segmented-btn.is-active {
    background: var(--bg-3);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.family-note-submit,
.family-settings-save {
    margin-top: 12px;
}

.family-settings-save {
    width: 100%;
}

.family-member-row {
    flex-wrap: wrap;
    gap: 8px;
}

.family-link-btn {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.family-link-btn.danger {
    color: var(--red);
}

.family-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    padding-bottom: 32px;
}

.family-alert {
    font-size: 13px;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.family-alert--error {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(251, 113, 133, 0.25);
}

.family-alert--ok {
    background: var(--green-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

.family-invite-family {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text-0);
}

.family-invite-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.family-invite-actions .ed-btn,
.family-invite-actions .ed-btn-outline {
    flex: 1 1 120px;
    width: auto;
    min-width: 0;
}

/* Income & cashflow */
.income-hero-title {
    font-size: 1.5rem;
    margin: 0;
}

.income-hero-sub {
    margin-top: 10px;
}

.income-cat-scroll {
    margin-bottom: var(--stack-md);
}

.income-page .ed-btn {
    margin-top: var(--stack-sm);
}

.income-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--stack-sm);
    margin-bottom: var(--card-gap);
}

@media (min-width: 520px) {
    .income-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.income-stat {
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-3);
}

.income-stat--green .income-stat-value { color: var(--accent); }
.income-stat--red .income-stat-value { color: var(--red); }
.income-stat--net .income-stat-value { color: var(--text-0); font-weight: 700; }

.income-stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.income-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.income-cal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.income-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
}

.income-home-net {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid var(--accent-border);
    background: var(--accent-dim);
    cursor: pointer;
}

.income-home-net .income-stat-label { margin: 0; flex: 1; }
.income-home-net .ed-menu-arrow { color: var(--text-3); }

.family-note-vis {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.family-note-input {
    width: 100%;
    min-height: 72px;
    resize: vertical;
}

.family-notes-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.family-note-item {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-2);
}

.family-note-item--private {
    border-color: var(--purple);
    background: var(--purple-dim);
}

.family-note-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--purple);
}

.family-note-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.cards-form { display: flex; flex-direction: column; gap: 10px; }
.cards-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cards-cvv-note { margin: 0; font-size: 11px; color: var(--accent); }
.cards-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cards-list-item { flex-wrap: wrap; }

.pwd-vault-card { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.pwd-toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pwd-form-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.pwd-form-actions { display: flex; gap: 10px; margin-top: 8px; }
.pwd-entry { flex-wrap: wrap; }
.pwd-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.life-context-add .ed-input + .ed-input {
    margin-top: 8px;
}

.family-note-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-1);
    margin: 0 0 8px;
    white-space: pre-wrap;
}

/* Capture test mode (?test=1 on localhost) */
.capture-test-banner {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100002;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #050506;
    background: var(--accent);
    border: 1px solid rgba(62, 255, 160, 0.5);
    box-shadow: 0 8px 32px rgba(62, 255, 160, 0.25);
    pointer-events: auto;
}

.capture-test-banner__btn {
    font: inherit;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(5, 5, 6, 0.2);
    background: rgba(5, 5, 6, 0.12);
    color: inherit;
    cursor: pointer;
}

html.capture-test-mode .ed-input:not([data-capture-ignore]) {
    outline: 1px dashed rgba(62, 255, 160, 0.2);
    outline-offset: 2px;
}

/* test=1 veya loading=off → loader/overlay gizle (capture + QA) */
html.capture-suppress-loading .benefit-loader,
html.capture-suppress-loading .action-busy-overlay,
html.capture-suppress-loading .nav-transition-overlay,
html.capture-suppress-loading .loading-progress {
    display: none !important;
    pointer-events: none !important;
}

/* Goals / savings targets */
.goals-page .family-card,
.goals-page .goals-compose {
    margin-bottom: var(--card-gap);
}

.goals-hero-title {
    font-size: 1.5rem;
    margin: 0;
}

.goals-hero-sub {
    margin-top: 10px;
}

.goals-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--stack-sm);
    margin-bottom: var(--card-gap);
}

@media (min-width: 640px) {
    .goals-summary {
        grid-template-columns: 1fr 1fr 1.2fr;
    }
}

.goals-stat {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-3);
}

.goals-stat--accent .goals-stat-value {
    color: var(--accent);
}

.goals-stat--wide {
    grid-column: 1 / -1;
}

@media (min-width: 640px) {
    .goals-stat--wide {
        grid-column: auto;
    }
}

.goals-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
}

.goals-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-0);
}

.goals-summary-bar {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: var(--bg-2);
    overflow: hidden;
}

.goals-summary-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.35s ease;
}

.goals-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--stack-sm);
}

.goals-count {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
}

.goals-compose-toggle {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--accent-border);
    background: var(--accent-dim);
    color: var(--accent);
    cursor: pointer;
}

.goals-compose-toggle.is-open {
    background: var(--bg-3);
    color: var(--text-2);
    border-color: var(--border-subtle);
}

.goals-compose {
    border-color: var(--border);
    background: var(--bg-3);
}

.goals-compose-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.goals-compose-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    position: relative;
}

.goals-compose-icon::after {
    content: "";
    position: absolute;
    inset: 11px 10px 10px 11px;
    border: 2px solid var(--accent);
    border-radius: 4px 4px 8px 8px;
    opacity: 0.85;
}

.goals-compose-title {
    margin-bottom: 4px !important;
}

.goals-compose-hint {
    margin: 0;
}

.goals-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    margin-bottom: 12px;
}

@media (min-width: 560px) {
    .goals-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.goals-form-grid > .ed-input-group {
    min-width: 0;
    margin-bottom: 0;
}

.goals-form-grid .ui-money,
.goals-form-grid .ui-date {
    width: 100%;
    max-width: 100%;
}

.goals-form-grid .goals-input,
.goals-form-grid .ed-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.goals-compose {
    overflow: hidden;
}

.goals-form-money .ui-range__ticks {
    font-size: 10px;
}

.goals-form-span-all {
    grid-column: 1 / -1;
}

.goals-private-toggle {
    margin-top: 4px;
}

.goals-private-hint {
    margin: 6px 0 14px;
}

.goals-create-btn {
    width: 100%;
}

@media (min-width: 480px) {
    .goals-create-btn {
        width: auto;
        min-width: 200px;
    }
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
}

.goal-card {
    padding: 20px;
    transition: border-color 0.2s ease;
}

.goal-card--private {
    border-color: rgba(167, 139, 250, 0.35);
    background: linear-gradient(165deg, rgba(167, 139, 250, 0.06) 0%, var(--bg-3) 40%);
}

.goal-card-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.goal-ring {
    --goal-pct: 0;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent) calc(var(--goal-pct) * 1%),
        var(--bg-2) 0
    );
    display: grid;
    place-items: center;
}

.goal-card--done .goal-ring {
    background: conic-gradient(
        #22c55e calc(var(--goal-pct) * 1%),
        var(--bg-2) 0
    );
}

.goal-card--mid .goal-ring {
    background: conic-gradient(
        var(--amber) calc(var(--goal-pct) * 1%),
        var(--bg-2) 0
    );
}

.goal-ring-inner {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
    display: grid;
    place-items: center;
}

.goal-ring-pct {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-0);
}

.goal-card-main {
    flex: 1;
    min-width: 0;
}

.goal-card-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.goal-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1.3;
}

.goal-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.goal-pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-2);
    color: var(--text-2);
}

.goal-pill--private {
    border-color: rgba(167, 139, 250, 0.4);
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}

.goal-pill--done {
    border-color: rgba(34, 197, 94, 0.35);
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.goal-pill--ok {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-dim);
}

.goal-pill--overdue,
.goal-pill--start {
    border-color: rgba(251, 191, 36, 0.35);
    color: var(--amber);
    background: rgba(251, 191, 36, 0.08);
}

.goal-amounts {
    margin: 0 0 6px;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.goal-amounts-saved {
    font-weight: 700;
    color: var(--accent);
}

.goal-amounts-sep {
    margin: 0 4px;
    color: var(--text-3);
}

.goal-amounts-target {
    color: var(--text-2);
}

.goal-meta {
    margin: 0;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.5;
}

.goal-meta--accent {
    color: var(--accent);
    font-weight: 500;
}

.goal-progress-track {
    margin: 16px 0 0;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-2);
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.4s ease;
}

.goal-progress-fill--done { background: #22c55e; }
.goal-progress-fill--mid { background: var(--amber); }
.goal-progress-fill--start { background: var(--text-3); }

.goal-ai-panel {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--accent-border);
    background: var(--accent-dim);
}

.goal-ai-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.goal-ai-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--accent);
    opacity: 0.25;
    position: relative;
}

.goal-ai-icon::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 2px solid var(--accent);
    border-radius: 2px;
}

.goal-ai-panel-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
}

.goal-ai-summary {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-1);
}

.goal-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* Birikim ekleme bloğu — tek, kendini anlatan birim */
.goal-contrib {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.goal-contrib-caption {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
}

.goal-contrib-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

@media (max-width: 420px) {
    .goal-contrib-row {
        flex-direction: column;
    }

    .goal-contrib-add {
        width: 100%;
    }
}

.goals-contrib-input,
.goal-contrib-money {
    flex: 1;
    min-width: 0;
}

.goal-contrib-add {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
}

.goal-contrib-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-3);
}

.goal-actions-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.goal-action-btn--ai {
    flex: 1;
    min-width: 120px;
}

.goal-steps {
    margin: 10px 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
}

.goals-empty {
    text-align: center;
    padding: 36px 24px;
}

.goals-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 2px dashed var(--accent-border);
    background: var(--accent-dim);
    position: relative;
}

.goals-empty-icon::before,
.goals-empty-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: var(--accent);
    opacity: 0.5;
}

.goals-empty-icon::before {
    width: 28px;
    height: 4px;
    top: 22px;
}

.goals-empty-icon::after {
    width: 18px;
    height: 4px;
    top: 30px;
}

.goals-empty-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-0);
}

.goals-empty-desc {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.55;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.goals-footer-nav {
    margin-top: var(--stack-md);
}

.goals-footer-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    background: none;
    border: none;
    padding: 8px 0;
    cursor: pointer;
}

.goals-footer-link:hover {
    color: var(--accent);
}

/* ═══ ERISILEBILIRLIK — hareket azaltma ═══ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    /* Jiggle / scale / kayma efektlerini tamamen kapat */
    .nav-item--jiggle,
    .home-launcher-tile--jiggle,
    .bottom-nav--edit .nav-item--jiggle.nav-item--add {
        animation: none !important;
    }

    .nav-item.peek,
    .nav-item--add:hover,
    .ed-page-add-btn:hover,
    .obl-progress__bar {
        transform: none !important;
    }
}
