:root {
    --bp-primary: #0f4c81;
    --bp-primary-2: #2563eb;
    --bp-secondary: #22c55e;
    --bp-accent: #f97316;
    --bp-success: #16a34a;
    --bp-warning: #f59e0b;
    --bp-danger: #dc2626;
    --bp-ink: #0f172a;
    --bp-subtext: #64748b;
    --bp-soft: #f8fafc;
    --bp-border: #e2e8f0;
    --bp-card-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--bp-ink);
    background: #f5f7fb;
}

.app-shell {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(15, 76, 129, 0.12), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 42%, #eef4fb 100%);
}

body.is-loading {
    overflow: hidden;
}

.public-shell {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

.hero-section {
    background:
        radial-gradient(circle at top right, rgba(15, 76, 129, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.12), transparent 30%);
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-core {
    text-align: center;
    position: relative;
}

.loader-logo,
.brand-logo,
.sidebar-logo,
.terminal-logo {
    object-fit: contain;
}

.loader-logo {
    width: 76px;
    height: 76px;
    position: relative;
    z-index: 2;
}

.loader-ring {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 4px solid rgba(15, 76, 129, 0.12);
    border-top-color: var(--bp-primary);
    margin: -92px auto 18px;
    animation: spin 1.05s linear infinite;
}

.brand-logo {
    width: 36px;
    height: 36px;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px;
}

.hero-badge {
    background: rgba(15, 76, 129, 0.08);
    color: var(--bp-primary);
    border: 1px solid rgba(15, 76, 129, 0.12);
}

.showcase-card,
.panel-card,
.auth-card,
.stat-card,
.pricing-card,
.feature-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.25rem;
    box-shadow: var(--bp-card-shadow);
}

.showcase-card,
.auth-card,
.panel-card,
.pricing-card,
.feature-card {
    padding: 1.5rem;
}

.mini-card,
.metric-chip,
.advice-item,
.sector-badge {
    border-radius: 1rem;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.8,.2,1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

[data-reveal="left"] {
    transform: translateX(-36px);
}

[data-reveal="right"] {
    transform: translateX(36px);
}

.floating-card {
    animation: floaty 5.6s ease-in-out infinite;
}

.delay-1 { animation-delay: .6s; }
.delay-2 { animation-delay: 1.1s; }
.delay-3 { animation-delay: 1.7s; }

.hover-lift {
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.hover-lift:hover,
.pricing-card:hover,
.showcase-card:hover,
.panel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
    border-color: rgba(15, 76, 129, 0.16);
}

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

.terminal-visual {
    position: absolute;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.28);
}

.terminal-main {
    width: 260px;
    height: 460px;
    border-radius: 32px;
    left: 2%;
    top: 8%;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.08);
}

.terminal-screen {
    height: 52%;
    border-radius: 22px;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--bp-primary);
}

.terminal-logo {
    width: 28px;
    height: 28px;
}

.terminal-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bp-ink);
}

.terminal-lines span {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15,76,129,.15), rgba(37,99,235,.12));
    margin-top: 10px;
}

.terminal-pad {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
}

.terminal-pad span {
    height: 46px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
}

.terminal-mini {
    width: 165px;
    height: 265px;
    border-radius: 28px;
    padding: 18px;
}

.terminal-orange {
    right: 5%;
    top: 0;
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
}

.terminal-green {
    right: 0;
    bottom: 11%;
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
}

.terminal-chip {
    width: 54px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.26);
    margin-bottom: 16px;
}

.terminal-mini-screen {
    height: 82px;
    border-radius: 16px;
    background: rgba(255,255,255,0.84);
}

.mini-card {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.08), rgba(255,255,255,0.96));
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
}

.metric-chip {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--bp-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-card {
    height: 100%;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: rgba(15, 76, 129, 0.12);
    color: var(--bp-primary);
    font-size: 1.35rem;
}

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

.sector-badge {
    background: white;
    padding: 1rem 1.1rem;
    border: 1px solid var(--bp-border);
    font-weight: 600;
}

.pricing-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-featured {
    border-color: rgba(15, 76, 129, 0.22);
    transform: translateY(-8px);
}

.pricing-ribbon {
    position: absolute;
    top: 18px;
    right: -38px;
    background: var(--bp-accent);
    color: white;
    padding: 0.35rem 2.8rem;
    transform: rotate(32deg);
    font-size: 0.78rem;
    font-weight: 700;
}

.pricing-price {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--bp-primary);
}

.pricing-list {
    display: grid;
    gap: .85rem;
    text-align: left;
    margin-bottom: 1.4rem;
}

