/* ==========================================================================
   MutualFundsWeb - shared stylesheet
   Every page's CSS lives here now, consolidated out of the individual PHP
   views. Loaded once per shell: layout/main.php (public site),
   admin/layout.php (admin panel) and admin/login.php (standalone).

   Colour system (flat colours only - no gradients anywhere):
     --brand   is reserved for INTERACTIVE things: links, buttons, active
               nav states, hover borders on clickable cards.
     --ink     is for STATIC emphasis: headings and data values (NAV
               figures, calculator totals, ratios). Keeping these off
               --brand stops every number on the page reading as a link.
     --teal    is the secondary accent: success/positive badges, the one
               CTA that should stand apart from the primary brand colour
               (the lead-capture button), the holdings bar fill.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "Rubik";
    src: url("../Rubik/Rubik-VariableFont_wght.ttf") format("truetype");
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("../Rubik/Rubik-Italic-VariableFont_wght.ttf") format("truetype");
    font-weight: 300 900;
    font-style: italic;
    font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    /* Brand (from the site logo) */
    --brand: #02B68E;
    --brand-dark: #029677;
    --brand-soft: #eef1fb;
    --teal: #02B68E;
    --teal-dark: #029677;
    --teal-soft: #e9f9f4;

    /* Neutrals */
    --ink: #101c33;
    --text: #3c4b63;
    --muted: #66748c;
    --border: #e1e7f0;
    --soft: #f4f7fc;
    --page-bg: #eef2f9;

    /* Semantic */
    --red: #e2495b;

    /* Aliases used throughout the views */
    --navy: #02B68E;
    --green: #02B68E;

    /* Two-tier elevation: -sm is every card's resting state (barely-there,
       mostly relies on the border for definition); the unqualified one is
       the "lifted" state used on hover/focus - kept as one shared variable
       so every existing `:hover{box-shadow:var(--shadow)}` rule across the
       site upgrades together. */
    --shadow-sm: 0 1px 2px rgba(16, 28, 51, .05), 0 1px 3px rgba(16, 28, 51, .06);
    --shadow: 0 12px 28px rgba(16, 28, 51, .10);

    --radius: 14px;
    --radius-sm: 10px;

    /* Let Bootstrap's own components (buttons, focus rings, etc.) pick up the brand too */
    --bs-primary: #013CC2;
    --bs-link-color: #013CC2;
    --bs-link-hover-color: #012a8c;
    --bs-border-radius: 10px;
    --bs-border-radius-sm: 8px;
    --bs-border-radius-lg: 14px;
}

::selection {
    background: var(--brand-soft);
    color: var(--ink)
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth
}

body {
    font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
}

/* Public site shell - a tinted page background (not pure white) so white
   cards read as distinct, elevated surfaces rather than blending into the
   page - the core "bold fintech" contrast move (Groww/Zerodha pattern). */
body.site-body {
    color: var(--text);
    background: var(--page-bg)
}

body.site-body a {
    color: inherit
}

body.site-body h1,
body.site-body h2,
body.site-body h3,
body.site-body h4,
body.site-body h5,
body.site-body h6 {
    color: var(--ink)
}

/* Admin shell */
body.admin-body {
    color: var(--text);
    background: var(--soft)
}

body.admin-body a {
    text-decoration: none
}

body.admin-body input.form-control,
body.admin-body select.form-select,
body.admin-body textarea.form-control {
    border-radius: 8px
}

/* Admin login (standalone page) */
body.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-dark)
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -.01em
}

body.site-body {
    line-height: 1.6
}

/* ---------- Shared components (public + admin) ---------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s, border-color .15s, transform .15s
}

.text-navy {
    color: var(--ink) !important
}

.text-muted-soft {
    color: var(--muted) !important
}

.badge-soft {
    background: var(--brand-soft);
    color: var(--ink);
    border: 1px solid var(--border);
    font-weight: 600;
    border-radius: 999px;
    padding: .5em .85em
}

.badge-soft-green {
    background: var(--teal-soft);
    color: var(--teal-dark);
    border: 1px solid #b8ecdd;
    font-weight: 600;
    border-radius: 999px;
    padding: .5em .85em
}

/* Buttons - consistent radius across the whole site (Bootstrap's default 6px otherwise clashes with the 10-16px/999px radius used everywhere else) */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: .15s
}

.btn-sm {
    border-radius: 8px
}

/* Primary buttons are pill-shaped everywhere, deliberately distinct from
   every other (rectangular) button on the page - one consistent visual
   signal for "the main action here", public site and admin alike. */
.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    border-radius: 999px;
    padding-left: 1.3rem;
    padding-right: 1.3rem;
    box-shadow: 0 4px 12px rgba(1, 60, 194, .28)
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark)
}

.btn-outline-secondary {
    color: var(--brand);
    border-color: var(--border)
}

.btn-outline-secondary:hover {
    background: var(--soft);
    color: var(--brand);
    border-color: var(--brand)
}

.btn-outline-danger {
    border-radius: var(--radius-sm)
}

/* Form focus ring - one definition, applies site-wide (public + admin) */
.form-control:focus,
.form-select:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 .15rem rgba(1, 60, 194, .12) !important
}

/* Tables */
.table thead th {
    background: var(--soft);
    color: var(--muted);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    padding-top: .85rem;
    padding-bottom: .85rem
}

.table tbody tr {
    transition: background-color .1s
}

.table tbody tr:hover {
    background: var(--soft)
}

.table td,
.table th {
    vertical-align: middle;
    padding-top: .85rem;
    padding-bottom: .85rem
}

/* ==========================================================================
   Public site
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    border-bottom: 3px solid var(--teal)
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--brand) !important
}

.brand-mark .badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    flex: 0 0 auto
}

.header-nav-link {
    color: var(--text);
    font-weight: 700;
    font-size: .92rem;
    padding: .5rem .9rem !important;
    border-radius: 8px
}

.header-nav-link:hover {
    color: var(--brand);
    background: var(--soft)
}

.header-nav-link.active {
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 0px
}

.header-search {
    position: relative
}

.header-search input {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: .5rem 1rem .5rem 2.3rem;
    font-size: .85rem;
    background: var(--soft);
    min-width: 220px
}

.header-search input:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 .15rem rgba(1, 60, 194, .12)
}

.header-search i {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .85rem
}

.brand-logo-img {
    max-height: 38px;
    width: auto
}

.btn-header-cta {
    background: var(--teal);
    color: #fff !important;
    font-weight: 700;
    font-size: .85rem;
    border-radius: 999px;
    padding: .55rem 1.2rem;
    text-decoration: none;
    white-space: nowrap;
    transition: .15s
}

.btn-header-cta:hover {
    background: var(--teal-dark)
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-dark);
    color: #c9d6f2;
    margin-top: 4rem;
    font-size: .88rem
}

.site-footer a {
    color: #e6ecfb;
    text-decoration: none
}

.site-footer a:hover {
    color: var(--teal-dark)
}

.site-footer h6 {
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 1rem
}

.site-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff
}

.site-footer .footer-brand .badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff
}

.site-footer .footer-brand .brand-logo-img {
    max-height: 34px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .8rem;
    color: #9fb1dd;
    padding: 1rem 0
}

.footer-links li {
    margin-bottom: .55rem
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: .9rem;
    transition: .15s
}

.footer-social a:hover {
    background: var(--teal)
}

/* ---------- Sticky footer bar & floating widgets ---------- */
body.has-sticky-bar {
    padding-bottom: 60px
}

