/* =====================================================
   SPENDLOOM — DIGITAL FINANCE EXPERIENCE
   Midnight glass • Neon mint • AI-inspired animations
   ===================================================== */

:root {
    color-scheme: dark;

    --bg: #080b12;
    --bg-2: #0d1220;
    --panel: #101725;
    --panel-raised: #151e2e;

    --text: #f2f7ff;
    --muted: #8998b0;
    --soft: #b9c6d9;

    --mint: #76ffca;
    --mint-2: #33e8a7;
    --cyan: #56dcff;
    --purple: #b19aff;
    --orange: #ffbd79;
    --pink: #ff8cc4;

    --line: rgba(176, 197, 230, 0.12);
    --line-hover: rgba(176, 197, 230, 0.24);

    --radius: 22px;
    --radius-sm: 14px;

    --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

/* RESET */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 25px;
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 0 0 40px;
    overflow-x: hidden;

    color: var(--text);
    font-family: "DM Sans", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.65;

    background:
        radial-gradient(
            ellipse at 6% 0%,
            rgba(30, 139, 111, 0.13),
            transparent 33%
        ),
        radial-gradient(
            ellipse at 100% 23%,
            rgba(94, 82, 190, 0.10),
            transparent 34%
        ),
        var(--bg);

    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 4px;
}

::selection {
    color: #07120e;
    background: var(--mint);
}

/* BACKGROUND AMBIENCE */

.ambient {
    position: fixed;
    z-index: -2;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.16;
    animation: ambientDrift 18s ease-in-out infinite alternate;
}

.ambient-one {
    top: 15%;
    left: -180px;
    width: 340px;
    height: 340px;
    background: #12e6a0;
}

.ambient-two {
    top: 40%;
    right: -200px;
    width: 380px;
    height: 380px;
    background: #574ce0;
    animation-delay: -6s;
}

.ambient-three {
    top: 78%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: #087a8f;
    animation-delay: -10s;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(151, 177, 215, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(151, 177, 215, 0.025) 1px,
            transparent 1px
        );

    background-size: 46px 46px;

    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        rgba(0, 0, 0, 0.55) 52%,
        transparent 100%
    );
}

/* HEADER / NAVIGATION */

.topbar {
    position: relative;
    z-index: 10;

    width: min(1380px, calc(100% - 64px));
    min-height: 86px;
    margin: 0 auto;
    padding: 18px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    border-bottom: 1px solid var(--line);

    animation: fadeDown 0.7s var(--ease) both;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
}

.brand-symbol {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    color: var(--mint);
    border: 1px solid rgba(118, 255, 202, 0.3);
    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            rgba(118, 255, 202, 0.14),
            rgba(86, 220, 255, 0.04)
        );

    box-shadow:
        0 0 25px rgba(118, 255, 202, 0.07),
        inset 0 0 15px rgba(118, 255, 202, 0.04);

    transition:
        transform 0.3s var(--ease),
        box-shadow 0.3s ease;
}

.brand:hover .brand-symbol {
    transform: rotate(-8deg) scale(1.06);
    box-shadow: 0 0 26px rgba(118, 255, 202, 0.18);
}

.brand-symbol svg {
    width: 28px;
    height: 28px;
}

.brand-name,
.footer-brand {
    color: #f4f8ff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -1.2px;
}

.brand-name span,
.footer-brand span {
    color: var(--mint);
}

.brand-beta {
    align-self: flex-start;
    margin-top: 2px;
    padding: 2px 5px;

    color: var(--mint);
    font-family: "Space Grotesk", sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;

    border: 1px solid rgba(118, 255, 202, 0.2);
    border-radius: 5px;
    background: rgba(118, 255, 202, 0.055);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.nav-link {
    position: relative;

    padding: 9px 15px;

    color: var(--muted);
    font-size: 12px;
    font-weight: 600;

    border: 1px solid transparent;
    border-radius: 10px;

    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -19px;
    left: 50%;

    width: 22px;
    height: 2px;

    border-radius: 4px;
    background: var(--mint);
    box-shadow: 0 0 12px rgba(118, 255, 202, 0.55);

    transform: translateX(-50%);
}

.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 13px;
}

.edition-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 7px 10px;

    color: #b6c5d8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;

    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
}

.status-dot,
.metric-indicator {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 9px rgba(118, 255, 202, 0.48);
}

.status-dot {
    animation: dotPulse 2.2s ease-in-out infinite;
}

.avatar {
    width: 37px;
    height: 37px;

    display: grid;
    place-items: center;

    color: var(--mint);
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 700;

    border: 1px solid rgba(118, 255, 202, 0.2);
    border-radius: 12px;

    background: linear-gradient(
        145deg,
        rgba(118, 255, 202, 0.13),
        rgba(86, 220, 255, 0.06)
    );
}

/* MAIN WIDTH */

main {
    width: min(1380px, calc(100% - 64px));
    margin: 0 auto;
}

