:root {
    --brand-primary: #155eef;
    --brand-primary-dark: #0b3ca8;
    --brand-secondary: #0e7490;
    --brand-ink: #12233f;
    --brand-muted: #5f6f86;
    --brand-surface: #f5f8fc;
    --brand-line: rgba(18, 35, 63, .10);
    --brand-success: #0f9f6e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.public-page {
    margin: 0;
    color: var(--brand-ink);
    background: #fff;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }

.public-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--brand-line);
    backdrop-filter: blur(16px);
}
.public-nav .navbar-brand { color: var(--brand-ink); font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 10px 25px rgba(21,94,239,.22);
    overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 5px; background: #fff; }
.brand-mark i { color: #fff; font-size: 1.35rem; }
.brand-copy small { color: var(--brand-muted); font-weight: 500; display: block; font-size: .72rem; letter-spacing: .01em; }
.public-nav .nav-link { color: #394a62; font-weight: 600; }
.public-nav .nav-link:hover { color: var(--brand-primary); }

.btn-brand {
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: .8rem 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-primary), #3b82f6);
    box-shadow: 0 10px 24px rgba(21,94,239,.22);
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-brand:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(21,94,239,.28); }
.btn-soft {
    color: var(--brand-ink);
    border: 1px solid var(--brand-line);
    background: rgba(255,255,255,.86);
    border-radius: 12px;
    padding: .8rem 1.15rem;
    font-weight: 700;
}
.btn-soft:hover { color: var(--brand-primary); border-color: rgba(21,94,239,.3); background: #fff; }

.hero {
    position: relative;
    overflow: hidden;
    min-height: 690px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(14,116,144,.18), transparent 30%),
        radial-gradient(circle at 12% 8%, rgba(21,94,239,.16), transparent 32%),
        linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
}
.hero::before { width: 390px; height: 390px; right: -170px; top: 130px; border: 70px solid rgba(21,94,239,.05); }
.hero::after { width: 280px; height: 280px; left: -150px; bottom: -70px; border: 55px solid rgba(14,116,144,.05); }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .52rem .8rem;
    border-radius: 999px;
    color: var(--brand-primary-dark);
    background: rgba(21,94,239,.08);
    border: 1px solid rgba(21,94,239,.14);
    font-weight: 700;
    font-size: .85rem;
}
.hero h1 { font-size: clamp(2.55rem, 5vw, 4.75rem); line-height: 1.03; letter-spacing: -.055em; font-weight: 850; margin: 1.25rem 0; }
.hero h1 span { color: var(--brand-primary); }
.hero-lead { color: var(--brand-muted); font-size: 1.12rem; line-height: 1.75; max-width: 650px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.75rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 1.8rem; color: #465973; font-size: .9rem; font-weight: 600; }
.hero-trust i { color: var(--brand-success); margin-right: .35rem; }

.dashboard-preview {
    position: relative;
    padding: 1rem;
    border-radius: 28px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 35px 80px rgba(24,51,93,.18);
    backdrop-filter: blur(14px);
}
.preview-window { overflow: hidden; border-radius: 20px; background: #fff; border: 1px solid var(--brand-line); }
.preview-topbar { display: flex; align-items: center; gap: .4rem; padding: .8rem 1rem; background: #f7f9fc; border-bottom: 1px solid var(--brand-line); }
.preview-dot { width: 9px; height: 9px; border-radius: 50%; background: #d0d8e5; }
.preview-layout { display: grid; grid-template-columns: 105px 1fr; min-height: 380px; }
.preview-sidebar { padding: 1.1rem .75rem; background: #10264a; }
.preview-logo { width: 42px; height: 42px; margin: 0 auto 1.25rem; border-radius: 12px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); }
.preview-menu { height: 9px; border-radius: 8px; background: rgba(255,255,255,.18); margin: .9rem 0; }
.preview-menu.active { background: #5ca7ff; }
.preview-content { padding: 1.4rem; background: #f5f8fc; }
.preview-heading { width: 48%; height: 18px; border-radius: 8px; background: #1b3154; margin-bottom: 1.1rem; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.metric-card { padding: .85rem; background: #fff; border: 1px solid var(--brand-line); border-radius: 14px; }
.metric-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--brand-primary); background: rgba(21,94,239,.09); }
.metric-number { font-size: 1.45rem; font-weight: 800; margin-top: .65rem; }
.metric-label { color: var(--brand-muted); font-size: .72rem; }
.preview-chart { height: 145px; margin-top: .85rem; padding: 1rem; display: flex; align-items: flex-end; gap: .55rem; border-radius: 14px; background: #fff; border: 1px solid var(--brand-line); }
.preview-bar { flex: 1; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #60a5fa, #155eef); min-height: 22px; }
.preview-float { position: absolute; padding: .8rem 1rem; background: #fff; border: 1px solid var(--brand-line); border-radius: 14px; box-shadow: 0 18px 35px rgba(24,51,93,.15); font-size: .84rem; font-weight: 700; }
.preview-float.one { top: 18%; right: -25px; }
.preview-float.two { bottom: 12%; left: -32px; }
.preview-float i { color: var(--brand-success); margin-right: .4rem; }

.section-space { padding: 6rem 0; }
.section-kicker { color: var(--brand-primary); font-size: .8rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.section-title { margin: .65rem 0 1rem; font-weight: 850; letter-spacing: -.035em; font-size: clamp(2rem, 4vw, 3.1rem); }
.section-lead { max-width: 680px; color: var(--brand-muted); font-size: 1.05rem; line-height: 1.75; }
.bg-soft { background: var(--brand-surface); }
.feature-card { height: 100%; padding: 1.65rem; background: #fff; border: 1px solid var(--brand-line); border-radius: 20px; box-shadow: 0 12px 30px rgba(18,35,63,.05); transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 18px 42px rgba(18,35,63,.09); }
.feature-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; color: var(--brand-primary); background: rgba(21,94,239,.09); font-size: 1.25rem; }
.feature-card h3 { margin: 1rem 0 .65rem; font-size: 1.06rem; font-weight: 800; }
.feature-card p { color: var(--brand-muted); line-height: 1.65; margin: 0; font-size: .93rem; }

.resource-card { overflow: hidden; height: 100%; border-radius: 24px; background: linear-gradient(145deg, #10264a, #164f83); color: #fff; box-shadow: 0 24px 50px rgba(18,35,63,.16); }
.resource-card .resource-body { padding: 2rem; }
.resource-art { min-height: 220px; display: grid; place-items: center; background: radial-gradient(circle at 65% 25%, rgba(96,165,250,.38), transparent 35%); }
.resource-art i { font-size: 6rem; opacity: .92; }
.terms-card { height: 100%; border: 1px solid var(--brand-line); border-radius: 24px; background: #fff; padding: 2rem; box-shadow: 0 18px 45px rgba(18,35,63,.07); }
.terms-preview { position: relative; max-height: 155px; overflow: hidden; color: var(--brand-muted); line-height: 1.7; }
.terms-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, #fff); }

.cta-wrap { padding: 0 0 6rem; }
.cta-panel { overflow: hidden; position: relative; padding: 3.2rem; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #10264a 0%, #155eef 60%, #0e7490 100%); box-shadow: 0 25px 65px rgba(21,94,239,.22); }
.cta-panel::after { content: ""; position: absolute; width: 330px; height: 330px; border: 65px solid rgba(255,255,255,.08); border-radius: 50%; right: -120px; top: -160px; }
.cta-panel > * { position: relative; z-index: 1; }

.public-footer { padding: 2rem 0; border-top: 1px solid var(--brand-line); color: var(--brand-muted); background: #fff; }

/* Login */
.login-page { min-height: 100vh; background: #f4f7fb; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); }
.login-visual { position: relative; overflow: hidden; display: flex; align-items: center; padding: clamp(2.5rem, 6vw, 6rem); color: #fff; background: linear-gradient(145deg, #0b2348, #155eef 58%, #0e7490); }
.login-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 20%, rgba(255,255,255,.18), transparent 25%), radial-gradient(circle at 10% 85%, rgba(255,255,255,.12), transparent 28%); }
.login-visual::after { content: ""; position: absolute; width: 500px; height: 500px; right: -250px; bottom: -210px; border: 85px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-visual-content { position: relative; z-index: 1; max-width: 650px; }
.login-brand { display: inline-flex; align-items: center; gap: .85rem; margin-bottom: 3rem; }
.login-brand .brand-mark { box-shadow: none; border: 1px solid rgba(255,255,255,.25); }
.login-brand-name { font-weight: 850; font-size: 1.3rem; }
.login-visual h1 { font-size: clamp(2.5rem, 4.8vw, 4.5rem); line-height: 1.05; letter-spacing: -.05em; font-weight: 850; }
.login-visual p { max-width: 570px; margin-top: 1.4rem; color: rgba(255,255,255,.82); font-size: 1.05rem; line-height: 1.75; }
.login-points { display: grid; gap: .85rem; margin-top: 2rem; }
.login-point { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.9); font-weight: 600; }
.login-point i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.13); }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.login-form-wrap { width: min(100%, 455px); }
.login-back { display: inline-flex; align-items: center; gap: .5rem; color: var(--brand-muted); font-weight: 650; font-size: .9rem; margin-bottom: 2.2rem; }
.login-back:hover { color: var(--brand-primary); }
.login-form-wrap h2 { font-weight: 850; letter-spacing: -.035em; font-size: 2rem; }
.login-subtitle { color: var(--brand-muted); margin-bottom: 2rem; }
.form-label-pro { font-size: .87rem; font-weight: 750; color: #31445f; }
.input-pro { position: relative; }
.input-pro > i { position: absolute; z-index: 2; left: 1rem; top: 50%; transform: translateY(-50%); color: #7a8ba3; }
.input-pro .form-control { min-height: 54px; padding-left: 2.85rem; border-radius: 13px; border: 1px solid #dbe3ee; background: #fbfcfe; }
.input-pro .form-control:focus { background: #fff; border-color: rgba(21,94,239,.55); box-shadow: 0 0 0 .24rem rgba(21,94,239,.10); }
.password-toggle { position: absolute; z-index: 3; right: .7rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #7a8ba3; padding: .4rem; }
.login-alert { border: 0; border-radius: 13px; background: #fff1f2; color: #b42335; }
.login-foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.5rem; color: var(--brand-muted); font-size: .84rem; }
.login-foot-links a { color: var(--brand-muted); }
.login-foot-links a:hover { color: var(--brand-primary); }

@media (max-width: 991.98px) {
    .hero { min-height: auto; padding: 5rem 0; }
    .dashboard-preview { margin-top: 3.5rem; }
    .preview-float.one { right: 4px; }
    .preview-float.two { left: 4px; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-form-side { min-height: 100vh; }
}
@media (max-width: 575.98px) {
    .hero h1 { font-size: 2.55rem; }
    .section-space { padding: 4.5rem 0; }
    .metric-grid { grid-template-columns: 1fr; }
    .preview-layout { grid-template-columns: 75px 1fr; }
    .preview-float { display: none; }
    .cta-panel { padding: 2rem; }
    .login-form-side { padding: 1.25rem; }
}