.sticky-footer-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    padding: 1rem 0;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .18)
}

.sticky-footer-bar-text {
    font-weight: 700
}

.sticky-footer-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: 999px;
    padding: .6rem 1.4rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none;
    white-space: nowrap;
    font-size: .92rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    transition: filter .15s, transform .15s
}

.sticky-footer-bar-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px)
}

.sticky-footer-bar-close {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, .14);
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color .15s
}

.sticky-footer-bar-close:hover {
    background: rgba(255, 255, 255, .26)
}

@media(max-width:576px) {
    .sticky-footer-bar-close {
        position: static;
        transform: none;
        margin-left: .25rem
    }
}

.floating-widget-btn {
    position: fixed;
    right: 1.25rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    z-index: 1035;
    text-decoration: none;
    border: 0;
    transition: .15s
}

.whatsapp-btn {
    bottom: 1.25rem;
    background: #25D366
}

.whatsapp-btn:hover {
    background: #1ea952;
    color: #fff
}

.scroll-top-btn {
    bottom: 1.25rem;
    background: var(--brand);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px)
}

.scroll-top-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0)
}

.scroll-top-btn:hover {
    background: var(--brand-dark)
}

body.has-sticky-bar .floating-widget-btn {
    bottom: calc(1.25rem + 60px)
}

.scroll-top-btn~.whatsapp-btn {
    right: calc(1.25rem + 60px)
}

/* ---------- Fund detail page sidebar ---------- */
.sidebar-sticky {
    position: sticky;
    top: 5.5rem
}

.lead-form input {
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: .65rem .9rem
}

.lead-form input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .15rem rgba(1, 60, 194, .12)
}

.lead-form .btn-submit {
    background: var(--teal);
    border: 0;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: .7rem
}

.lead-form .btn-submit:hover {
    background: var(--teal-dark);
    color: #fff
}

/* ---------- Home page ---------- */
/* A solid, confident colour block (not the old pale tint) - the headline
   "bold fintech" move on the homepage. Flat colour only, no gradient. */
.hero-band {
    background: var(--brand);
    border-radius: 24px;
    padding: 3.5rem 1.5rem
}

.hero-band h1 {
    color: #fff !important
}

.hero-band p.text-muted-soft {
    color: #c3d2f7 !important
}

.hero-search {
    max-width: 640px;
    margin: 0 auto
}

.hero-search input {
    height: 54px;
    border-radius: 12px 0 0 12px;
    border: 0;
    padding: 0 18px;
    font-size: 1rem;
    box-shadow: var(--shadow)
}

.hero-search input:focus {
    box-shadow: var(--shadow), 0 0 0 .15rem rgba(2, 182, 142, .35);
    outline: 0
}

.hero-search button {
    border-radius: 0 12px 12px 0;
    background: var(--teal);
    color: #fff;
    border: 0;
    padding: 0 26px;
    font-weight: 700
}

.hero-search button:hover {
    background: var(--teal-dark)
}

.stat-pill {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: .5rem 1.1rem;
    font-size: .85rem;
    color: #fff;
    font-weight: 600
}

.feature-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s, transform .15s
}

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

.feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 1.1rem;
    box-shadow: 0 6px 14px rgba(1, 60, 194, .28)
}

/* ---------- AMC cards (home + AMC directory) ---------- */
.amc-card {
    display: block;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: .15s
}

.amc-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow)
}

.amc-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--teal-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--teal-dark);
    overflow: hidden
}

.amc-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

/* ---------- AMC profile page ---------- */
.amc-hero-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    overflow: hidden;
    flex: 0 0 auto
}

.amc-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.scheme-search {
    position: relative;
    max-width: 280px;
    flex: 1 1 220px
}

.scheme-search input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: .5rem 1rem .5rem 2.2rem;
    font-size: .85rem;
    background: var(--soft)
}

.scheme-search input:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 .15rem rgba(1, 60, 194, .12);
    outline: 0
}

.scheme-search i {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .8rem
}

.fund-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none
}

.fund-row:last-child {
    border-bottom: 0
}

.fund-row:hover {
    background: var(--soft)
}

.fund-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex: 0 0 auto
}

/* ---------- Fund detail page ---------- */
.chart-wrap {
    padding: 1.25rem 1.25rem .25rem
}

.range-buttons {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .75rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border)
}

.range-buttons button {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .5rem 1.05rem;
    color: var(--text);
    cursor: pointer
}

.range-buttons button.active {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand)
}

.stat .label {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .4rem
}

.stat .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.01em
}

.stat .small {
    font-size: .75rem;
    color: var(--muted);
    margin-top: .3rem
}

.info-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border)
}

.info-item .label {
    color: var(--muted);
    font-size: .8rem;
    margin-bottom: .3rem
}

.info-item .value {
    font-weight: 650;
    color: var(--ink);
    word-break: break-word
}

.calc-tabs button {
    border: 1px solid var(--border);
    background: #fff;
    padding: .55rem 1.4rem;
    cursor: pointer
}

.calc-tabs button:first-child {
    border-radius: 999px 0 0 999px
}

.calc-tabs button:last-child {
    border-radius: 0 999px 999px 0
}

.calc-tabs button.active {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 700
}

.calc-amount {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 1rem;
    letter-spacing: -.01em
}

.holdings-bar {
    height: 8px;
    border-radius: 6px;
    background: #eef0f4;
    overflow: hidden;
    margin-top: .4rem
}

.holdings-bar span {
    display: block;
    height: 100%;
    background: var(--teal)
}

.pill-note {
    display: inline-block;
    background: #fff8e7;
    color: #8b6500;
    border: 1px solid #f1dfaa;
    padding: .35rem .6rem;
    border-radius: 999px;
    font-size: .75rem
}

.legend-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 0
}

.legend-item .swatch {
    width: 4px;
    align-self: stretch;
    border-radius: 2px;
    flex: 0 0 auto
}

.legend-item .label {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.2
}

.legend-item .pct {
    font-weight: 700;
    color: var(--ink);
    font-size: .9rem
}

.donut-wrap {
    position: relative;
    max-width: 220px;
    margin: 0 auto
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    color: var(--ink);
    font-size: .85rem;
    pointer-events: none
}

.ratio-row {
    display: flex;
    justify-content: space-between;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem
}

.ratio-row .rlabel {
    color: var(--muted)
}

.ratio-row .rvalue {
    font-weight: 700;
    color: var(--ink)
}

/* ---------- Calculator widgets ---------- */
.calc-widget .form-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text)
}

/* Every slider used by a calculator - the fund page's Return Calculator
   included, not just the standalone /calculators/* widgets - matches the
   site's teal accent rather than the browser/Bootstrap default blue.
   accent-color alone isn't enough: Bootstrap's own CSS hardcodes the thumb's
   background-color directly on these pseudo-elements (#0d6efd), which wins
   over accent-color in Chrome/Edge/Safari/Firefox alike, so the thumb itself
   has to be overridden explicitly too. */