section {
    scroll-margin-top: 24px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2 {
    font-family: "Space Grotesk", sans-serif;
}

h2 {
    margin-bottom: 7px;

    font-size: clamp(21px, 2.2vw, 27px);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.9px;
}

.heading-period {
    color: var(--mint);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #8495ad;
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    line-height: 1.5;
}

.eyebrow-line {
    width: 19px;
    height: 1px;
    background: var(--mint);
    box-shadow: 0 0 8px rgba(118, 255, 202, 0.55);
}

.section-description {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

/* HERO */

.hero {
    min-height: 400px;
    padding: 54px 42px 45px;

    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 25px;

    border-bottom: 1px solid var(--line);
}

.hero-copy {
    position: relative;
    z-index: 2;
    animation: fadeUp 0.8s var(--ease) both;
}

.hero-copy > .eyebrow {
    margin-bottom: 22px;
}

.hero h1 {
    margin: 0;

    font-size: clamp(46px, 5.4vw, 76px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -4px;
}

.gradient-text {
    color: var(--mint);
    background: linear-gradient(
        100deg,
        #a3ffdb 0%,
        var(--mint) 38%,
        var(--cyan) 100%
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    max-width: 435px;
    margin: 23px 0 24px;

    color: #9baac0;
    font-size: 14px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-link,
.secondary-link {
    min-height: 45px;
    padding: 0 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border-radius: 11px;

    font-size: 12px;
    font-weight: 700;

    transition:
        transform 0.25s var(--ease),
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.primary-link {
    color: #07120e;
    background: linear-gradient(115deg, var(--mint), #a0ffdd);
    box-shadow: 0 5px 22px rgba(118, 255, 202, 0.09);
}

.primary-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 29px rgba(118, 255, 202, 0.19);
}

.primary-link span,
.secondary-link span,
.text-link span {
    font-size: 16px;
    transition: transform 0.25s ease;
}

.primary-link:hover span,
.secondary-link:hover span,
.text-link:hover span {
    transform: translate(2px, -2px);
}

.secondary-link {
    color: #c3cede;
    border: 1px solid var(--line-hover);
    background: rgba(255, 255, 255, 0.025);
}

.secondary-link:hover {
    color: var(--mint);
    border-color: rgba(118, 255, 202, 0.32);
    background: rgba(118, 255, 202, 0.045);
    transform: translateY(-2px);
}

.hero-footnote {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 23px;

    color: #71829a;
    font-size: 11px;
}

.tiny-check {
    color: var(--mint);
}

/* HERO DIGITAL ORBIT */

.hero-art {
    position: relative;
    isolation: isolate;

    min-width: 0;
    min-height: 310px;

    display: grid;
    place-items: center;

    overflow: hidden;
    animation: fadeIn 1.1s ease both;
}

.hero-art::before {
    content: "";
    position: absolute;
    z-index: -2;

    width: 270px;
    height: 270px;
    border-radius: 50%;

    background: rgba(35, 228, 168, 0.075);
    filter: blur(55px);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 10% 0;

    background-image: radial-gradient(
        rgba(142, 172, 214, 0.25) 0.7px,
        transparent 0.7px
    );
    background-size: 15px 15px;
    opacity: 0.25;

    mask-image: radial-gradient(
        ellipse at center,
        black 0%,
        transparent 70%
    );
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;

    border: 1px solid rgba(118, 255, 202, 0.13);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-outer {
    width: 300px;
    height: 300px;
    border-style: dashed;
    animation: rotateOrbit 45s linear infinite;
}

.orbit-middle {
    width: 235px;
    height: 235px;
    border-color: rgba(86, 220, 255, 0.21);
    animation: rotateOrbit 28s linear infinite reverse;
}

.orbit-inner {
    width: 167px;
    height: 167px;
    border-color: rgba(118, 255, 202, 0.28);
}

.orbit-node {
    position: absolute;
    z-index: 2;

    width: 9px;
    height: 9px;

    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--mint);

    box-shadow: 0 0 14px rgba(118, 255, 202, 0.8);
}

.node-one {
    top: calc(50% - 154px);
    left: calc(50% + 30px);
}

.node-two {
    right: calc(50% - 123px);
    bottom: calc(50% - 73px);

    background: var(--cyan);
    box-shadow: 0 0 14px rgba(86, 220, 255, 0.8);
}

.node-three {
    bottom: calc(50% - 136px);
    left: calc(50% - 94px);

    width: 6px;
    height: 6px;
}

.hero-core {
    position: relative;
    z-index: 3;

    width: 190px;
    min-height: 185px;
    padding: 23px 15px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    border: 1px solid rgba(118, 255, 202, 0.22);
    border-radius: 28px;

    background:
        linear-gradient(
            150deg,
            rgba(24, 40, 51, 0.96),
            rgba(9, 18, 28, 0.96)
        );

    box-shadow:
        0 20px 65px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 35px rgba(118, 255, 202, 0.055);

    animation: coreFloat 5s ease-in-out infinite;
}

.core-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;

    display: grid;
    place-items: center;

    color: var(--mint);
    border: 1px solid rgba(118, 255, 202, 0.22);
    border-radius: 15px;
    background: rgba(118, 255, 202, 0.07);
}

.core-icon svg {
    width: 28px;
    height: 28px;
}

.core-label {
    margin-bottom: 5px;
    color: #92a5ba;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.35px;
}

.hero-core strong {
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.core-subtitle {
    color: #8295ac;
    font-size: 10px;
}

.floating-chip {
    position: absolute;
    z-index: 4;

    min-width: 145px;
    padding: 10px 12px;

    display: flex;
    align-items: center;
    gap: 10px;

    border: 1px solid rgba(170, 196, 226, 0.17);
    border-radius: 13px;
    background: rgba(14, 22, 34, 0.94);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    animation: chipFloat 5s ease-in-out infinite;
}

.chip-top {
    top: 35px;
    right: 0;
}

.chip-bottom {
    bottom: 35px;
    left: 0;
    animation-delay: -2.5s;
}

.chip-icon {
    width: 33px;
    height: 33px;

    display: grid;
    place-items: center;
    flex-shrink: 0;

    font-size: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.chip-icon.cyan {
    color: var(--cyan);
}

.chip-icon.green {
    color: var(--mint);
}

.floating-chip small,
.floating-chip strong {
    display: block;
}

.floating-chip small {
    color: #788aa3;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.floating-chip strong {
    margin-top: 2px;
    color: #e9f2ff;
    font-size: 11px;
    font-weight: 600;
}

/* SECTION HEADINGS */

.section-heading {
    margin: 37px 0 20px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading .eyebrow {
    margin-bottom: 10px;
}

.section-heading h2 {
    margin-bottom: 5px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 8px 11px;
    flex-shrink: 0;

    color: #a2b3c8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;

    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
}

.badge-star {
    color: var(--mint);
    font-size: 14px;
}

/* SUMMARY METRIC CARDS */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card {
    --accent: var(--mint);
    --accent-rgb: 118, 255, 202;

    position: relative;
    isolation: isolate;
    overflow: hidden;

    min-width: 0;
    min-height: 198px;
    padding: 21px;

    border: 1px solid var(--line);
    border-radius: 19px;

    background:
        linear-gradient(
            145deg,
            rgba(20, 30, 46, 0.98),
            rgba(12, 18, 29, 0.97)
        );

    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    transition:
        transform 0.3s var(--ease),
        border-color 0.3s ease,
        box-shadow 0.3s ease;

    animation: fadeUp 0.6s var(--ease) both;
}

.metric-card:nth-child(2) {
    animation-delay: 0.07s;
}

.metric-card:nth-child(3) {
    animation-delay: 0.14s;
}

.metric-card:nth-child(4) {
    animation-delay: 0.21s;
}

.metric-card.tone-green {
    --accent: var(--mint);
    --accent-rgb: 118, 255, 202;
}

.metric-card.tone-cyan {
    --accent: var(--cyan);
    --accent-rgb: 86, 220, 255;
}

.metric-card.tone-purple {
    --accent: var(--purple);
    --accent-rgb: 177, 154, 255;
}

.metric-card.tone-orange {
    --accent: var(--orange);
    --accent-rgb: 255, 189, 121;
}

.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    z-index: -1;

    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        transparent
    );

    opacity: 0.65;
}

.metric-decoration {
    position: absolute;
    top: -70px;
    right: -70px;
    z-index: -1;

    width: 170px;
    height: 170px;
    border-radius: 50%;

    background: rgba(var(--accent-rgb), 0.08);
    filter: blur(36px);

    transition:
        transform 0.5s var(--ease),
        opacity 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent-rgb), 0.31);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.23),
        0 0 23px rgba(var(--accent-rgb), 0.045);
}

.metric-card:hover .metric-decoration {
    transform: scale(1.5);
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.metric-label {
    color: #8798ae;
    font-family: "Space Grotesk", sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.1px;
    line-height: 1.5;
}

.metric-icon {
    width: 39px;
    height: 39px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.20);
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.07);

    transition:
        transform 0.3s var(--ease),
        background 0.3s ease;
}

.metric-card:hover .metric-icon {
    transform: translateY(-2px) rotate(-5deg);
    background: rgba(var(--accent-rgb), 0.13);
}

.metric-icon svg {
    width: 21px;
    height: 21px;
}

.metric-value {
    margin: 18px 0 3px;

    color: var(--accent);
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(25px, 2.55vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -1.5px;
    font-variant-numeric: tabular-nums;

    overflow-wrap: anywhere;
    text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.08);

    transition: text-shadow 0.3s ease;
}

.metric-card:hover .metric-value {
    text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.20);
}

.metric-caption {
    margin: 0;

    color: #8494aa;
    font-size: 11px;
}

.metric-bottom {
    margin-top: 18px;
    padding-top: 13px;

    display: flex;
    align-items: center;
    gap: 8px;

    color: #8495a9;
    font-size: 10px;

    border-top: 1px solid var(--line);
}

.metric-indicator {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.55);
}

