:root {
    --ert-primary: #2563eb;
    --ert-primary-dark: #1d4ed8;
    --ert-navy: #0f172a;
    --ert-ink: #172033;
    --ert-muted: #64748b;
    --ert-line: #e2e8f0;
    --ert-soft: #f6f8fc;
    --ert-card: #ffffff;
    --ert-green: #16a34a;
    --ert-amber: #f59e0b;
    --ert-radius: 24px;
    --ert-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}


body.dashboard-body {
    background: #f6f8fc;
    color: var(--ert-ink);
}

.dashboard-navbar {
    background: rgba(255,255,255,.96) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226,232,240,.95);
    box-shadow: 0 10px 34px rgba(15,23,42,.06);
}

.dashboard-navbar .navbar-brand .text-dark,
.dashboard-navbar .navbar-brand {
    color: var(--ert-navy) !important;
}

.dashboard-navbar .navbar-toggler {
    background: #eff6ff;
    border-radius: 14px;
}

.dashboard-navbar .nav-link {
    color: #334155 !important;
    font-size: .88rem;
    font-weight: 750;
    border-radius: 999px;
    padding: .58rem .85rem !important;
    white-space: nowrap;
}

.dashboard-navbar .nav-link:hover,
.dashboard-navbar .nav-link.active {
    color: var(--ert-primary) !important;
    background: #eff6ff;
}

.dashboard-navbar .nav-link.dropdown-toggle.bg-light {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

.dashboard-navbar .dropdown-menu {
    border: 1px solid #edf2f7;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15,23,42,.14);
    padding: .55rem;
}

.dashboard-navbar .dropdown-item {
    border-radius: 12px;
    font-weight: 650;
    font-size: .88rem;
    padding: .68rem .85rem;
}

body.public-body {
    background: #f8fafc;
    color: var(--ert-ink);
}

.public-navbar {
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 8px 30px rgba(15,23,42,.04);
}

.public-navbar .navbar-brand {
    font-size: 1.25rem;
    letter-spacing: -.04em;
}

.public-navbar .nav-link {
    color: #334155 !important;
    font-size: .88rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .58rem .85rem !important;
    white-space: nowrap;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: var(--ert-primary) !important;
    background: #eff6ff;
}

.public-navbar .dropdown-menu {
    border: 1px solid #edf2f7;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15,23,42,.14);
    padding: .55rem;
}

.public-navbar .dropdown-item {
    border-radius: 12px;
    font-weight: 650;
    font-size: .88rem;
    padding: .68rem .85rem;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ert-primary), #38bdf8);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37,99,235,.25);
}

.brand-logo-img { max-width: 142px; max-height: 42px; object-fit: contain; }

.public-main { padding-top: 0; padding-bottom: 0; }

.public-section { padding: 72px 0; }
.public-section-sm { padding: 44px 0; }

.public-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(37,99,235,.16), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(20,184,166,.14), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-bottom: 1px solid #e8eef8;
}

.public-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -42% -8%;
    height: 360px;
    background: radial-gradient(circle, rgba(37,99,235,.08), transparent 65%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid #bfdbfe;
    background: rgba(239,246,255,.9);
    color: var(--ert-primary-dark);
    padding: .5rem .85rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: .78rem;
}

.hero-title {
    font-weight: 900;
    letter-spacing: -.065em;
    line-height: 1.03;
    color: var(--ert-navy);
}

.hero-lead {
    color: #475569;
    font-size: 1.07rem;
    line-height: 1.75;
}

.text-gradient {
    background: linear-gradient(135deg, var(--ert-primary), #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.public-card {
    background: var(--ert-card);
    border: 1px solid rgba(226,232,240,.92);
    border-radius: var(--ert-radius);
    box-shadow: 0 12px 34px rgba(15,23,42,.055);
}

.public-card-hover {
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.public-card-hover:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: var(--ert-shadow);
}

.icon-tile {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: var(--ert-primary);
    font-size: 1.45rem;
}

.stat-pill {
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: 0 14px 34px rgba(15,23,42,.055);
}

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
    gap: 28px;
}

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

.news-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5edf6;
    border-radius: 24px;
    box-shadow: 0 12px 34px rgba(15,23,42,.06);
    height: 100%;
}

.news-card-featured {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    min-height: 360px;
}

.news-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #dbeafe;
}

.news-card-featured .news-img {
    height: 100%;
    min-height: 360px;
}

.news-kicker {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--ert-primary-dark);
    background: #eff6ff;
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .74rem;
    font-weight: 800;
}

.news-title {
    color: var(--ert-navy);
    letter-spacing: -.025em;
    line-height: 1.2;
}

.news-title a { color: inherit; text-decoration: none; }
.news-title a:hover { color: var(--ert-primary); }

.news-meta {
    color: var(--ert-muted);
    font-size: .82rem;
}

.sidebar-box {
    background: #fff;
    border: 1px solid #e5edf6;
    border-radius: 24px;
    box-shadow: 0 12px 34px rgba(15,23,42,.05);
}