.form-range {
    accent-color: var(--teal)
}

.form-range::-webkit-slider-thumb {
    background-color: var(--teal)
}

.form-range::-moz-range-thumb {
    background-color: var(--teal)
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 .25rem rgba(2, 182, 142, .25)
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 .25rem rgba(2, 182, 142, .25)
}

.calc-result-box {
    background: var(--brand-soft);
    border-radius: 14px;
    padding: 1.25rem
}

.calc-result-box .big {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.01em
}

.calc-result-box .label {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .25rem
}

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

.calc-value-pill {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .35rem .7rem;
    font-weight: 700;
    color: var(--ink);
    font-size: .9rem
}

/* ---------- Calculator listing cards (archive grid) ---------- */
.text-brand {
    color: var(--brand) !important
}

.calc-card {
    position: relative;
    display: block;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: .15s
}

.calc-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow);
    transform: translateY(-2px)
}

.calc-card-popular {
    border-color: #d7e7ff
}

.calc-card-badge {
    position: absolute;
    top: .85rem;
    right: .85rem;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: .25em .6em;
    border-radius: 999px
}

/* ---------- Calculator page hero + sidebar ---------- */
.calc-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 14px rgba(1, 60, 194, .28)
}

.calc-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: .35rem
}

.calc-sidebar-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .65rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: .12s
}

.calc-sidebar-item:hover {
    background: var(--soft);
    color: var(--brand)
}

.calc-sidebar-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex: 0 0 auto
}

.calc-sidebar-name {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: .88rem;
    color: var(--ink)
}

.calc-sidebar-arrow {
    font-size: .7rem;
    color: var(--muted);
    opacity: 0;
    transition: .12s
}

.calc-sidebar-item:hover .calc-sidebar-arrow {
    opacity: 1;
    color: var(--brand)
}

.calc-sidebar-count {
    flex: 0 0 auto;
    background: var(--soft);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .15em .55em
}

.calc-sidebar-item:hover .calc-sidebar-count {
    background: var(--brand-soft);
    color: var(--brand)
}

.calc-sidebar-note {
    background: var(--soft);
    border: 1px solid var(--border)
}

/* ---------- Admin-authored TinyMCE content block typography (calculators, AMC pages, ...) ---------- */
.rich-content {
    padding: .5rem .25rem
}

.rich-content h2 {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 .85rem;
    padding: 2rem 0 0 1.15rem;
    border-top: 1px solid var(--border);
    position: relative
}

.rich-content h2:first-child {
    padding-top: 0;
    border-top: 0;
    margin-top: 0
}

.rich-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2.2rem;
    width: 5px;
    height: 1.15em;
    border-radius: 3px;
    background: var(--teal)
}

.rich-content h2:first-child::before {
    top: .12em
}

.rich-content p {
    color: var(--text);
    line-height: 1.85;
    font-size: .98rem;
    margin: 0 0 1.05rem;
    padding-left: 1.15rem
}

.rich-content p:last-child {
    margin-bottom: 0
}

.rich-content strong {
    color: var(--ink);
    font-weight: 700
}

.rich-content sup,
.rich-content sub {
    color: var(--brand);
    font-weight: 700
}

.rich-content a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(1, 60, 194, .3)
}

.rich-content a:hover {
    border-bottom-color: var(--brand)
}

.rich-content ul,
.rich-content ol {
    padding-left: 2.4rem;
    color: var(--text);
    line-height: 1.85;
    margin-bottom: 1.05rem
}

.rich-content .table-responsive {
    margin: 0 0 1.05rem 1.15rem
}

/* Home page's own content block - same rich-content design, just a
   slightly smaller heading than the AMC/calculator/article pages use,
   since this block sits below an already-large hero heading. */
.home-content-block h2 {
    font-size: 1.12rem
}

/* Admin-authored tables - Home/AMC/Fund/Calculator/Article "content"
   fields, normalized by App\Libraries\ContentFormatter into a bare
   <table> inside .table-responsive with no styling class of its own (the
   site's OWN hardcoded tables always carry class="table" and are left
   alone by the :not() below). One design for every one of these,
   regardless of which page embeds them or when it was saved - this is a
   structural selector, not tied to a class added at save time, so it
   covers content saved before this rule existed too. */
.table-responsive > table:not(.table) {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border)
}

.table-responsive > table:not(.table) thead th {
    background: var(--soft);
    color: var(--muted);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid var(--border);
    padding: .85rem 1.1rem
}

.table-responsive > table:not(.table) td {
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle
}

.table-responsive > table:not(.table) tbody tr:last-child td {
    border-bottom: 0
}

.table-responsive > table:not(.table) tbody tr:hover td {
    background: var(--soft)
}

.table-responsive > table:not(.table) strong {
    color: var(--ink)
}

/* ==========================================================================
   Admin panel
   ========================================================================== */

/* ---------- Shell (sidebar + topbar) ---------- */
.admin-shell {
    display: flex;
    min-height: 100vh
}

.admin-sidebar {
    width: 230px;
    flex: 0 0 230px;
    background: #fff;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto
}

.admin-sidebar .brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: 1.1rem 1.25rem;
    font-weight: 800;
    color: var(--brand)
}

.admin-sidebar .brand .dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: var(--brand)
}

.admin-nav {
    padding: .5rem
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .85rem;
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .15rem
}

.admin-nav a i {
    width: 18px;
    text-align: center;
    color: var(--muted)
}

.admin-nav a {
    transition: background-color .12s, box-shadow .12s
}

.admin-nav a:hover {
    background: var(--soft)
}

.admin-nav a.active {
    background: var(--brand-soft);
    color: var(--brand);
    box-shadow: inset 3px 0 0 var(--brand)
}

.admin-nav a.active i {
    color: var(--brand)
}

.admin-nav hr {
    margin: .6rem .85rem;
    border-color: var(--border)
}

.admin-main {
    flex: 1;
    min-width: 0
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(16, 28, 51, .04)
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem
}

.admin-content {
    padding: 1.75rem
}

.stat-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s, transform .15s
}

a.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: #d7e0f2
}

.stat-card .icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex: 0 0 auto
}

.stat-card .num {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -.01em
}

.stat-card .label {
    font-size: .8rem;
    color: var(--muted)
}

/* ---------- Login page ---------- */
.login-card {
    width: 100%;
    max-width: 380px;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(1, 30, 90, .35);
    border: 0
}

.login-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    margin: 0 auto 1rem
}

body.login-body input.form-control {
    border-radius: 10px;
    padding: .65rem .9rem
}

.btn-login {
    background: var(--brand);
    border: 0;
    font-weight: 700;
    border-radius: 10px;
    padding: .7rem;
    color: #fff
}

.btn-login:hover {
    background: var(--brand-dark);
    color: #fff
}

/* ---------- Site Settings tabs ---------- */
.settings-tabs {
    gap: .4rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: .75rem
}

.settings-tabs .nav-link {
    color: var(--muted);
    font-weight: 600;
    font-size: .88rem;
    border-radius: 8px;
    padding: .5rem .9rem
}

.settings-tabs .nav-link:hover {
    background: var(--soft);
    color: var(--teal)
}

.settings-tabs .nav-link.active {
    background: var(--teal);
    color: #fff
}

