/* Repdoc — BDRIS shell
   Shared header, footer, hero and content surfaces for the generator pages.
   Mirrors the blue theme used by tools/bdris-tools so every tool reads as
   one product instead of a separate mini-site. */

.bdris-head {
    background: #fff;
    border-bottom: 1px solid #e8eef8;
    position: relative;
    z-index: 110;
}

.bdris-head .wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.bdris-head .head-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
    position: relative;
}

.bdris-head .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex: 0 0 auto;
    color: #12233f;
    min-width: 0;
}

.bdris-head .brand img {
    height: 40px;
    width: auto;
    display: block;
}

.bdris-head .brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.bdris-head .brand-copy strong {
    font-size: 14px;
    line-height: 1.3;
    color: #142747;
    font-weight: 700;
    white-space: nowrap;
}

.bdris-head .brand-copy small {
    font-size: 10px;
    color: #6c7c94;
    letter-spacing: .2px;
    padding-left: 1px;
    white-space: nowrap;
}

.bdris-head .main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 600;
}

.bdris-head .main-nav a {
    color: #25324a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.bdris-head .main-nav a:hover,
.bdris-head .main-nav a.active {
    color: #0b57d0;
}

.bdris-head .main-nav-more {
    position: relative;
}

.bdris-head .main-nav-more > summary {
    list-style: none;
    cursor: pointer;
    color: #25324a;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.bdris-head .main-nav-more > summary::-webkit-details-marker { display: none; }
.bdris-head .main-nav-more > summary::after {
    content: "";
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
}

.bdris-head .main-nav-more > summary:hover { color: #0b57d0; }

.bdris-head .main-nav-more-menu {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 12px);
    min-width: 210px;
    padding: 8px;
    background: #fff;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    box-shadow: 0 18px 40px -30px rgba(18, 47, 100, .45);
    z-index: 140;
}

.bdris-head .main-nav-more-menu a {
    display: block;
    padding: 9px 10px;
    border-radius: 7px;
    color: #334a6e;
    font-size: 12.5px;
    font-weight: 500;
}

.bdris-head .main-nav-more-menu a:hover {
    color: #0b57d0;
    background: #eef4ff;
}

.bdris-head .head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.bdris-head .icon-btn {
    width: 38px;
    height: 38px;
    color: #5b6b82;
}

.bdris-head .icon-btn:hover {
    color: #0b57d0;
    background: #eef4ff;
    border-color: #dfe7f2;
}

.bdris-head .icon-btn .icon {
    width: 18px;
    height: 18px;
}

.bdris-head .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .bdris-head .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .bdris-head .theme-toggle .icon-moon { display: block; }

.bdris-head .login-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(180deg, #1a73e8, #0b57d0);
    color: #fff;
    padding: 9px 17px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 20px -14px rgba(11, 87, 208, .9);
}

.bdris-head .login-pill:hover {
    background: linear-gradient(180deg, #2b82f0, #0d5edc);
    color: #fff;
}

.bdris-head .login-pill svg {
    width: 14px;
    height: 14px;
}

.bdris-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #dbe6f6;
    border-radius: 999px;
    background: #f6f9ff;
    color: #0b3fae;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.bdris-balance svg {
    width: 14px;
    height: 14px;
}

.bdris-admin {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #334a6e;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.bdris-admin:hover { color: #0b57d0; }

.bdris-admin svg {
    width: 14px;
    height: 14px;
}

.bdris-head .nav-toggle { display: none; }

/* ── Hero ─────────────────────────────────────────────────────── */
.bdris-hero {
    background: linear-gradient(112deg, #083ea9 0%, #0b57d0 55%, #1d7ae6 100%);
    color: #fff;
    padding: 40px 0 62px;
    position: relative;
    overflow: hidden;
}

.bdris-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(420px 220px at 80% -20%, rgba(255,255,255,.22), transparent 70%),
        radial-gradient(300px 200px at 12% 120%, rgba(0,20,80,.28), transparent 70%);
}

.bdris-hero .wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.bdris-hero .hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.bdris-hero .hero-copy h1 {
    font-size: 30px;
    line-height: 1.35;
    margin: 0 0 7px;
    font-weight: 700;
    letter-spacing: -.2px;
    color: #fff;
}

.bdris-hero .hero-copy p {
    margin: 0;
    color: #d9e8ff;
    font-size: 14px;
    max-width: 640px;
}

.bdris-hero .hero-art {
    width: 300px;
    max-width: 36%;
    height: auto;
    flex: 0 0 auto;
    opacity: .96;
}

/* ── Footer ───────────────────────────────────────────────────── */
.bdris-footer {
    position: relative;
    background: linear-gradient(112deg, #072c78, #0a3a9e 60%, #0b4bb8);
    color: #eaf2ff;
    padding: 28px 0;
    margin-top: 36px;
    border: 0;
    font-size: 12px;
    text-align: left;
}

.bdris-footer .wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.bdris-footer .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.bdris-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bdris-footer .footer-brand img {
    height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .96;
}

.bdris-footer .footer-brand strong {
    display: block;
    font-size: 15px;
    color: #fff;
}

.bdris-footer .footer-brand small {
    display: block;
    font-size: 11px;
    color: #c7d8fa;
}

.bdris-footer .footer-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 12px;
}

.bdris-footer .footer-nav a {
    color: #dce9ff;
    text-decoration: none;
}

.bdris-footer .footer-nav a:hover { color: #fff; }

.bdris-footer .footer-tag {
    font-size: 12px;
    text-align: right;
    color: #d7e5ff;
    line-height: 1.6;
}

/* ── Content surfaces ────────────────────────────────────────── */
.tool-body .container,
.pp-page .container,
.cert-page .container {
    max-width: 1120px;
}

.tool-body .verify-card,
.tool-body .form-card {
    border-radius: 18px;
    box-shadow: 0 8px 26px -24px rgba(17, 45, 96, .45);
}

.tool-body .form-section {
    border-radius: 14px;
}

.tool-body .btn,
.tool-body .btn-submit,
.tool-body .btn-reset {
    border-radius: 999px;
}

.nid-page .nid-wrap {
    max-width: 1120px;
}

.nid-page .nid-card {
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 26px -24px rgba(17, 45, 96, .45);
}

.nid-page .nid-btn {
    border-radius: 999px;
}

.pp-page .pp-card {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: var(--space-5);
    box-shadow: 0 8px 26px -24px rgba(17, 45, 96, .45);
}

.pp-page .pp-hero-copy {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 8px 26px -24px rgba(17, 45, 96, .45);
}

.pp-page .pp-subnav {
    border-bottom: 1px solid var(--border-color);
}

.pp-page .pp-nav-link {
    border-width: 1px;
    border-radius: 999px;
}

.pp-page .pp-nav-link.is-active {
    border-color: transparent;
}

.pp-page .pp-btn {
    border-width: 1px;
    border-radius: 999px;
}

.pp-page .pp-btn-primary {
    border-color: transparent;
    box-shadow: 0 10px 20px -14px rgba(11, 87, 208, .9);
}

.cert-page {
    display: block;
    padding: 0;
    gap: 0;
}

.cert-page .landing-wrap {
    max-width: 1120px;
}

.cert-page .landing-card {
    border-radius: 18px;
    box-shadow: 0 8px 26px -24px rgba(17, 45, 96, .45);
}

/* ── Dark mode chrome ────────────────────────────────────────── */
[data-theme="dark"] .bdris-head {
    background: #0b1d33;
    border-bottom-color: #1d3557;
}

[data-theme="dark"] .bdris-head .brand-copy strong { color: #eaf2ff; }
[data-theme="dark"] .bdris-head .brand-copy small { color: #a8bcda; }
[data-theme="dark"] .bdris-head .main-nav a { color: #cfe0ff; }
[data-theme="dark"] .bdris-head .main-nav a:hover,
[data-theme="dark"] .bdris-head .main-nav a.active { color: #8bc0ff; }

[data-theme="dark"] .bdris-head .main-nav-more > summary { color: #cfe0ff; }
[data-theme="dark"] .bdris-head .main-nav-more > summary:hover { color: #8bc0ff; }
[data-theme="dark"] .bdris-head .main-nav-more-menu {
    background: #0b1d33;
    border-color: #1d3557;
}
[data-theme="dark"] .bdris-head .main-nav-more-menu a { color: #cfe0ff; }
[data-theme="dark"] .bdris-head .main-nav-more-menu a:hover {
    color: #8bc0ff;
    background: #102844;
}

[data-theme="dark"] .bdris-head .icon-btn { color: #a8bcda; }
[data-theme="dark"] .bdris-head .icon-btn:hover {
    color: #8bc0ff;
    background: #102844;
    border-color: #1d3557;
}

[data-theme="dark"] .bdris-balance {
    background: #102844;
    border-color: #1d3557;
    color: #8bc0ff;
}

[data-theme="dark"] .bdris-admin { color: #a8bcda; }
[data-theme="dark"] .bdris-admin:hover { color: #8bc0ff; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .bdris-head .head-inner { gap: 16px; }
    .bdris-head .main-nav { gap: 13px; }
    .bdris-head .brand-copy small { display: none; }
    .bdris-admin { display: none; }
}

@media (max-width: 1120px) {
    .bdris-head .head-inner { position: relative; }
    .bdris-head .nav-toggle { display: inline-flex; }
    .bdris-head .main-nav {
        display: none;
        position: absolute;
        inset-inline: 0;
        top: 100%;
        margin: 0;
        padding: 10px 20px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: #fff;
        border-bottom: 1px solid #dfe7f2;
        box-shadow: 0 18px 40px -30px rgba(18, 47, 100, .45);
        z-index: 130;
    }
    .bdris-head .main-nav.is-open { display: flex; }
    .bdris-head .main-nav a {
        padding: 12px 10px;
        border-radius: 8px;
    }
    .bdris-head .main-nav a:hover,
    .bdris-head .main-nav a.active { background: #eef4ff; }

    .bdris-head .main-nav-more > summary { padding: 12px 10px; }
    .bdris-head .main-nav-more-menu {
        position: static;
        min-width: 0;
        margin: 2px 0 6px;
        padding: 2px 0 2px 14px;
        border: 0;
        border-inline-start: 2px solid #dfe7f2;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    .bdris-head .main-nav-more-menu a { padding: 8px 10px; }

    [data-theme="dark"] .bdris-head .main-nav {
        background: #0b1d33;
        border-bottom-color: #1d3557;
    }
    [data-theme="dark"] .bdris-head .main-nav a:hover,
    [data-theme="dark"] .bdris-head .main-nav a.active { background: #102844; }
}

@media (max-width: 640px) {
    .bdris-head .head-inner { min-height: 66px; gap: 10px; }
    .bdris-head .brand img { height: 34px; }
    .bdris-head .brand-copy small { display: none; }
    .bdris-balance { display: none; }
    .bdris-head .login-pill { padding: 8px 13px; font-size: 12px; }
    .bdris-head .icon-btn { width: 36px; height: 36px; }

    .bdris-hero { padding: 30px 0 52px; }
    .bdris-hero .hero-inner { display: block; }
    .bdris-hero .hero-art { display: none; }
    .bdris-hero .hero-copy h1 { font-size: 24px; }
    .bdris-hero .hero-copy p { font-size: 13px; }

    .bdris-footer .footer-inner { display: block; text-align: center; }
    .bdris-footer .footer-brand { justify-content: center; margin-bottom: 10px; }
    .bdris-footer .footer-nav { justify-content: center; margin: 10px 0; }
    .bdris-footer .footer-tag { text-align: center; }
}

@media (max-width: 480px) {
    .bdris-head .login-pill span { display: none; }
    .bdris-head .login-pill { padding: 9px 10px; }
    .bdris-head .brand-copy strong { font-size: 13px; }
}

@media print {
    .bdris-head,
    .bdris-hero,
    .bdris-footer { display: none !important; }
}

/* ── Public auth pages: login, signup, operator application ───── */
.bdris-auth.apply-body,
.bdris-auth.auth-body {
    --g-ink: #12233f;
    --g-ink-2: #0a1c3a;
    --g-forest: #061c54;
    --g-primary: #0b57d0;
    --g-primary-hover: #093b9c;
    --g-mint: #eef4ff;
    --g-mint-2: #f4f7fc;
    --g-mist: #f4f7fc;
    --g-line: #dfe7f2;
    --g-line-strong: #c9d6e8;
    --g-text: #12233f;
    --g-muted: #66758c;
    --bg-base: #f4f7fc;
    --bg-surface: #fff;
    --bg-muted: #eef4ff;
    --text-primary: #12233f;
    --text-muted: #66758c;
    --primary: #0b57d0;
    --primary-hover: #093b9c;
    --primary-light: #eef4ff;
    --border-color: #dfe7f2;
    --border-strong: #c9d6e8;
    --border-focus: #0b57d0;
    --success: #12a065;
    --success-bg: #e8f8f1;
    --warning: #8a5a00;
    --warning-bg: #fff7e6;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    display: block;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    background-color: var(--g-mist);
    background-image: none;
    color: var(--g-text);
}

.bdris-auth .bdris-auth-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 26px;
    align-items: start;
}

.bdris-auth .bdris-auth-formcol {
    min-width: 0;
}

.bdris-auth .login-brandpanel {
    position: static;
    flex: none;
    height: auto;
    min-height: 0;
    padding: 30px;
    border-radius: 18px;
    background:
        radial-gradient(480px 280px at 110% -10%, rgba(90, 162, 255, .24) 0%, rgba(90, 162, 255, 0) 65%),
        linear-gradient(160deg, #061c54 0%, #0b57d0 100%);
    box-shadow: 0 22px 50px -32px rgba(6, 28, 84, .72);
}

.bdris-auth .login-brandpanel .apply-brand {
    margin: 0;
    align-self: flex-start;
    width: fit-content;
}

.bdris-auth .login-brandpanel .kicker {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .16);
    color: #dbe9ff;
}

.bdris-auth .login-pitch h1 {
    margin-top: 4px;
    font-size: 1.65rem;
}

.bdris-auth .login-pitch > p {
    max-width: none;
}

.bdris-auth .login-points li {
    border-top-color: rgba(255, 255, 255, .16);
}

.bdris-auth .login-points .num {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.bdris-auth .login-card {
    margin: 0;
    border-radius: 18px;
}

.bdris-auth .login-card .panel-head {
    border-radius: 18px 18px 0 0;
}

.bdris-auth .login-alt {
    background: var(--g-mint);
}

.bdris-auth .login-alt a {
    background: #0b57d0;
}

.bdris-auth .login-alt a:hover {
    background: #093b9c;
}

.bdris-auth .apply-foot {
    margin-top: 16px;
}

.bdris-auth .apply-shell {
    display: block;
    min-height: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.bdris-auth .apply-content {
    min-height: 0;
    display: block;
}

.bdris-auth .apply-main {
    width: min(1120px, calc(100% - 32px));
    max-width: none;
    margin: 0 auto;
    padding: 36px 0 64px;
}

.bdris-auth .apply-main .panel {
    border: 1px solid var(--g-line);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 40px -34px rgba(18, 47, 100, .35);
}

.bdris-auth .apply-main .panel-head {
    border-radius: 18px 18px 0 0;
}

.bdris-auth .perk {
    border: 1px solid var(--g-line);
    background: #fff;
}

.bdris-auth .perk:nth-child(2n) {
    background: var(--g-mint);
}

.bdris-auth .perk .icon {
    background: var(--g-mint);
    color: var(--g-primary);
}

.bdris-auth .apply-head h1 {
    color: var(--g-ink);
}

.bdris-auth .auth-brand {
    display: none;
}

.bdris-auth .bdris-auth-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 30px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 40px -34px rgba(18, 47, 100, .35);
}

.bdris-auth .bdris-auth-card h1 {
    margin-bottom: 8px;
    font-size: 1.55rem;
    color: var(--text-primary);
}

.bdris-auth .bdris-auth-card .alert {
    margin-bottom: 16px;
}

[data-theme="dark"] .bdris-auth.apply-body,
[data-theme="dark"] .bdris-auth.auth-body {
    --g-ink: #eaf2ff;
    --g-ink-2: #dbe9ff;
    --g-mint: #102844;
    --g-mint-2: #0e1f36;
    --g-mist: #071426;
    --g-line: #1d3557;
    --g-line-strong: #2a4a73;
    --g-text: #eaf2ff;
    --g-muted: #a8bcda;
    --bg-base: #071426;
    --bg-surface: #0b1b30;
    --bg-muted: #102844;
    --text-primary: #eaf2ff;
    --text-muted: #a8bcda;
    --primary: #5aa2ff;
    --primary-hover: #8bc0ff;
    --primary-light: rgba(90, 162, 255, .15);
    --border-color: #1d3557;
    --border-strong: #2a4a73;
    --border-focus: #5aa2ff;
    background: #071426;
}

[data-theme="dark"] .bdris-auth .panel,
[data-theme="dark"] .bdris-auth .bdris-auth-card,
[data-theme="dark"] .bdris-auth .perk {
    background: #0b1b30;
    border-color: #1d3557;
}

[data-theme="dark"] .bdris-auth .perk:nth-child(2n) {
    background: #102844;
}

[data-theme="dark"] .bdris-auth .apply-main .panel-head,
[data-theme="dark"] .bdris-auth .login-card .panel-head {
    background: #0e1f36;
    border-bottom-color: #1d3557;
}

[data-theme="dark"] .bdris-auth .field input,
[data-theme="dark"] .bdris-auth .field select,
[data-theme="dark"] .bdris-auth .field textarea {
    background: #0e1f36;
    border-color: #2a4a73;
    color: #eaf2ff;
}

[data-theme="dark"] .bdris-auth .login-alt {
    background: #102844;
    color: #a8bcda;
}

[data-theme="dark"] .bdris-auth .auth-sub,
[data-theme="dark"] .bdris-auth .apply-foot {
    color: #a8bcda;
}

.bdris-auth .bdris-auth-shell.bdris-auth-single {
    display: block;
}

@media (max-width: 900px) {
    .bdris-auth .bdris-auth-shell {
        grid-template-columns: 1fr;
        padding: 28px 0 48px;
    }
    .bdris-auth .login-brandpanel { order: 2; }
    .bdris-auth .bdris-auth-formcol { order: 1; }
}

@media (max-width: 640px) {
    .bdris-auth .bdris-auth-shell,
    .bdris-auth .apply-main {
        width: min(1120px, calc(100% - 24px));
        padding: 24px 0 44px;
    }
    .bdris-auth .login-brandpanel { padding: 24px; }
    .bdris-auth .bdris-auth-card { padding: 22px; }
    .bdris-auth .apply-head h1 { font-size: 1.55rem; }
}