.ad-box {
    border: 1px dashed #cbd5e1;
    background: linear-gradient(135deg, #f8fafc, #eef6ff);
    border-radius: 20px;
    min-height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-align: center;
    padding: 1rem;
}

.ad-box img { max-width: 100%; height: auto; border-radius: 16px; }

.article-shell {
    background: #fff;
    border: 1px solid #e5edf6;
    border-radius: 28px;
    box-shadow: 0 22px 70px rgba(15,23,42,.08);
    overflow: hidden;
}

.article-cover {
    width: 100%;
    height: min(52vw, 470px);
    object-fit: cover;
    background: #e0f2fe;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #243044;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--ert-navy);
    font-weight: 850;
    letter-spacing: -.025em;
    margin-top: 2rem;
}

.article-content img { max-width: 100%; height: auto; border-radius: 18px; }
.article-content blockquote {
    border-left: 4px solid var(--ert-primary);
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 0 16px 16px 0;
}

.install-panel {
    background: linear-gradient(135deg, #0f172a, #1e3a8a 60%, #0891b2);
    color: #fff;
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(15,23,42,.22);
    overflow: hidden;
}

.phone-frame {
    border: 10px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.1);
    border-radius: 34px;
    padding: 18px;
    max-width: 310px;
    margin-inline: auto;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.app-preview-card {
    background: rgba(255,255,255,.96);
    border-radius: 24px;
    color: #0f172a;
    padding: 18px;
}

.footer-link-managed { color: #fff; font-weight: 800; text-decoration: none; }
.footer-link-managed:hover { color: #bfdbfe; }

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

@media (max-width: 991.98px) {
    .public-navbar .navbar-collapse {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        padding: 1rem;
        margin-top: .85rem;
        box-shadow: 0 20px 55px rgba(15,23,42,.12);
    }
    .public-navbar .navbar-nav { align-items: stretch !important; }
    .public-navbar .nav-link { width: 100%; }
    .news-layout { grid-template-columns: 1fr; }
    .news-card-featured { grid-template-columns: 1fr; }
    .news-card-featured .news-img { height: 240px; min-height: auto; }
}

@media (max-width: 767.98px) {
    .public-section { padding: 52px 0; }
    .hero-title { font-size: 2.35rem; }
    .news-grid { grid-template-columns: 1fr; }
}


/* v11 Mobile polish, error pages, and Android/PWA comfort */
.error-section-v11 {
    width: min(100% - 28px, 980px);
    margin: 0 auto;
    padding: clamp(42px, 8vw, 96px) 0;
}
.error-card-v11 {
    position: relative;
    overflow: hidden;
    text-align: center;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(226,232,240,.95);
    border-radius: 34px;
    box-shadow: 0 28px 90px rgba(15,23,42,.12);
    padding: clamp(28px, 5vw, 58px);
}
.error-card-v11::before {
    content:"";
    position:absolute;
    inset:-120px auto auto 50%;
    transform: translateX(-50%);
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37,99,235,.18), transparent 68%);
}
.error-code-v11 {
    position: relative;
    font-weight: 900;
    font-size: clamp(4.4rem, 12vw, 9.5rem);
    letter-spacing: -.08em;
    line-height: .82;
    color: rgba(37,99,235,.11);
}
.error-icon-v11 {
    position: relative;
    width: 84px;
    height: 84px;
    margin: -22px auto 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius: 28px;
    color:#fff;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    box-shadow: 0 20px 46px rgba(37,99,235,.26);
    font-size: 2.2rem;
}
.error-card-v11 h1 {
    position: relative;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -.04em;
    color: #0f172a;
}
.error-card-v11 p {
    position: relative;
    max-width: 620px;
    margin: 12px auto 0;
    color:#64748b;
    line-height: 1.75;
}
.error-path-v11 {
    position: relative;
    display:inline-flex;
    align-items:center;
    margin-top: 18px;
    padding: 9px 14px;
    border-radius: 999px;
    background:#f1f5f9;
    color:#475569;
    font-size:.86rem;
    font-weight: 700;
}
.error-actions-v11 {
    position: relative;
    display:flex;
    justify-content:center;
    gap: 10px;
    flex-wrap:wrap;
    margin-top: 26px;
}
.error-help-v11 {
    position: relative;
    margin-top: 24px;
    color:#64748b;
    font-size:.88rem;
}
.dashboard-body .public-navbar.dashboard-navbar {
    background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(239,246,255,.95));
    border-bottom: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 14px 42px rgba(15,23,42,.08);
    backdrop-filter: blur(18px);
}
.dashboard-body .app-shell { padding-bottom: 4.2rem; }
@media (max-width: 991.98px) {
    .dashboard-body .public-navbar .navbar-collapse {
        max-height: calc(100vh - 92px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .dashboard-body .app-shell {
        width: min(100% - 18px, 1160px);
        padding-top: .9rem;
        padding-bottom: 2.5rem;
    }
    .dashboard-body .card { border-radius: 18px !important; }
    .dashboard-body .table-responsive {
        border-radius: 16px;
        border: 1px solid #e2e8f0;
    }
    .dashboard-body .btn,
    .public-body .btn { min-height: 42px; display:inline-flex; align-items:center; justify-content:center; }
    .dashboard-body input,
    .dashboard-body select,
    .dashboard-body textarea,
    .public-body input,
    .public-body select,
    .public-body textarea { font-size: 16px !important; }
}
@media (max-width: 575.98px) {
    .error-actions-v11 { display:grid; grid-template-columns:1fr; }
    .error-actions-v11 .btn { width:100%; }
    .error-card-v11 { border-radius: 26px; }
    .main-footer { padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
}