/* ---------- Sticky footer bar live preview (admin) ---------- */
.sticky-bar-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-radius: 10px;
    padding: .85rem 1.25rem;
    background: #0b1830;
    color: #fff;
    font-weight: 600
}

.sticky-bar-preview-btn {
    border: 0;
    border-radius: 8px;
    padding: .45rem 1.1rem;
    font-weight: 700;
    color: #fff;
    background: var(--teal);
    white-space: nowrap
}

/* ---------- Media Library ---------- */
.dropzone-area {
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: var(--soft);
    cursor: pointer;
    transition: .15s
}

.dropzone-area.dragover {
    border-color: var(--brand);
    background: var(--brand-soft)
}

.media-tile img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    background: #f2f2f8
}

/* ---------- "Choose from media" picker modal ---------- */
.media-picker-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden
}

.media-picker-item:hover {
    border-color: var(--brand)
}

.media-picker-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block
}

/* ---------- Repeater rows (fund managers/holdings/FAQs, article FAQs) ---------- */
.repeater-row {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .9rem 1rem 1rem;
    margin-bottom: .75rem;
    background: var(--soft);
    transition: .12s
}

.repeater-row:hover {
    border-color: #c7d3e8
}

.repeater-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .65rem
}

.repeater-index {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted)
}

.repeater-remove {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: #c0304a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    line-height: 1;
    padding: 0;
    transition: .12s
}

.repeater-remove:hover {
    background: #fdecef;
    border-color: #f3c1cb;
    color: #a3273f
}

.repeater-field-label {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .3rem
}

.repeater-empty {
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: .75rem
}

.repeater-add-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1.5px dashed var(--border);
    background: #fff;
    color: var(--brand);
    font-weight: 600;
    font-size: .85rem;
    border-radius: 10px;
    padding: .5rem 1.1rem;
    transition: .12s
}

.repeater-add-btn:hover {
    border-color: var(--brand);
    border-style: solid;
    background: var(--brand-soft)
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media(max-width:991px) {
    .header-search {
        display: none
    }
}

@media(max-width:900px) {
    .admin-sidebar {
        position: fixed;
        left: -230px;
        z-index: 1040;
        transition: .2s;
        box-shadow: 0 0 30px rgba(0, 0, 0, .2)
    }

    .admin-sidebar.open {
        left: 0
    }

    .admin-content {
        padding: 1.1rem
    }
}

/* ==========================================================================
   Public-site refresh: calm, fund-first investing experience
   ========================================================================== */

body.site-body {
    background: var(--page-bg);
    letter-spacing: -.003em
}

.site-main {
    min-height: calc(100vh - 76px)
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -4rem;
    z-index: 1100;
    background: var(--ink);
    color: #fff !important;
    padding: .65rem 1rem;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
    font-weight: 700;
    transition: top .15s
}

.skip-link:focus {
    top: 0
}

.site-header {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(16, 28, 51, .02);
    backdrop-filter: blur(10px)
}

.site-header .navbar {
    min-height: 76px;
    padding: .65rem 0
}

.brand-mark {
    color: var(--ink) !important;
    font-size: 1.15rem;
    letter-spacing: -.03em
}

.brand-mark .badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--brand);
    font-size: .95rem
}

.header-nav {
    gap: .15rem
}

.header-nav-link {
    color: var(--text);
    font-size: .88rem;
    font-weight: 650;
    padding: .55rem .8rem !important;
    border-radius: 8px
}

.header-nav-link:hover {
    color: var(--brand);
    background: var(--brand-soft)
}

.header-nav-link.active {
    color: var(--brand);
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--brand)
}

.header-nav .dropdown-menu {
    min-width: 200px;
    padding: .4rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(16, 28, 51, .1)
}

.header-nav .dropdown-item {
    padding: .55rem .75rem;
    border-radius: 8px;
    color: var(--text);
    font-size: .86rem;
    font-weight: 600
}

.header-nav .dropdown-item:hover,
.header-nav .dropdown-item:focus {
    background: var(--brand-soft);
    color: var(--brand)
}

.header-nav .dropdown-item.active {
    background: var(--brand-soft);
    color: var(--brand)
}

.header-nav .dropdown-menu-mega {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .15rem;
    min-width: 340px;
    max-width: 640px;
    padding: .6rem
}

@media(max-width:991px) {
    .header-nav .dropdown-menu-mega {
        grid-template-columns: 1fr;
        min-width: 0;
        max-width: none
    }
}

.header-search input {
    min-width: 190px;
    background: var(--soft);
    border-color: transparent;
    padding-top: .55rem;
    padding-bottom: .55rem
}

.header-search input:focus {
    border-color: #b7ddd3
}

.btn-header-cta {
    background: var(--teal);
    padding: .62rem 1.05rem;
    box-shadow: 0 3px 10px rgba(20, 108, 92, .16)
}

.btn-header-cta:hover {
    background: var(--teal-dark)
}

.investment-hero {
    position: relative;
    overflow: hidden;
    background: #11283e;
    border-radius: 28px;
    padding: clamp(2rem, 5vw, 4.25rem);
    isolation: isolate
}

.investment-hero::before,
.investment-hero::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(160, 225, 202, .16);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none
}

.investment-hero::before {
    width: 510px;
    height: 510px;
    right: -220px;
    top: -285px
}

.investment-hero::after {
    width: 360px;
    height: 360px;
    right: 7%;
    bottom: -290px
}

.investment-hero h1 {
    max-width: 700px;
    margin: 0 0 1rem;
    color: #fff !important;
    font-size: clamp(2.15rem, 4.3vw, 4.1rem);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -.045em
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    color: #b8dfd3;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(39, 190, 135, .16)
}

.hero-copy {
    max-width: 590px;
    color: #c5d1df;
    font-size: 1.02rem;
    line-height: 1.7
}

.fund-finder {
    display: flex;
    align-items: center;
    max-width: 660px;
    min-height: 61px;
    padding: 6px 7px 6px 1.1rem;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 15px;
    box-shadow: 0 14px 28px rgba(2, 15, 30, .16)
}

.fund-finder>i {
    margin-right: .8rem;
    color: var(--muted)
}

.fund-finder input {
    flex: 1;
    min-width: 0;
    height: 45px;
    border: 0;
    outline: 0;
    color: var(--ink);
    font-size: .95rem;
    background: transparent
}

.fund-finder input::placeholder {
    color: #8b96a5
}

.fund-finder button {
    height: 47px;
    border: 0;
    border-radius: 10px;
    padding: 0 1.05rem;
    background: var(--brand);
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color .15s, transform .15s
}

.fund-finder button:hover {
    background: var(--brand-dark);
    transform: translateY(-1px)
}

.fund-finder button i {
    margin-left: .35rem;
    font-size: .78rem
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem
}

.hero-actions .btn-primary {
    padding: .67rem 1.2rem;
    background: var(--teal);
    border-color: var(--teal);
    box-shadow: 0 5px 14px rgba(39, 190, 135, .22)
}

.hero-actions .btn-primary:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark)
}

.hero-text-link {
    color: #d7f2e8 !important;
    font-size: .88rem;
    font-weight: 650;
    text-decoration: none
}

.hero-text-link:hover {
    color: #fff !important;
    text-decoration: underline
}

