:root {
    --lavender: #CDA0FA;
    --periwinkle: #9EADFA;
    --ice-cyan: #B8EAF8;
    --soft-pink: #F5D8F2;
    --charcoal: #252525;
    --muted: #6B7280;
    --border: #E9E7F0;
    --surface: #FFFFFF;
    --page: #FBFAFE;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 18px 50px rgba(65, 48, 100, .08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--charcoal);
    background: var(--page);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.site-header {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(233, 231, 240, .8);
}

.nav-inner {
    max-width: 1160px;
    min-height: 82px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--charcoal);
    text-decoration: none;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.8px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #3A3150;
    background: linear-gradient(135deg, var(--lavender), var(--ice-cyan));
    font-size: 20px;
    font-weight: 900;
}

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

.btn {
    min-height: 46px;
    padding: 11px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 13px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease;
    cursor: pointer;
}

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

.btn-primary {
    color: #fff;
    background: var(--charcoal);
    box-shadow: 0 6px 16px rgba(37, 37, 37, .12);
}

.btn-secondary {
    color: var(--charcoal);
    background: #fff;
    border-color: var(--border);
}

.hero-wrap {
    padding: 38px 24px 54px;
    overflow: hidden;
}

.hero {
    position: relative;
    max-width: 1160px;
    min-height: 440px;
    margin: 0 auto;
    padding: 70px 64px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 32px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 88% 16%, rgba(184, 234, 248, .95), transparent 33%),
        radial-gradient(ellipse at 76% 90%, rgba(245, 216, 242, .95), transparent 38%),
        linear-gradient(120deg, #F2E6FF 0%, #F5F1FF 48%, #F1F9FF 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    color: #51446B;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8A65C8;
}

.hero h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -2.8px;
    font-weight: 800;
}

.hero h1 span {
    color: #7952B7;
}

.hero-description {
    max-width: 520px;
    margin: 22px 0 28px;
    color: #5E5A6A;
    font-size: 17px;
    line-height: 1.8;
}

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

.hero-decoration {
    position: absolute;
    right: 7%;
    top: 50%;
    width: 245px;
    height: 245px;
    transform: translateY(-50%) rotate(-12deg);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 38% 62% 57% 43% / 43% 42% 58% 57%;
    background: linear-gradient(145deg,
        rgba(255,255,255,.68),
        rgba(205,160,250,.35) 48%,
        rgba(184,234,248,.65));
    box-shadow: 0 30px 80px rgba(109, 88, 160, .12);
}

.hero-decoration::before,
.hero-decoration::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 50%;
}

.hero-decoration::before {
    inset: 25px -22px -18px 22px;
}

.hero-decoration::after {
    inset: 52px;
    background: rgba(255,255,255,.28);
}

.section {
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px 28px 64px;
}

.section-heading {
    margin-bottom: 28px;
    text-align: center;
}

.section-kicker {
    color: #8463B8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 8px 0;
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -1.2px;
}

.section-heading p {
    max-width: 560px;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 15px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    position: relative;
    min-height: 250px;
    padding: 27px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 6px 24px rgba(65, 48, 100, .025);
    transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.service-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    font-size: 23px;
}

.icon-lavender {
    background: #F0E2FF;
}

.icon-cyan {
    background: #DFF6FC;
}

.icon-pink {
    background: #FBE8F7;
}

.service-card h3 {
    margin: 0 0 9px;
    font-size: 19px;
    letter-spacing: -.4px;
}

.service-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.service-label {
    display: inline-block;
    margin-top: 18px;
    color: #7550AD;
    font-size: 13px;
    font-weight: 750;
}