/* PANELS */

.panel {
    position: relative;
    min-width: 0;

    padding: 26px;

    border: 1px solid var(--line);
    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(17, 25, 39, 0.96),
            rgba(12, 18, 29, 0.96)
        );

    box-shadow:
        0 15px 42px rgba(0, 0, 0, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);

    transition: border-color 0.3s ease;
}

.panel:hover {
    border-color: var(--line-hover);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.panel-heading .eyebrow {
    margin-bottom: 10px;
}

.panel-number {
    color: rgba(118, 255, 202, 0.6);
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
}

/* FINANCE SETUP */

.finance-panel {
    margin-top: 23px;
    overflow: hidden;

    background:
        radial-gradient(
            ellipse at 100% 0%,
            rgba(86, 220, 255, 0.055),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            rgba(17, 25, 39, 0.96),
            rgba(12, 18, 29, 0.96)
        );
}

.finance-panel::after {
    content: "";
    position: absolute;
    top: -100px;
    right: 100px;
    z-index: 0;

    width: 180px;
    height: 180px;
    border-radius: 50%;

    background: rgba(118, 255, 202, 0.035);
    filter: blur(50px);
    pointer-events: none;
}

.finance-panel > * {
    position: relative;
    z-index: 1;
}

.finance-form {
    margin-top: 25px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(190px, 0.8fr);
    align-items: start;
    gap: 18px;
}

.field-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-group label {
    color: #c4d0e0;
    font-size: 12px;
    font-weight: 600;
}

.field-hint {
    color: #77889e;
    font-size: 10px;
    line-height: 1.6;
}

.finance-submit {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.finance-submit .primary-button {
    margin-top: 27px;
}

.form-message {
    margin: 7px 0 0;
    color: var(--mint);
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* FORM CONTROLS */

input,
select {
    width: 100%;
    min-width: 0;
    min-height: 47px;
    padding: 12px 14px;

    color: var(--text);
    font-family: "DM Sans", sans-serif;
    font-size: 13px;

    border: 1px solid rgba(163, 186, 217, 0.16);
    border-radius: 11px;
    outline: none;

    background: rgba(5, 10, 18, 0.57);

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

input::placeholder {
    color: #5f7086;
}

input:hover,
select:hover {
    border-color: rgba(163, 186, 217, 0.32);
}

input:focus,
select:focus {
    border-color: rgba(118, 255, 202, 0.68);
    background: rgba(7, 17, 24, 0.9);

    box-shadow: 0 0 0 3px rgba(118, 255, 202, 0.075);
}

select {
    cursor: pointer;
}

select option {
    color: var(--text);
    background: var(--bg-2);
}

/* BUTTONS */

.primary-button,
.ai-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    min-height: 46px;
    padding: 12px 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    color: #07140f;
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 700;

    border: 1px solid rgba(118, 255, 202, 0.65);
    border-radius: 11px;

    background: linear-gradient(
        110deg,
        #76ffca,
        #a3ffdc
    );

    box-shadow: 0 5px 20px rgba(118, 255, 202, 0.075);

    transition:
        transform 0.25s var(--ease),
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.primary-button::before,
.ai-button::before {
    content: "";
    position: absolute;
    top: -80%;
    left: -65%;
    z-index: -1;

    width: 40%;
    height: 260%;

    background: rgba(255, 255, 255, 0.4);
    transform: rotate(25deg);

    transition: left 0.55s var(--ease);
}

.primary-button:hover::before,
.ai-button:hover::before {
    left: 135%;
}

.primary-button:hover,
.ai-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);

    box-shadow: 0 9px 27px rgba(118, 255, 202, 0.15);
}

.primary-button:active,
.ai-button:active {
    transform: translateY(0) scale(0.99);
}

.primary-button span,
.ai-button span {
    font-size: 16px;
}

button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

/* SPENDING AND AI GRID */

.content-grid {
    margin-top: 23px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    align-items: stretch;
    gap: 20px;
}

.content-grid > .panel {
    min-height: 445px;
}

.heading-icon,
.activity-icon {
    width: 39px;
    height: 39px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    color: var(--mint);
    font-size: 18px;

    border: 1px solid rgba(118, 255, 202, 0.17);
    border-radius: 12px;
    background: rgba(118, 255, 202, 0.055);
}

.heading-icon svg {
    width: 22px;
    height: 22px;
}

/* CATEGORY LIST */

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 23px;
}

.category-row {
    min-width: 0;
    min-height: 52px;
    padding: 8px 11px;

    display: flex;
    align-items: center;
    gap: 11px;

    border: 1px solid transparent;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.022);

    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s var(--ease);
}