.hero-text-link i {
    font-size: .7rem;
    margin-left: .25rem
}

.research-panel {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 20px;
    color: var(--ink);
    box-shadow: 0 18px 35px rgba(2, 15, 30, .17)
}

.research-panel-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start
}

.overline {
    display: block;
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase
}

.research-title {
    max-width: 220px;
    font-weight: 750;
    font-size: 1.14rem;
    line-height: 1.25;
    letter-spacing: -.025em
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    background: var(--teal-soft);
    padding: .4rem .65rem;
    color: var(--teal-dark);
    font-size: .7rem;
    font-weight: 750;
    white-space: nowrap
}

.research-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .65rem;
    margin: 1.35rem 0;
    padding: .95rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border)
}

.research-stats div {
    min-width: 0;
    padding-right: .55rem;
    border-right: 1px solid var(--border)
}

.research-stats div:last-child {
    padding-right: 0;
    border: 0
}

.research-stats strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -.04em
}

.research-stats span {
    display: block;
    margin-top: .35rem;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.25
}

.data-pulse {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    color: var(--text);
    font-size: .77rem;
    line-height: 1.55
}

.data-pulse strong {
    color: var(--ink)
}

.pulse-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand)
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem
}

.section-heading h2 {
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -.03em
}

.section-heading>p {
    max-width: 340px;
    color: var(--muted);
    font-size: .84rem;
    text-align: right
}

.section-kicker {
    display: block;
    margin-bottom: .3rem;
    color: var(--teal-dark);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase
}

.section-link {
    color: var(--teal-dark) !important;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap
}

.section-link:hover {
    text-decoration: underline
}

.section-link i {
    margin-left: .3rem;
    font-size: .72rem
}

.quick-actions .feature-card {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 1.35rem 1.2rem 1.5rem;
    border-radius: 16px;
    text-align: left;
    color: inherit;
    text-decoration: none;
    box-shadow: none
}

.quick-actions .feature-card:hover {
    border-color: #bdded5;
    box-shadow: 0 10px 24px rgba(16, 28, 51, .08);
    transform: translateY(-3px)
}

.quick-actions .feature-icon {
    width: 42px;
    height: 42px;
    margin: 0 0 1rem;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: none
}

.feature-icon.icon-blue {
    background: #eaf1ff;
    color: #3165be
}

.feature-icon.icon-green {
    background: #e7f8ee;
    color: #14845d
}

.feature-icon.icon-violet {
    background: #f0edff;
    color: #6553bb
}

.feature-icon.icon-amber {
    background: #fff4de;
    color: #ba7b1e
}

.card-arrow {
    position: absolute;
    right: 1.1rem;
    bottom: 1.1rem;
    color: var(--brand);
    font-size: .8rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: .15s
}

.feature-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0)
}

.amc-card {
    position: relative;
    padding: 1.2rem;
    border-radius: 16px;
    box-shadow: none
}

.amc-card:hover {
    border-color: #add9cc;
    box-shadow: 0 10px 22px rgba(16, 28, 51, .07);
    transform: translateY(-2px)
}

.amc-logo {
    width: 45px;
    height: 45px;
    background: var(--brand-soft);
    color: var(--brand)
}

.amc-card-arrow {
    position: absolute;
    right: 1.15rem;
    bottom: 1.25rem;
    color: var(--brand);
    font-size: .75rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: .15s
}

.amc-card:hover .amc-card-arrow {
    opacity: 1;
    transform: translateX(0)
}

.site-footer {
    background: #FFFFFF;
    color: #536177;
    margin-top: 5rem;
    border-top: 1px solid var(--border);
}

.site-footer a {
    color: #e8edf7
}

.site-footer a:hover {
    color: #029677
}

.site-footer .footer-brand .badge-icon {
    background: #029677
}

.footer-bottom {
    color: #536177;
}

@media(max-width:991px) {
    .site-header .navbar {
        min-height: 68px
    }

    .header-nav {
        padding-top: .65rem;
        border-top: 1px solid var(--border)
    }

    .header-nav-link.active {
        box-shadow: none;
        background: var(--brand-soft)
    }

    .header-actions {
        padding: .8rem 0 .2rem
    }
}

@media(max-width:767px) {
    .site-main .container {
        padding-top: 1.25rem !important
    }

    .investment-hero {
        margin-left: -.25rem;
        margin-right: -.25rem;
        border-radius: 20px;
        padding: 1.65rem
    }

    .investment-hero h1 {
        font-size: 2.18rem
    }

    .hero-copy {
        font-size: .92rem
    }

    .fund-finder {
        min-height: 56px;
        padding-left: .9rem;
        border-radius: 13px
    }

    .fund-finder button {
        height: 43px;
        padding: 0 .8rem
    }

    .fund-finder button i {
        display: none
    }

    .research-panel {
        padding: 1.2rem
    }

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

    .section-heading>p {
        max-width: none;
        text-align: left
    }

    .quick-actions .feature-card {
        padding: 1.05rem .9rem 1.35rem
    }

    .quick-actions .feature-icon {
        margin-bottom: .75rem
    }

    .quick-actions .small {
        font-size: .75rem
    }

    .site-footer {
        margin-top: 3rem
    }
}

@media(max-width:390px) {
    .investment-hero {
        padding: 1.35rem
    }

    .investment-hero h1 {
        font-size: 1.95rem
    }

    .research-stats strong {
        font-size: 1.05rem
    }
}

/* ========================================================================== 
   Full-site page and workspace system
   ========================================================================== */
body.site-body .card {
    border-color: var(--border);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(16, 28, 51, .025), 0 5px 14px rgba(16, 28, 51, .025)
}

body.site-body .card:hover {
    box-shadow: 0 10px 26px rgba(16, 28, 51, .055)
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600
}

.page-breadcrumb a {
    color: var(--muted) !important
}

.page-breadcrumb a:hover {
    color: var(--brand) !important
}

.page-heading {
    max-width: 720px
}

.page-heading h1,
.article-header h1,
.calculator-page-header h1,
.fund-detail-hero h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.45rem, 3.2vw, 2.25rem);
    font-weight: 770;
    line-height: 1.15;
    letter-spacing: -.04em
}

.page-heading p {
    max-width: 620px;
    margin: .7rem 0 0;
    color: var(--muted);
    font-size: .98rem;
    line-height: 1.65
}

.page-heading-compact {
    max-width: 650px
}

.section-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 1rem;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 750;
    letter-spacing: -.025em
}

.section-title>i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .78rem
}

.section-block {
    scroll-margin-top: 6rem
}

.content-surface {
    line-height: 1.82
}

.content-surface p:last-child {
    margin-bottom: 0
}

.directory-search {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
    padding: 5px 5px 5px 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: 0 3px 10px rgba(16, 28, 51, .03)
}

.directory-search i {
    color: var(--muted);
    font-size: .84rem
}

.directory-search input {
    flex: 1;
    min-width: 0;
    height: 41px;
    border: 0;
    outline: 0;
    padding: 0 .8rem;
    background: transparent;
    color: var(--ink);
    font-size: .9rem
}

.directory-search button {
    height: 39px;
    border: 0;
    border-radius: 9px;
    padding: 0 .9rem;
    background: var(--brand);
    color: #fff;
    font-size: .8rem;
    font-weight: 700
}