.account-strip {
    max-width: 1104px;
    margin: 0 auto 64px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid #E9E0F8;
    border-radius: 22px;
    background: linear-gradient(110deg, #F2E9FF, #F2F9FF 70%, #FCEFF9);
}

.account-strip h2 {
    margin: 0 0 5px;
    font-size: 21px;
    letter-spacing: -.5px;
}

.account-strip p {
    margin: 0;
    color: #696477;
    font-size: 14px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
}

.footer-brand {
    color: var(--charcoal);
    font-weight: 800;
}

.auth-page {
    min-height: 100vh;
    padding: 32px 20px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse at 10% 10%, #F0E4FF, transparent 38%),
        radial-gradient(ellipse at 90% 90%, #DFF6FC, transparent 38%),
        var(--page);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 36px;
    border: 1px solid rgba(255,255,255,.95);
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin: 28px 0 8px;
    font-size: 30px;
    letter-spacing: -1px;
}

.auth-description {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 14px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.form-field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #DEDBE8;
    border-radius: 11px;
    background: #fff;
    color: var(--charcoal);
    font: inherit;
    font-size: 14px;
}

.form-field input:focus {
    outline: 3px solid rgba(205,160,250,.3);
    border-color: #B68BE8;
}

.auth-card .btn {
    width: 100%;
    margin-top: 6px;
}

.form-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
}

.form-message.error {
    color: #9F2525;
    background: #FFF0F0;
}

.form-message.success {
    color: #176A45;
    background: #EAF9F0;
}

.auth-links {
    margin-top: 22px;
    display: grid;
    gap: 10px;
    text-align: center;
    font-size: 13px;
}

.auth-links a {
    color: #7550AD;
    font-weight: 650;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.dashboard-page {
    min-height: 100vh;
    background: #F8F8FC;
}

.dashboard-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 38px 28px 60px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-card {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.dashboard-card h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.dashboard-card.balance-panel {
    grid-column: 1 / -1;
    background: linear-gradient(120deg, #F0E5FF, #F2F9FF 75%, #FBEFF9);
}

@media (max-width: 800px) {
    .hero {
        min-height: 400px;
        padding: 54px 36px;
    }

    .hero-decoration {
        right: -105px;
        opacity: .45;
    }

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

    .service-card {
        min-height: 0;
    }

    .account-strip {
        margin-right: 20px;
        margin-left: 20px;
        padding: 24px;
    }
}

@media (max-width: 560px) {
    .nav-inner {
        min-height: 70px;
        padding: 12px 18px;
        gap: 10px;
    }

    .brand {
        gap: 8px;
        font-size: 20px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .nav-actions {
        gap: 7px;
    }

    .nav-actions .btn {
        min-height: 40px;
        padding: 9px 12px;
        font-size: 12px;
    }

    .hero-wrap {
        padding: 20px 14px 34px;
    }

    .hero {
        min-height: 420px;
        padding: 36px 24px;
        border-radius: 24px;
    }

    .hero h1 {
        font-size: 40px;
        letter-spacing: -1.8px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-decoration {
        top: auto;
        right: -100px;
        bottom: -100px;
        width: 200px;
        height: 200px;
        transform: rotate(-12deg);
        opacity: .35;
    }

    .section {
        padding: 20px 18px 42px;
    }

    .section-heading {
        text-align: left;
    }

    .section-heading p {
        margin-left: 0;
    }

    .account-strip {
        margin: 0 14px 42px;
        padding: 22px;
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-inner {
        padding: 22px 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-card {
        padding: 27px 22px;
    }

    .dashboard-container {
        padding: 26px 16px 42px;
    }

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

    .dashboard-card.balance-panel {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* Kstairway Account Dashboard */
.dashboard-header {
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--border);
}

.dashboard-header-inner {
    max-width: 1160px;
    min-height: 76px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-logout {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    color: var(--charcoal);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-logout:hover {
    background: #F5F1FC;
}

.dashboard-eyebrow {
    margin-bottom: 8px;
    color: #8463B8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.dashboard-welcome {
    margin-bottom: 30px;
}

.dashboard-welcome h1 {
    margin: 0 0 8px;
    font-size: clamp(29px, 4vw, 38px);
    line-height: 1.2;
    letter-spacing: -1.2px;
}

.dashboard-welcome p {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.dashboard-grid {
    align-items: stretch;
}

.dashboard-card {
    min-width: 0;
    box-shadow: 0 5px 20px rgba(65,48,100,.025);
}

.dashboard-card h2 {
    letter-spacing: -.4px;
}

.dashboard-card p {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.dashboard-card.balance-panel {
    position: relative;
    overflow: hidden;
    padding: 30px;
}

.balance-panel::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -50px;
    top: -65px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(255,255,255,.15),
                0 0 0 44px rgba(255,255,255,.1);
    pointer-events: none;
}

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

.dashboard-balance-label {
    margin-bottom: 8px;
    color: #5E5670;
    font-size: 14px;
    font-weight: 700;
}

.dashboard-balance {
    margin-bottom: 8px;
    font-size: clamp(32px, 5vw, 44px);
    line-height: 1.2;
    letter-spacing: -1.5px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.dashboard-balance-note {
    margin-bottom: 22px;
    color: #696477;
    font-size: 14px;
}

.dashboard-section-label {
    margin-bottom: 14px;
    color: #8463B8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.dashboard-service-list {
    display: grid;
    gap: 11px;
}

.dashboard-service {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--charcoal);
    text-decoration: none;
    background: #fff;
}

.dashboard-service:hover {
    border-color: #D7C1F2;
    background: #FCFAFF;
}

.dashboard-service-name {
    font-size: 14px;
    font-weight: 700;
}

.dashboard-service-status {
    flex-shrink: 0;
    color: #8B829B;
    font-size: 11px;
    font-weight: 650;
}

.dashboard-footer {
    margin-top: 38px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: #8B829B;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 560px) {
    .dashboard-header-inner {
        min-height: 68px;
        padding: 12px 16px;
    }

    .dashboard-card.balance-panel {
        padding: 24px;
    }

    .dashboard-service {
        align-items: flex-start;
    }

    .dashboard-service-status {
        text-align: right;
    }
}