.category-row:hover {
    transform: translateX(3px);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.category-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    font-size: 17px;
    border-radius: 10px;
}

.category-food {
    color: var(--mint);
    background: rgba(118, 255, 202, 0.085);
}

.category-transport {
    color: var(--cyan);
    background: rgba(86, 220, 255, 0.085);
}

.category-shopping {
    color: var(--purple);
    background: rgba(177, 154, 255, 0.085);
}

.category-entertainment {
    color: var(--pink);
    background: rgba(255, 140, 196, 0.085);
}

.category-bills {
    color: var(--orange);
    background: rgba(255, 189, 121, 0.085);
}

.category-other {
    color: #a8bbd2;
    background: rgba(168, 187, 210, 0.085);
}

.category-name {
    min-width: 0;
    flex: 1;

    color: #bfcbdd;
    font-size: 12px;

    overflow-wrap: anywhere;
}

.category-amount {
    flex-shrink: 0;

    color: #e9f2ff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.panel-footnote {
    margin-top: 18px;
    padding-top: 14px;

    display: flex;
    align-items: flex-start;
    gap: 9px;

    color: #71849a;
    font-size: 10px;
    line-height: 1.7;

    border-top: 1px solid var(--line);
}

.footnote-mark {
    color: var(--mint);
}

/* AI MONEY COACH */

.ai-panel {
    overflow: hidden;

    background:
        radial-gradient(
            ellipse at 100% 0%,
            rgba(118, 255, 202, 0.085),
            transparent 42%
        ),
        radial-gradient(
            ellipse at 0% 100%,
            rgba(86, 220, 255, 0.04),
            transparent 47%
        ),
        linear-gradient(
            150deg,
            rgba(17, 31, 39, 0.98),
            rgba(12, 18, 29, 0.98)
        );

    border-color: rgba(118, 255, 202, 0.16);
}

.ai-panel::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -90px;

    width: 230px;
    height: 230px;
    border-radius: 50%;

    background: rgba(118, 255, 202, 0.055);
    filter: blur(70px);
    pointer-events: none;
}

.ai-panel > * {
    position: relative;
    z-index: 1;
}

.ai-panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ai-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-brand h2 {
    margin-bottom: 0;
    font-size: clamp(19px, 2vw, 24px);
}

.ai-logo {
    width: 43px;
    height: 43px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    color: var(--mint);
    border: 1px solid rgba(118, 255, 202, 0.28);
    border-radius: 14px;

    background: rgba(118, 255, 202, 0.08);
    box-shadow: 0 0 25px rgba(118, 255, 202, 0.055);
}