.directory-search button:hover {
    background: var(--brand-dark)
}

.directory-amc-card {
    min-height: 154px
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 0 1.55rem;
    border-bottom: 1px solid var(--border)
}

.profile-header h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.7rem, 2.7vw, 2.35rem);
    font-weight: 760;
    letter-spacing: -.04em
}

.profile-header .badge-soft,
.profile-header .badge-soft-green {
    font-size: .73rem
}

.profile-header-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap
}

.profile-header-actions .btn {
    font-size: .8rem;
    white-space: nowrap
}

.fund-row {
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    transition: background .15s, padding .15s
}

.fund-row:hover {
    padding-left: 1.4rem;
    background: #f7fbfa
}

.fund-row-icon {
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand)
}

.scheme-search input {
    background: #fff
}

.fund-detail-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 3vw, 2.25rem);
    border: 1px solid #cce5dc;
    border-radius: 20px;
    background: #eff9f5
}

.fund-detail-hero::after {
    content: "";
    position: absolute;
    right: -95px;
    top: -150px;
    width: 370px;
    height: 370px;
    border: 46px solid rgba(20, 108, 92, .07);
    border-radius: 50%;
    pointer-events: none
}

.fund-detail-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.8rem, 3.4vw, 2.22rem);
    line-height: 1.14
}

.fund-detail-hero .section-kicker,
.fund-detail-subtitle,
.fund-detail-hero .d-flex {
    position: relative;
    z-index: 1
}

.fund-detail-subtitle {
    font-size: .87rem
}

.fund-detail-hero .badge-soft,
.fund-detail-hero .badge-soft-green {
    font-size: .73rem;
    background: #fff
}

.fund-header-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 1.6rem;
    border: 1px solid #d6ebe4;
    border-radius: 13px;
    background: rgba(255, 255, 255, .83);
    backdrop-filter: blur(6px)
}

.fund-header-stats>div {
    min-width: 0;
    padding: 1rem 1.1rem;
    border-right: 1px solid #dcebe6
}

.fund-header-stats>div:last-child {
    border-right: 0
}

.fund-header-stats span,
.fund-header-stats small {
    display: block;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 650;
    line-height: 1.35
}

.fund-header-stats span {
    margin-bottom: .32rem;
    letter-spacing: .055em;
    text-transform: uppercase
}

.fund-header-stats strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 760;
    letter-spacing: -.035em;
    text-overflow: ellipsis;
    /*white-space: nowrap;*/
}

.fund-header-stats small {
    margin-top: .32rem;
    font-weight: 500
}

.fund-metric {
    position: relative;
    overflow: hidden;
    border-radius: 15px !important
}

.fund-metric::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-soft)
}

.fund-metric:nth-child(2)::before {
    background: #bfe8d9
}

.fund-metric:nth-child(3)::before {
    background: #dae5ff
}

.fund-metric:nth-child(4)::before {
    background: #eadcff
}

.stat .label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase
}

.stat .value {
    font-size: 1.35rem
}

.chart-wrap {
    padding: 1.4rem 1.4rem .45rem
}

.range-buttons {
    padding: .8rem 1.4rem 1.3rem
}

.range-buttons button {
    font-size: .8rem
}

.info-item {
    padding: 1.15rem
}

.info-item:nth-child(3n+2) {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border)
}

.lead-form {
    padding-top: .25rem
}

.lead-form .btn-submit {
    border-radius: 999px;
    background: var(--brand);
    font-size: .9rem
}

.lead-form .btn-submit:hover {
    background: var(--brand-dark)
}

.sidebar-sticky .card:first-child {
    border-color: #c4e4d9
}

.holdings-bar {
    height: 7px;
    background: #edf1f4
}

.holdings-bar span {
    background: var(--brand)
}

.accordion-item {
    overflow: hidden;
    margin-bottom: .65rem;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    box-shadow: none !important
}

.accordion-button {
    padding: 1rem 1.15rem;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 700;
    box-shadow: none !important
}

.accordion-button:not(.collapsed) {
    background: var(--brand-soft);
    color: var(--brand)
}

.accordion-body {
    padding: 1rem 1.15rem;
    background: #fff;
    line-height: 1.7
}

.archive-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 4.2vw, 3.3rem);
    border: 1px solid #cfe9df;
    border-radius: 22px;
    background: #eef9f5
}

.archive-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 330px;
    height: 330px;
    border: 42px solid rgba(20, 108, 92, .08);
    border-radius: 50%;
    pointer-events: none
}

.archive-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 670px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 3.8vw, 3.25rem);
    font-weight: 770;
    letter-spacing: -.045em;
    line-height: 1.1
}

.archive-hero p {
    position: relative;
    z-index: 1;
    max-width: 590px;
    margin: .8rem 0 1.2rem;
    color: var(--text);
    line-height: 1.65
}

.archive-hero-meta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .45rem .75rem;
    background: #fff;
    color: var(--brand);
    font-size: .75rem;
    font-weight: 700
}

.calc-card {
    border-radius: 16px;
    box-shadow: none
}

.calc-card:hover {
    border-color: #a7d9ca;
    box-shadow: 0 12px 24px rgba(16, 28, 51, .07)
}

.calc-card .feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    box-shadow: none
}

.calc-card-badge {
    background: var(--teal-soft);
    color: var(--teal-dark)
}

.calculator-page-header {
    padding: 1.3rem 0 1.55rem;
    border-bottom: 1px solid var(--border)
}

.calculator-page-header .calc-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(20, 108, 92, .18)
}

.calculator-page-header .section-kicker {
    margin-bottom: .25rem
}

.calculator-page-header h1 {
    font-size: clamp(1.65rem, 2.8vw, 2.35rem)
}

.calc-widget .card,
.calc-result-box {
    border-radius: 16px !important
}

.calc-result-box {
    background: var(--brand-soft)
}

.calc-result-box .big {
    color: var(--brand-dark)
}

.article-card {
    position: relative;
    overflow: hidden;
    transition: transform .16s, border-color .16s, box-shadow .16s
}

.article-card:hover {
    border-color: #bfe1d5 !important;
    transform: translateY(-3px)
}

.article-card-image {
    display: block;
    width: 100%;
    height: 225px;
    object-fit: fill;
    border-radius: 12px
}

.article-card-label {
    display: block;
    margin-bottom: .45rem;
    color: var(--brand);
    font-size: .69rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase
}

.article-card .fw-semibold {
    font-size: 1rem;
    line-height: 1.4
}

.article-card-link {
    display: block;
    margin-top: 1rem;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 750
}

.article-card-link i {
    margin-left: .25rem;
    font-size: .7rem;
    transition: transform .15s
}

.article-card:hover .article-card-link i {
    transform: translateX(3px)
}

.not-found-page {
    padding: 3rem 1rem 4rem
}

.not-found-code {
    margin-bottom: .4rem;
    color: var(--brand);
    font-size: clamp(4.5rem, 12vw, 7rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em
}

.not-found-search {
    display: flex;
    max-width: 520px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm)
}

.not-found-search input {
    flex: 1;
    min-height: 50px;
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    padding: 0 1rem;
    font-size: .92rem
}

