:root {
    --t2e-navy: #231e48;
    --t2e-navy-dark: #1a1635;
    --t2e-orange: #f29109;
    --t2e-text-on-dark: #fff;
}

/* Base font size — set on html so both Bootstrap rem units and our em units scale together.
   Increase this percentage to scale the entire UI proportionally. */
html { font-size: 100%; }

body {
    background-color: #eeedf5;
    font-family: "Open Sans", sans-serif;
    font-size: 1rem;
}

/* Navbar */
.t2e-navbar { background-color: var(--t2e-navy); }
.t2e-navbar .navbar-brand img { height: 32px; }
.t2e-navbar .nav-link,
.t2e-navbar .navbar-text { color: rgba(255,255,255,.85) !important; }
.t2e-navbar .nav-link:hover { background-color: rgba(242,145,9,.2) !important; color: #fff !important; border-radius: 4px; }
.t2e-navbar .nav-link.active { color: #fff !important; border-bottom: 2px solid var(--t2e-orange); }
/* Bootstrap 5.3 changed dark navbar toggler to use data-bs-theme; provide the icon explicitly */
.t2e-navbar .navbar-toggler { border-color: rgba(255,255,255,.3); }
/* stylelint-disable-next-line function-no-unknown */
.t2e-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Card headers */
.t2e-bgc-main {
    background-color: var(--t2e-navy) !important;
    color: var(--t2e-text-on-dark) !important;
}
.t2e-bgc-main * { color: var(--t2e-text-on-dark) !important; }

/* Buttons */
.btn-t2e { background-color: var(--t2e-navy); color: #fff; border: none; }
.btn-t2e:hover { background-color: var(--t2e-orange); color: #fff; }
.btn-t2e:focus { outline: 2px solid var(--t2e-orange); outline-offset: 2px; }

/* Bulletin cards (clickable / hoverable) */
.bulletin-card { cursor: pointer; transition: box-shadow .15s; }
.bulletin-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }

/* Form focus rings */
.form-control:focus, .form-select:focus {
    border-color: var(--t2e-orange);
    box-shadow: 0 0 0 .2rem rgba(242,145,9,.15);
}

/* Tier-locked cards */
.locked-card .card-header,
.locked-card .card-body { opacity: 0.65; pointer-events: none; user-select: none; }
.locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;   /* scales with body font-size */
    color: #555;
    pointer-events: auto;
    cursor: default;
}

/* Admin sidebar */
.admin-sidebar {
    background-color: var(--t2e-navy);
    min-height: calc(100vh - 60px);
}
.admin-sidebar .nav-link { color: rgba(255,255,255,.8); padding: .5rem 1rem; border-radius: 4px; }
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active { background-color: rgba(242,145,9,.2); color: #fff; }
.admin-sidebar .nav-link i { width: 22px; }

/* Status badges */
.badge-active      { background-color: #198754; color: #fff; }
.badge-pending     { background-color: #fd7e14; color: #fff; }
.badge-suspended   { background-color: #dc3545; color: #fff; }
.badge-deactivated { background-color: #6c757d; color: #fff; }

/* PRN data tables — used on dashboard and archive pages */
.prn-table th,
.prn-table td { padding: .6rem 1rem; }

/* Site footer */
.prn-footer { border-top: 1px solid #ddd; background: #f8f7fc; }

/* Site header wrapper */
#site-header { z-index: 1030; }

/* Masquerade banner */
.masquerade-bar { background: #ffc107; color: #000; border-bottom: 1px solid #e0a800; }

/* Subscriber page body — padding accounts for fixed navbar (70 px) or navbar + banner (108 px) */
.subscriber-body { min-height: 100vh; padding-top: 70px; }
.subscriber-body--banner { padding-top: 108px; }

/* Auth pages */
.auth-logo { height: 44px; }
.login-wrapper--top { align-items: flex-start; padding: 2rem 0; }
.auth-wide  { width: 100%; max-width: 560px; }
.auth-medium { width: 100%; max-width: 520px; }

/* OTP / TOTP code inputs — em scales with body font-size */
.otp-input { letter-spacing: .35em; font-size: 1.4em; }

/* 2FA method-choice cards */
.method-option { cursor: pointer; }

/* TOTP QR image + backup key */
.totp-qr { width: 160px; height: 160px; border: 1px solid #ccc; border-radius: 4px; }
.totp-secret { word-break: break-all; }

/* Dashboard section eyebrow label — em scales with body font-size */
.section-eyebrow { font-size: 0.75em; letter-spacing: .08em; }

/* Colour utilities */
.text-t2e-navy { color: var(--t2e-navy) !important; }
.badge-navy { background: var(--t2e-navy) !important; color: #fff; }
.badge-orange { background: var(--t2e-orange) !important; color: #000; }

/* Fixed-width label column in detail tables */
.col-label { width: 35%; }

/* Constrained page containers */
.container-narrow  { max-width: 560px; }
.container-account { max-width: 900px; }

/* Bulletin HTML isolation wrapper */
.bulletin-content-reset { all: initial; display: block; font-family: sans-serif; }

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--t2e-navy) 0%, var(--t2e-navy-dark) 100%);
}
.login-card { width: 100%; max-width: 420px; }

/* ---------------------------------------------------------------
   In-app admin panel
--------------------------------------------------------------- */
.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Sidebar + content wrapper */
.admin-layout { display: flex; flex: 1; padding-top: 60px; }

/* Sidebar */
.admin-sidebar { width: 220px; flex-shrink: 0; }
.admin-sidebar .sidebar-header {
    padding: .75rem 1rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.45);
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.8);
    padding: .5rem 1rem;
    border-radius: 4px;
    font-size: .9rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(242,145,9,.2);
    color: #fff;
}
.admin-sidebar .nav-link i { width: 20px; }

/* Content area */
.admin-content { flex: 1; padding: 1.5rem; min-width: 0; }

/* Admin card header accent */
.admin-section-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6c757d;
    margin-bottom: .5rem;
}

/* Pending badge in sidebar */
.sidebar-badge {
    font-size: .65rem;
    padding: 2px 6px;
    background: var(--t2e-orange);
    color: #000;
    border-radius: 10px;
    margin-left: auto;
}

/* Status badges — already in base but alias for admin use */
.badge-pending      { background-color: #fd7e14 !important; color: #fff !important; }
.badge-payment_overdue { background-color: #dc3545 !important; color: #fff !important; }

/* Admin filter bar */
.admin-filter-bar .form-select,
.admin-filter-bar .form-control { font-size: .875rem; }

/* Per-row action buttons in admin tables */
.btn-action { font-size: .75rem; padding: 2px 8px; }