.ai-logo svg {
    width: 27px;
    height: 27px;
    animation: logoSpin 28s linear infinite;
}

.ai-tag {
    flex-shrink: 0;

    padding: 6px 8px;

    color: var(--mint);
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.7px;

    border: 1px solid rgba(118, 255, 202, 0.19);
    border-radius: 7px;
    background: rgba(118, 255, 202, 0.045);
}

.ai-intro {
    margin: 14px 0 0;

    color: #93a7ba;
    font-size: 11px;
    line-height: 1.7;
}

/* DECORATIVE AI ORB */

.ai-orb-wrap {
    height: 117px;

    display: grid;
    place-items: center;

    overflow: hidden;
}

.ai-orb {
    position: relative;

    width: 90px;
    height: 90px;

    display: grid;
    place-items: center;
}

.ai-orb::before,
.ai-orb::after {
    content: "";
    position: absolute;
    inset: 12px;

    border: 1px solid rgba(118, 255, 202, 0.25);
    border-radius: 50%;
}

.ai-orb::after {
    inset: 23px;
    border-color: rgba(86, 220, 255, 0.32);
    background: radial-gradient(
        circle at 35% 25%,
        rgba(118, 255, 202, 0.20),
        rgba(86, 220, 255, 0.06) 65%,
        transparent
    );
}

.ai-orb-ring {
    position: absolute;
    inset: 1px;

    border: 1px dashed rgba(118, 255, 202, 0.27);
    border-radius: 50%;
}

.ring-one {
    animation: rotateOrbit 16s linear infinite;
}

.ring-two {
    inset: 7px;
    border-color: rgba(86, 220, 255, 0.28);
    transform: rotateX(65deg);
    animation: rotateOrbit 12s linear infinite reverse;
}

.ring-three {
    inset: -5px;
    border-color: rgba(177, 154, 255, 0.17);
    transform: rotateY(65deg);
    animation: rotateOrbit 20s linear infinite;
}

.ai-orb-core {
    position: relative;
    z-index: 2;

    color: var(--mint);
    font-size: 28px;
    text-shadow: 0 0 22px rgba(118, 255, 202, 0.85);

    animation: corePulse 3s ease-in-out infinite;
}

/* AI TIP BOX */

.ai-tip {
    padding: 16px 17px;

    border: 1px solid rgba(118, 255, 202, 0.15);
    border-left: 2px solid var(--mint);
    border-radius: 0 12px 12px 0;

    background:
        linear-gradient(
            105deg,
            rgba(118, 255, 202, 0.065),
            rgba(118, 255, 202, 0.018)
        );
}

.tip-label {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 8px;

    color: #a4b6c9;
    font-family: "Space Grotesk", sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.tip-sparkle {
    color: var(--mint);
    font-size: 14px;
}

.ai-tip p {
    margin: 0;

    color: #c1d1d8;
    font-size: 11px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.ai-button {
    width: 100%;
    margin-top: 14px;
}

.ai-button span {
    transition: transform 0.25s ease;
}

.ai-button:hover span {
    transform: translate(2px, -2px);
}


/* TRANSACTIONS HEADING */

.transactions-title {
    margin-top: 46px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;

    color: var(--mint);
    font-size: 11px;
    font-weight: 700;

    transition: color 0.2s ease;
}

.text-link:hover {
    color: #b1ffe0;
}

/* TRANSACTIONS LAYOUT */

.transactions-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
    align-items: start;
    gap: 20px;
}

.transactions-panel,
.expense-panel {
    min-width: 0;
}

.transactions-panel .panel-heading,
.expense-panel .panel-heading {
    margin-bottom: 22px;
}

.transactions-panel .panel-heading h2,
.expense-panel .panel-heading h2 {
    font-size: 21px;
}

.activity-icon {
    color: var(--cyan);
    border-color: rgba(86, 220, 255, 0.18);
    background: rgba(86, 220, 255, 0.055);
}

.expense-plus {
    width: 41px;
    height: 41px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    color: var(--mint);
    font-size: 23px;

    border: 1px solid rgba(118, 255, 202, 0.2);
    border-radius: 13px;
    background: rgba(118, 255, 202, 0.06);

    transition: transform 0.25s var(--ease);
}

.expense-panel:hover .expense-plus {
    transform: rotate(90deg);
}

/* TRANSACTION ITEMS GENERATED BY SCRIPT.JS */

#transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction {
    min-width: 0;
    padding: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    border: 1px solid var(--line);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.023);

    animation: transactionIn 0.35s var(--ease) both;

    transition:
        transform 0.22s var(--ease),
        background 0.22s ease,
        border-color 0.22s ease;
}

.transaction:hover {
    transform: translateX(3px);
    border-color: rgba(118, 255, 202, 0.18);
    background: rgba(118, 255, 202, 0.035);
}

.transaction > div {
    min-width: 0;
}

.transaction-name {
    margin: 0 0 4px;

    color: #e8f1ff;
    font-size: 12px;
    font-weight: 600;

    overflow-wrap: anywhere;
}