.not-found-search input:focus {
    outline: 0;
    box-shadow: none
}

.not-found-search button {
    border-radius: 0 12px 12px 0;
    padding: 0 1.4rem;
    font-weight: 700
}

.not-found-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem
}

.not-found-links a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 650;
    font-size: .86rem;
    text-decoration: none;
    transition: .15s
}

.not-found-links a:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand)
}

.article-header {
    max-width: 820px
}

.article-header h1 {
    font-size: clamp(2rem, 4vw, 2.25rem)
}

.article-featured-image {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: fill;
    border-radius: 20px
}

.article-content {
    max-width: 850px;
    padding: clamp(1.3rem, 3vw, 2.4rem) !important;
    line-height: 1.85
}

.article-content h2 {
    margin: 1.8rem 0 .7rem;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 760;
    letter-spacing: -.025em
}

.article-content h3 {
    margin: 1.3rem 0 .6rem;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 750
}

.article-content p,
.article-content li {
    color: var(--text)
}

.article-content a {
    color: var(--brand);
    font-weight: 650
}

/* Admin workspace */
body.admin-body {
    background: #f5f7f9;
    color: var(--text)
}

.admin-shell {
    min-height: 100vh
}

.admin-sidebar {
    width: 262px;
    flex-basis: 262px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 0;
    box-shadow: none
}

.admin-sidebar .brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1.35rem 1.25rem 1.45rem;
    color: #fff
}

.admin-sidebar .brand-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: #ffffff;
    font-size: .92rem
}

.admin-sidebar .brand strong {
    display: block;
    font-size: .94rem;
    letter-spacing: -.02em;
    color: #101c33;
}

.admin-sidebar .brand small {
    display: block;
    margin-top: .08rem;
    color: #91a7b6;
    font-size: .68rem;
    font-weight: 500
}

.admin-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: .15rem .75rem .85rem
}

.admin-nav-label {
    margin: 1.1rem .7rem .4rem;
    color: #7890a1;
    font-size: .64rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase
}

.admin-nav a {
    gap: .7rem;
    margin: 0 0 .16rem;
    padding: .68rem .78rem;
    border-radius: 9px;
    color: #101c33;
    font-size: .84rem;
    font-weight: 600
}

.admin-nav a i {
    width: 18px;
    color: #101c33;
    font-size: .82rem
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, .07);
    color: #146c5c
}

.admin-nav a:hover i {
    color: #146c5c
}

.admin-nav a.active {
    background: rgba(79, 189, 142, .16);
    box-shadow: inset 2px 0 0 var(--teal);
    color: #146c5c
}

.admin-nav a.active i {
    color: #6dd8ad
}

.admin-nav-bottom {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .09)
}

.admin-topbar {
    min-height: 72px;
    padding: .85rem 2rem;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    box-shadow: none
}

.admin-topbar-title>span {
    display: block;
    margin-bottom: .08rem;
    color: var(--muted);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase
}

.admin-topbar-title h1 {
    margin: 0;
    color: var(--ink);
    font-size: .98rem;
    font-weight: 750;
    letter-spacing: -.02em
}

.admin-site-link {
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .4rem .65rem;
    color: var(--text);
    font-size: .74rem;
    font-weight: 700;
    text-decoration: none
}

.admin-site-link:hover {
    border-color: #bcded4;
    color: var(--brand)
}

.admin-avatar {
    width: 34px;
    height: 34px;
    background: var(--brand);
    font-size: .78rem
}

.admin-content {
    max-width: 1550px;
    padding: 2rem;
    margin: 0 auto
}

.admin-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem
}

.admin-page-header>div>span,
.admin-panel-heading span {
    display: block;
    margin-bottom: .28rem;
    color: var(--brand);
    font-size: .66rem;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase
}

.admin-page-header h1 {
    margin: 0;
    color: var(--ink);
    font-size: 1.6rem;
    font-weight: 770;
    letter-spacing: -.04em
}

.admin-page-header p {
    max-width: 680px;
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.55
}

.admin-page-header .btn {
    flex: 0 0 auto
}

body.admin-body .card {
    border-color: var(--border);
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(16, 28, 51, .025)
}

body.admin-body .card:hover {
    box-shadow: 0 8px 20px rgba(16, 28, 51, .045)
}

body.admin-body .form-label {
    margin-bottom: .38rem;
    color: var(--text);
    font-size: .74rem !important;
    font-weight: 750 !important;
    letter-spacing: .02em
}

body.admin-body .form-control,
body.admin-body .form-select {
    min-height: 41px;
    border-color: #dce4ea;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font-size: .88rem
}

body.admin-body textarea.form-control {
    min-height: auto
}

body.admin-body .form-control:focus,
body.admin-body .form-select:focus {
    border-color: #92cdbc !important;
    box-shadow: 0 0 0 .16rem rgba(20, 108, 92, .10) !important
}

body.admin-body .input-group-text {
    border-color: #dce4ea;
    background: #fff;
    color: var(--muted)
}

body.admin-body .table thead th {
    padding: .92rem 1rem;
    background: #f7f9fa;
    color: var(--muted);
    font-size: .67rem
}

body.admin-body .table td {
    padding: .95rem 1rem;
    font-size: .86rem
}

body.admin-body .table tbody tr:hover {
    background: #f7fbfa
}

body.admin-body .btn-primary {
    background: var(--teal);
    border-color: var(--teal);
    box-shadow: 0 4px 10px rgba(20, 108, 92, .15)
}

body.admin-body .btn-primary:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark)
}

body.admin-body .btn-outline-secondary {
    background: #fff;
    border-color: #d6e0e5;
    color: var(--text)
}

body.admin-body .btn-outline-secondary:hover {
    background: var(--brand-soft);
    border-color: #a9d8c9;
    color: var(--brand)
}

.admin-search {
    max-width: 440px
}

.admin-search .input-group {
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(16, 28, 51, .025)
}

.admin-search .form-control {
    border-left: 0
}

.admin-form-section {
    position: relative;
    overflow: hidden
}

.admin-form-section>h2 {
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--border);
    font-size: .94rem !important
}

.admin-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.15rem
}

.admin-panel-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -.02em
}

.admin-panel-heading>i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .82rem
}

.stat-card {
    min-height: 92px;
    border-radius: 14px !important
}

.stat-card .icon {
    border-radius: 11px
}

.dropzone-area {
    border-color: #b9d9cf;
    background: #f8fcfa
}

.dropzone-area:hover,
.dropzone-area.dragover {
    border-color: var(--brand);
    background: var(--brand-soft)
}

.media-tile {
    overflow: hidden
}

.media-tile img {
    height: 130px
}

.settings-tabs {
    gap: .3rem;
    border: 0;
    padding: 0
}

.settings-tabs .nav-link {
    border: 1px solid transparent;
    background: transparent
}

.settings-tabs .nav-link.active {
    background: var(--teal);
    box-shadow: 0 3px 8px rgba(20, 108, 92, .14)
}

.settings-tabs .nav-link:hover {
    border-color: #cde5dd;
    background: #e6fff9;
}

.settings-tabs .nav-link.active:hover {
    background: var(--teal);
    color: #fff
}

.admin-sidebar-backdrop {
    display: none
}