.pricing-list li {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.pricing-list i {
    color: var(--bp-secondary);
}

.auth-section {
    min-height: calc(100vh - 160px);
    display: grid;
    align-items: center;
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    border-radius: 2rem;
    padding: clamp(1.5rem, 3vw, 3rem);
    color: white;
    background:
        radial-gradient(circle at 14% 12%, rgba(34, 197, 94, 0.36), transparent 28%),
        radial-gradient(circle at 92% 10%, rgba(249, 115, 22, 0.24), transparent 26%),
        linear-gradient(145deg, #0f172a 0%, #0f4c81 58%, #0b6b68 100%);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.auth-showcase::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: -140px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-showcase-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
}

.auth-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

.auth-brand-pill img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.auth-benefits {
    display: grid;
    gap: .85rem;
}

.auth-benefit {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-benefit i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    background: rgba(34, 197, 94, 0.2);
}

.auth-preview-card {
    position: relative;
    z-index: 2;
    max-width: 410px;
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.auth-preview-screen {
    border-radius: 1.15rem;
    background: #ffffff;
    color: var(--bp-ink);
    padding: 1.25rem;
}

.auth-preview-amount {
    font-size: clamp(1.75rem, 4vw, 2.45rem);
    font-weight: 800;
}

.auth-form-card {
    padding: clamp(1.5rem, 3vw, 2.35rem);
}

.auth-form-card .form-control,
.auth-form-card .form-select {
    border-radius: .95rem;
    border-color: rgba(148, 163, 184, 0.42);
    padding: .85rem 1rem;
}

.auth-form-card .form-control:focus,
.auth-form-card .form-select:focus {
    border-color: var(--bp-primary-2);
    box-shadow: 0 0 0 .22rem rgba(37, 99, 235, 0.12);
}

.auth-mini-stat {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .8rem;
    border-radius: 999px;
    background: rgba(15, 76, 129, 0.08);
    color: var(--bp-primary);
    font-weight: 700;
    font-size: .9rem;
}

@media (max-width: 991.98px) {
    .auth-section {
        min-height: auto;
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .auth-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .auth-showcase-column {
        display: none !important;
    }

    .auth-form-column {
        width: 100%;
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-form-card {
        padding: 1.25rem;
        border-radius: 1.1rem;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    }

    .auth-form-card .hero-badge {
        font-size: .78rem;
    }

    .auth-form-card h2 {
        font-size: 1.35rem;
    }

    .auth-form-card .form-control,
    .auth-form-card .form-select {
        min-height: 46px;
        padding: .7rem .9rem;
    }
}

@media (max-width: 575.98px) {
    .auth-form-card {
        border-radius: 1rem;
        padding: 1rem;
    }

    .auth-section .row.g-3 {
        --bs-gutter-y: .8rem;
    }
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar-panel {
    width: 290px;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 197, 94, 0.28), transparent 24%),
        radial-gradient(circle at 90% 4%, rgba(249, 115, 22, 0.16), transparent 22%),
        linear-gradient(180deg, #0f172a 0%, #0f4c81 58%, #0b6b68 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.content-panel {
    flex: 1;
    min-width: 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-link.active,
.sidebar-link:hover {
    color: white;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(34, 197, 94, 0.18));
}

.topbar {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.10), transparent 28%),
        rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bp-border);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-main {
    position: relative;
}

.content-main::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 290px;
    height: 220px;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 20%, rgba(15, 76, 129, 0.12), transparent 32%),
        radial-gradient(circle at 78% 10%, rgba(34, 197, 94, 0.10), transparent 28%);
    z-index: -1;
}

.page-title {
    font-weight: 800;
}

.page-subtitle {
    color: #334155;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: white;
    border: 1px solid var(--bp-border);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
}

.stat-card {
    padding: 1.25rem;
}

.stat-label {
    color: var(--bp-subtext);
    font-size: 0.92rem;
}

.stat-value {
    font-size: clamp(1.45rem, 2vw, 2rem);
    margin-top: 0.55rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 76, 129, 0.12);
    color: var(--bp-primary);
}

.chart-wrap {
    height: 320px;
}

.advice-item {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(249, 115, 22, 0.08));
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.advice-item i {
    color: var(--bp-accent);
    margin-top: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bp-primary), var(--bp-primary-2));
    border: 0;
    box-shadow: 0 12px 30px rgba(15, 76, 129, 0.18);
}

.btn-outline-primary {
    color: var(--bp-primary);
    border-color: rgba(15, 76, 129, 0.24);
}

.btn-outline-primary:hover {
    background: rgba(15, 76, 129, 0.08);
    color: var(--bp-primary);
    border-color: rgba(15, 76, 129, 0.24);
}

.table > :not(caption) > * > * {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

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

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

@media (max-width: 991.98px) {
    .app-wrapper {
        flex-direction: column;
    }

    .sidebar-panel {
        width: 100%;
        position: static;
        min-height: auto;
    }

    .topbar {
        padding: 1rem 1.2rem;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-visual-stage {
        min-height: 780px;
    }

    .terminal-main {
        left: 50%;
        transform: translateX(-50%);
        top: 0;
    }

    .terminal-orange {
        left: 4%;
        top: 62%;
        right: auto;
    }

    .terminal-green {
        right: 4%;
        bottom: 1%;
    }
}