.transaction-details {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.transaction-amount {
    flex-shrink: 0;

    color: #ff9eae;
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* INITIAL EMPTY STATE */

.empty-state {
    min-height: 210px;
    padding: 25px 15px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    border: 1px dashed rgba(153, 179, 213, 0.15);
    border-radius: 14px;

    background:
        radial-gradient(
            ellipse at center,
            rgba(118, 255, 202, 0.035),
            transparent 70%
        );
}

.empty-icon {
    width: 43px;
    height: 43px;
    margin-bottom: 12px;

    display: grid;
    place-items: center;

    color: var(--mint);
    font-size: 23px;

    border: 1px solid rgba(118, 255, 202, 0.2);
    border-radius: 14px;
    background: rgba(118, 255, 202, 0.06);
}

.empty-state p {
    margin: 0 0 4px;
    color: #c8d5e7;
    font-size: 12px;
    font-weight: 600;
}

.empty-state > span {
    color: #7e8fa6;
    font-size: 10px;
    line-height: 1.7;
}

/* EXPENSE FORM */

.expense-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.amount-input-wrap {
    position: relative;
}

.amount-input-wrap > span {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;

    color: var(--mint);
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;

    transform: translateY(-50%);
}

.amount-input-wrap input {
    padding-left: 31px;
}

.add-expense-button {
    width: 100%;
    margin-top: 3px;
}

.button-plus {
    font-size: 19px !important;
    line-height: 1;
}

.button-arrow {
    margin-left: auto;
}

.secure-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;

    color: #74869d;
    font-size: 10px;
    line-height: 1.7;
}

.secure-note span {
    flex-shrink: 0;
    color: var(--mint);
    font-size: 14px;
}

/* FOOTER */

.footer {
    margin-top: 43px;
    padding: 22px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;

    border-top: 1px solid var(--line);
}

.footer-brand {
    font-size: 19px;
}

.footer p {
    margin: 0;
    color: #7889a0;
    font-size: 10px;
}

.back-to-top {
    color: #8597ad;
    font-family: "Space Grotesk", sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;

    transition: color 0.2s ease;
}

.back-to-top:hover {
    color: var(--mint);
}

/* ANIMATION KEYFRAMES */

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(17px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes ambientDrift {
    from {
        transform: translate3d(-10px, -10px, 0) scale(0.95);
    }

    to {
        transform: translate3d(35px, 25px, 0) scale(1.08);
    }
}

@keyframes rotateOrbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes coreFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes chipFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes dotPulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 9px rgba(118, 255, 202, 0.48);
    }

    50% {
        opacity: 0.55;
        box-shadow: 0 0 3px rgba(118, 255, 202, 0.2);
    }
}

@keyframes logoSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes corePulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.85;
    }

    50% {
        transform: scale(1.13);
        opacity: 1;
    }
}

@keyframes transactionIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

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

/* RESPONSIVE — LAPTOPS */

@media (max-width: 1100px) {
    .topbar,
    main {
        width: calc(100% - 42px);
    }

    .hero {
        padding-right: 20px;
        padding-left: 20px;
    }

    .hero h1 {
        font-size: clamp(44px, 5vw, 61px);
    }

    .metric-card {
        padding: 17px;
    }

    .metric-value {
        font-size: clamp(24px, 2.7vw, 31px);
    }

    .finance-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .finance-submit {
        grid-column: 1 / -1;
    }

    .finance-submit .primary-button {
        margin-top: 0;
    }
}

/* RESPONSIVE — TABLETS */

@media (max-width: 850px) {
    .topbar {
        gap: 15px;
    }

    .main-nav {
        gap: 0;
    }

    .nav-link {
        padding: 8px 9px;
        font-size: 11px;
    }

    .edition-tag {
        font-size: 8px;
        letter-spacing: 0.5px;
    }

    .brand-name {
        font-size: 21px;
    }

    .hero {
        min-height: 350px;
        grid-template-columns: 1fr 0.85fr;
        gap: 8px;
    }

    .hero h1 {
        font-size: clamp(40px, 5.6vw, 53px);
        letter-spacing: -2.5px;
    }

    .hero-art {
        transform: scale(0.9);
    }

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

    .metric-card {
        min-height: 185px;
    }

    .metric-value {
        font-size: 31px;
    }

    .content-grid,
    .transactions-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .content-grid > .panel {
        min-height: auto;
    }

    .ai-orb-wrap {
        height: 105px;
    }
}

/* RESPONSIVE — PHONES */