/* Password show/hide toggle - see public/assets/js/password-toggle.js */
.pw-field-wrap {
    position: relative
}

.pw-field-wrap input {
    padding-right: 2.6rem !important
}

.pw-toggle {
    position: absolute;
    top: 50%;
    right: .65rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: .86rem;
    cursor: pointer
}

.pw-toggle:hover {
    color: var(--brand)
}

.pw-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-radius: 4px
}

/* Admin form-error popup - see admin/layout.php. Same visual language as
   errors/popup.php (the site-wide error page), scaled down into a
   dismissible modal since this appears over a form the admin is still
   filling in (inputs are preserved via withInput()). */
.admin-error-popup-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(11, 24, 48, .5);
    align-items: center;
    justify-content: center;
    padding: 1.5rem
}

.admin-error-popup-backdrop.show {
    display: flex
}

.admin-error-popup {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3)
}

.admin-error-popup-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #fdeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 1.3rem
}

.admin-error-popup h2 {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.02em
}

.admin-error-popup p {
    margin: 0 0 1.3rem;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.6;
    word-break: break-word
}

.admin-error-popup .btn {
    border-radius: 999px;
    padding: .6rem 1.6rem
}

/* Header/footer menu builder - see Admin\Menus and admin/menus/index.php */
.menu-builder-intro {
    margin-bottom: 1.15rem;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.6
}

.menu-builder-intro strong {
    color: var(--ink)
}

.menu-item-group {
    margin-bottom: .7rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden
}

.menu-item-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1rem;
    background: #fff
}

.menu-item-row+.menu-item-row {
    border-top: 1px solid var(--border)
}

.menu-item-row.is-child {
    padding-left: 2.5rem;
    background: #fafbfd
}

.menu-item-tree-glyph {
    margin-right: .15rem;
    color: var(--muted);
    font-size: .9rem
}

.menu-item-main {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: baseline;
    gap: .6rem;
    flex-wrap: wrap
}

.menu-item-label {
    color: var(--ink);
    font-size: .9rem;
    font-weight: 750
}

.menu-item-url {
    overflow: hidden;
    color: var(--muted);
    font-size: .78rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 32ch
}

.menu-item-badge {
    flex: 0 0 auto;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .66rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em
}

.menu-item-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .3rem
}

.menu-item-actions .btn {
    padding: .32rem .6rem;
    font-size: .76rem
}

.menu-item-move {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0 !important
}

.menu-empty-note {
    padding: 1.3rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
    font-size: .85rem;
    text-align: center
}

.menu-builder-form {
    margin-top: 1.1rem;
    padding: 1.15rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--soft)
}

.menu-builder-form-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 750
}

@media(max-width:640px) {
    .menu-item-row {
        flex-wrap: wrap
    }

    .menu-item-actions {
        width: 100%;
        justify-content: flex-end
    }
}

/* Admin list pagination - shared by Funds / Leads / Media / any other
   paginated admin index, via app/Views/admin/partials/pager.php. */
.admin-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.15rem
}

.admin-pager-info,
.admin-pager-info-solo {
    color: var(--muted);
    font-size: .82rem
}

.admin-pager-info strong,
.admin-pager-info-solo strong {
    color: var(--ink);
    font-weight: 750
}

.admin-pager-info-solo {
    display: block;
    margin-top: 1.15rem
}

.admin-pager-list {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin: 0;
    padding: 0;
    list-style: none
}

.admin-pager-btn,
.admin-pager-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 .55rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .12s, border-color .12s, color .12s
}

.admin-pager-btn:hover,
.admin-pager-num:hover {
    border-color: #a9d8c9;
    background: var(--brand-soft);
    color: var(--brand)
}

.admin-pager-btn.disabled {
    opacity: .4;
    pointer-events: none;
    cursor: default
}

.admin-pager-num.active,
.admin-pager-num.active:hover {
    border-color: var(--brand);
    border-radius: 999px;
    background: var(--brand);
    color: #fff
}

.admin-pager-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 34px;
    color: var(--muted);
    font-size: .82rem
}

@media(max-width:575px) {
    .admin-pager {
        justify-content: center
    }

    .admin-pager-info {
        order: 2;
        width: 100%;
        text-align: center
    }
}

body.login-body {
    background: #102236;
    padding: 1rem
}

.login-card {
    max-width: 410px;
    padding: 2.2rem !important;
    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 20px !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .26) !important
}

.login-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 2.1rem;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 780;
    letter-spacing: -.03em
}

.login-badge {
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 10px;
    font-size: .85rem
}

.login-card h1 {
    color: var(--ink)
}

.btn-login {
    border-radius: 10px;
    background: var(--brand);
    padding: .72rem
}

.btn-login:hover {
    background: var(--brand-dark)
}

@media(max-width:991px) {
    .info-item:nth-child(3n+2) {
        border-right: 0
    }

    .admin-sidebar {
        left: -262px;
        width: 262px;
        transition: left .2s ease
    }

    .admin-sidebar.open {
        left: 0
    }

    .admin-sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1035;
        width: 100%;
        height: 100%;
        border: 0;
        background: rgba(3, 15, 24, .35)
    }
}

@media(max-width:767px) {

    .page-heading h1,
    .article-header h1,
    .calculator-page-header h1,
    .fund-detail-hero h1 {
        font-size: 1.9rem
    }

    .profile-header {
        align-items: flex-start;
        flex-direction: column;
        padding-top: .5rem
    }

    .profile-header h1 {
        font-size: 1.8rem
    }

    .profile-header-actions {
        width: 100%
    }

    .profile-header-actions .btn {
        flex: 1 1 auto
    }

    .fund-detail-hero {
        padding: 1.35rem;
        border-radius: 16px
    }

    .fund-header-stats {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 1.2rem
    }

    .fund-header-stats>div {
        padding: .85rem;
        border-bottom: 1px solid #dcebe6
    }

    .fund-header-stats>div:nth-child(2n) {
        border-right: 0
    }

    .fund-header-stats>div:nth-last-child(-n+2) {
        border-bottom: 0
    }

    .info-item:nth-child(even) {
        border-left: 1px solid var(--border);
        border-right: 0
    }

    .info-item:nth-child(odd) {
        border-left: 0
    }

    .archive-hero {
        padding: 1.5rem
    }

    .article-card-image {
        height: 145px
    }

    .article-featured-image {
        border-radius: 14px
    }

    .admin-topbar {
        min-height: 62px;
        padding: .7rem 1rem
    }

    .admin-content {
        padding: 1.25rem 1rem
    }

    .admin-page-header {
        align-items: flex-start;
        flex-direction: column
    }

    .admin-page-header h1 {
        font-size: 1.42rem
    }

    .admin-page-header .btn {
        width: 100%;
        justify-content: center
    }

    .admin-page-header .d-flex {
        width: 100%;
        flex-wrap: wrap
    }

    .admin-page-header .d-flex .btn {
        flex: 1 1 auto
    }

    .admin-form-section {
        padding: 1.1rem !important
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 5px;
    border-radius: 34px;
    background: #edeef2;
}

::-webkit-scrollbar-thumb {
    background-color: #146c5c;
    border-radius: 34px;
}

::-webkit-scrollbar-track {
    border-radius: 30px;
    background: #edeef2;
}