@media (max-width: 600px) {
    body {
        padding-bottom: 22px;
        background-attachment: scroll;
    }

    .topbar,
    main {
        width: calc(100% - 30px);
    }

    .topbar {
        min-height: auto;
        padding: 17px 0 14px;

        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
    }

    .brand-symbol {
        width: 35px;
        height: 35px;
        border-radius: 10px;
    }

    .brand-symbol svg {
        width: 25px;
        height: 25px;
    }

    .brand-name {
        font-size: 22px;
    }

    .brand-beta {
        font-size: 8px;
    }

    .header-right {
        gap: 8px;
    }

    .edition-tag {
        padding: 6px 7px;
        font-size: 7px;
        letter-spacing: 0.35px;
    }

    .avatar {
        width: 33px;
        height: 33px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 7px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 11px;
    }

    .nav-link.active::after {
        bottom: -15px;
    }

    .hero {
        padding: 34px 0 22px;

        grid-template-columns: 1fr;
        gap: 0;

        border-bottom: 1px solid var(--line);
    }

    .hero-copy > .eyebrow {
        margin-bottom: 17px;
    }

    .eyebrow {
        font-size: 9px;
        letter-spacing: 1.2px;
    }

    .hero h1 {
        font-size: clamp(43px, 12vw, 63px);
        letter-spacing: -2.8px;
    }

    .hero-description {
        max-width: 430px;
        margin: 17px 0 21px;
        font-size: 12px;
    }

    .hero-actions {
        gap: 8px;
    }

    .primary-link,
    .secondary-link {
        min-height: 42px;
        padding: 0 12px;
        font-size: 11px;
    }

    .hero-footnote {
        margin-top: 16px;
    }

    .hero-art {
        min-height: 270px;
        margin-top: 7px;
        transform: none;
    }

    .orbit-outer {
        width: 255px;
        height: 255px;
    }

    .orbit-middle {
        width: 203px;
        height: 203px;
    }

    .orbit-inner {
        width: 151px;
        height: 151px;
    }

    .hero-core {
        width: 170px;
        min-height: 166px;
    }

    .chip-top {
        top: 22px;
        right: 0;
    }

    .chip-bottom {
        bottom: 22px;
        left: 0;
    }

    .floating-chip {
        min-width: 129px;
        padding: 8px;
        gap: 8px;
    }

    .chip-icon {
        width: 29px;
        height: 29px;
    }

    .floating-chip small {
        font-size: 7px;
    }

    .floating-chip strong {
        font-size: 10px;
    }

    .section-heading {
        margin: 30px 0 16px;
        align-items: flex-start;
        gap: 12px;
    }

    .section-heading h2 {
        font-size: 22px;
    }

    .section-badge {
        padding: 7px;
        font-size: 7px;
    }

    .summary-grid {
        gap: 10px;
    }

    .metric-card {
        min-height: 169px;
        padding: 15px 13px;
        border-radius: 16px;
    }

    .metric-label {
        font-size: 8px;
        letter-spacing: 0.65px;
    }

    .metric-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .metric-icon svg {
        width: 18px;
        height: 18px;
    }

    .metric-value {
        margin-top: 14px;
        font-size: clamp(23px, 7vw, 31px);
        letter-spacing: -1.2px;
    }

    .metric-caption {
        font-size: 10px;
        line-height: 1.5;
    }

    .metric-bottom {
        margin-top: 12px;
        padding-top: 10px;
        font-size: 9px;
    }

    .finance-panel {
        margin-top: 15px;
    }

    .panel {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .panel-heading h2 {
        font-size: 21px;
    }

    .finance-form {
        margin-top: 20px;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .finance-submit {
        grid-column: auto;
    }

    .field-hint {
        font-size: 10px;
    }

    .content-grid {
        margin-top: 15px;
        gap: 15px;
    }

    .category-list {
        gap: 6px;
        margin-top: 18px;
    }

    .category-row {
        min-height: 48px;
        padding: 7px 8px;
        gap: 9px;
    }

    .category-icon {
        width: 30px;
        height: 30px;
    }

    .category-name {
        font-size: 11px;
    }

    .category-amount {
        font-size: 12px;
    }

    .ai-brand {
        gap: 9px;
    }

    .ai-logo {
        width: 37px;
        height: 37px;
    }

    .ai-brand h2 {
        font-size: 19px;
    }

    .ai-tag {
        padding: 5px 6px;
        font-size: 7px;
    }

    .ai-tip {
        padding: 13px;
    }

    .ai-tip p {
        font-size: 11px;
    }

    .transactions-title {
        margin-top: 33px;
    }

    .transactions-title .text-link {
        margin-top: 4px;
        font-size: 10px;
    }

    .transactions-grid {
        gap: 14px;
    }

    .transactions-panel .panel-heading h2,
    .expense-panel .panel-heading h2 {
        font-size: 20px;
    }

    .transaction {
        padding: 12px 10px;
        gap: 8px;
    }

    .transaction-amount {
        font-size: 12px;
    }

    .footer {
        margin-top: 30px;
        gap: 12px;
    }

    .footer p {
        order: 3;
        width: 100%;
    }
}

/* EXTRA SMALL PHONES */

@media (max-width: 370px) {
    .topbar,
    main {
        width: calc(100% - 22px);
    }

    .brand {
        gap: 7px;
    }

    .brand-name {
        font-size: 19px;
    }

    .brand-beta {
        display: none;
    }

    .edition-tag {
        font-size: 6px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 0;
        padding: 17px;
    }

    .metric-value {
        font-size: 29px;
    }

    .metric-label {
        font-size: 9px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-art {
        transform: scale(0.92);
        margin: -4px -10px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .transactions-title .text-link {
        margin-top: 0;
    }

    .ai-tag {
        display: none;
    }
}

/* ACCESSIBILITY: REDUCE MOTION WHEN REQUESTED */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* =========================================
   SPENDLOOM AI MONEY COACH CHAT
========================================= */

.ai-quick-prompts {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 20px 0;
}

.ai-prompt {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(130, 160, 190, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: 0.2s ease;
}

.ai-prompt:hover {
    border-color: rgba(80, 220, 220, 0.65);
    background: rgba(80, 220, 220, 0.07);
    transform: translateY(-1px);
}

.ai-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding: 14px 0;
    scroll-behavior: smooth;
}

.ai-chat-bubble {
    max-width: 90%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ai-chat-bot {
    align-self: flex-start;
    border: 1px solid rgba(130, 160, 190, 0.18);
    background: rgba(255, 255, 255, 0.045);
}

.ai-chat-user {
    align-self: flex-end;
    border: 1px solid rgba(65, 210, 205, 0.3);
    background: rgba(65, 210, 205, 0.12);
}

.ai-chat-form {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 8px;
}

.ai-chat-form input {
    min-width: 0;
    flex: 1;
    padding: 12px 14px;
    border: 1px solid rgba(130, 160, 190, 0.3);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    font: inherit;
}

.ai-chat-form input:focus {
    outline: 1px solid #56ded3;
    border-color: #56ded3;
}

.ai-chat-form button {
    flex-shrink: 0;
    padding: 12px 16px;
    border: 0;
    border-radius: 11px;
    background: #56ded3;
    color: #081117;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ai-chat-form button:disabled,
.ai-prompt:disabled {
    opacity: 0.55;
    cursor: wait;
}

.ai-chat-form button:hover:not(:disabled) {
    filter: brightness(1.08);
}

.ai-disclaimer {
    margin-top: 14px;
    color: #70859a;
    font-size: 0.75rem;
    opacity: 0.65;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .ai-chat-bubble {
        max-width: 96%;
    }

    .ai-chat-form button {
        padding: 12px;
    }
}
/* Single focus ring on the chat input (avoid double outline) */
.ai-chat-form input:focus-visible {
    outline: none;
    border-color: #56ded3;
    box-shadow: 0 0 0 3px rgba(86, 222, 211, 0.15);
}

/* =========================================
   BUDGET PROGRESS, DELETE BUTTON, STATES
========================================= */

.budget-progress {
    height: 5px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
}

.budget-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.5s var(--ease), background 0.3s ease;
}

.budget-progress span.is-warning {
    background: var(--orange);
}

.budget-progress span.is-over {
    background: #ff7a8f;
}

.metric-value.is-negative {
    color: #ff9eae;
}

.transaction-side {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
}

.transaction-delete {
    width: 30px;
    height: 30px;
    padding: 0;

    display: grid;
    place-items: center;

    color: #8a9ab0;
    font-size: 14px;
    line-height: 1;

    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;

    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.transaction-delete:hover,
.transaction-delete:focus-visible {
    color: #ff9eae;
    border-color: rgba(255, 158, 174, 0.3);
    background: rgba(255, 158, 174, 0.08);
}

.transaction-delete:disabled {
    opacity: 0.5;
    cursor: wait;
}

.form-message.is-error {
    color: #ff9eae;
}

input[type="date"],
input[type="month"] {
    color-scheme: dark;
}

.ai-chat-bubble.is-thinking {
    color: var(--muted);
    animation: thinkingPulse 1.4s ease-in-out infinite;
}

@keyframes thinkingPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* =========================================
   ACCOUNTS: SIGN UP / LOG IN
========================================= */

[hidden] {
    display: none !important;
}

body.is-locked {
    overflow: hidden;
}

body.is-locked .topbar,
body.is-locked main {
    visibility: hidden;
}

.auth-screen {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: grid;
    place-items: center;
    padding: 24px 16px;
    overflow-y: auto;

    background:
        radial-gradient(ellipse at 15% 10%, rgba(30, 139, 111, 0.18), transparent 45%),
        radial-gradient(ellipse at 90% 90%, rgba(94, 82, 190, 0.16), transparent 45%),
        rgba(8, 11, 18, 0.97);

    animation: fadeIn 0.35s ease both;
}

.auth-card {
    width: min(420px, 100%);
    padding: 32px 28px 24px;

    border: 1px solid rgba(118, 255, 202, 0.16);
    border-radius: var(--radius);

    background: linear-gradient(150deg, rgba(17, 31, 39, 0.98), rgba(12, 18, 29, 0.98));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);

    animation: fadeUp 0.5s var(--ease) both;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.auth-title {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -1.2px;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 13px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;

    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(5, 10, 18, 0.5);
}

.auth-tab {
    padding: 9px 10px;

    color: var(--muted);
    font-size: 12px;
    font-weight: 700;

    border: 0;
    border-radius: 9px;
    background: transparent;

    transition: color 0.2s ease, background 0.2s ease;
}

.auth-tab:hover {
    color: var(--text);
}

.auth-tab.active {
    color: #07140f;
    background: var(--mint);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;

    padding: 6px 9px;

    color: var(--mint);
    font-size: 11px;
    font-weight: 700;

    border: 0;
    border-radius: 8px;
    background: rgba(118, 255, 202, 0.07);

    transform: translateY(-50%);
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.auth-footnote {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 0;

    color: #74869d;
    font-size: 10px;
    line-height: 1.6;
}

.auth-footnote span {
    color: var(--mint);
}

.hero-greeting {
    margin: -8px 0 10px;
    color: var(--soft);
    font-size: 14px;
    font-weight: 500;
}

.hero-greeting:empty {
    display: none;
}

/* ACCOUNT MENU */

.account-menu {
    position: relative;
}

button.avatar {
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

button.avatar:hover,
button.avatar[aria-expanded="true"] {
    border-color: rgba(118, 255, 202, 0.5);
    box-shadow: 0 0 18px rgba(118, 255, 202, 0.15);
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 50;

    width: 230px;
    padding: 14px;

    border: 1px solid var(--line-hover);
    border-radius: 14px;
    background: rgba(14, 22, 34, 0.98);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);

    animation: fadeUp 0.2s var(--ease) both;
}

.account-name {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.account-email {
    margin: 2px 0 12px;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.account-logout {
    width: 100%;
    padding: 9px 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #ff9eae;
    font-size: 12px;
    font-weight: 700;

    border: 1px solid rgba(255, 158, 174, 0.25);
    border-radius: 10px;
    background: rgba(255, 158, 174, 0.06);
}

.account-logout:hover {
    background: rgba(255, 158, 174, 0.12);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 26px 18px 20px;
    }

    .auth-title {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    /* Anchor the account menu to the header so it never leaves the screen */
    .account-menu {
        position: static;
    }

    .account-dropdown {
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        width: auto;
    }
}
