/* ============================================================
   VidPay design layer on top of Bootstrap 5
   Brand: authority navy + warm gold. Light-mode first.
   ============================================================ */

:root {
    --bs-primary: #1d4ed8;
    --bs-primary-rgb: 29, 78, 216;
    --bs-body-font-family: 'IBM Plex Sans', 'Noto Sans Bengali', ui-sans-serif, system-ui, sans-serif;
    --bs-body-bg: #f6f8fb;
    --bs-body-color: #101828;
    --bs-secondary-color: #667085;
    --bs-border-color: #e7ecf3;
    --bs-link-color: #1d4ed8;
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color: #1e40af;
    --bs-link-hover-color-rgb: 30, 64, 175;

    --vp-nav: #101a38;
    --vp-nav-hover: #1a2750;
    --vp-nav-active: #22315e;
    --vp-accent: #f0b429;
    --vp-card-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
    --vp-card-shadow-lg: 0 4px 6px -2px rgba(16, 24, 40, .03), 0 12px 20px -4px rgba(16, 24, 40, .08);
    --vp-radius: .875rem;
}

body {
    font-feature-settings: 'tnum' 1;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.006em;
}

h1, h2, h3, h4, h5, h6, .fw-semibold { letter-spacing: -0.02em; }

/* ---------- Buttons ---------- */
.btn { --bs-btn-border-radius: .625rem; font-weight: 600; }
.btn-primary {
    --bs-btn-bg: #1d4ed8;
    --bs-btn-border-color: #1d4ed8;
    --bs-btn-hover-bg: #1e40af;
    --bs-btn-hover-border-color: #1e40af;
    --bs-btn-active-bg: #1c3cab;
    --bs-btn-active-border-color: #1c3cab;
    --bs-btn-disabled-bg: #1d4ed8;
    --bs-btn-disabled-border-color: #1d4ed8;
    --bs-btn-focus-shadow-rgb: 29, 78, 216;
    box-shadow: 0 1px 2px rgba(29, 78, 216, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(29, 78, 216, .35); }
.btn-primary:active { transform: translateY(0); }
.btn-outline-primary {
    --bs-btn-color: #1d4ed8;
    --bs-btn-border-color: #b6ccf5;
    --bs-btn-hover-bg: #eff6ff;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-hover-color: #1e40af;
    --bs-btn-active-bg: #e0ebfd;
    --bs-btn-active-border-color: #1d4ed8;
    --bs-btn-active-color: #1e40af;
}
.btn-light.border:hover { background-color: #f2f6fc; border-color: #cfd9e8 !important; }

/* ---------- Cards ---------- */
.card {
    --bs-card-border-radius: var(--vp-radius);
    --bs-card-border-color: var(--bs-border-color);
    box-shadow: var(--vp-card-shadow) !important;
    transition: box-shadow .15s ease;
}
a.card:hover { box-shadow: var(--vp-card-shadow-lg) !important; text-decoration: none; }

/* ---------- Forms ---------- */
.form-label { color: #344054; }
.form-control, .form-select {
    --bs-border-radius: .625rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
    border-color: #d6dee9;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 .25rem rgba(29, 78, 216, .14);
}
.form-check-input:checked { background-color: #1d4ed8; border-color: #1d4ed8; }
.form-check-input:focus { border-color: #93b0f0; box-shadow: 0 0 0 .2rem rgba(29, 78, 216, .15); }

/* ---------- Tables ---------- */
.table > thead {
    --bs-table-bg: #f9fbfe;
}
.table > :not(caption) > * > * { padding: .7rem .75rem; border-color: #eef2f7; }
.table > thead th {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7d8db1;
    border-bottom: 1px solid var(--bs-border-color);
    white-space: nowrap;
}
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #f7faff; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; letter-spacing: 0; }

/* ---------- Toasts ---------- */
.toast { --bs-border-radius: var(--vp-radius); box-shadow: var(--vp-card-shadow-lg); border: 1px solid var(--bs-border-color); }

/* ---------- Alerts / banners ---------- */
.alert {
    --bs-border-radius: var(--vp-radius);
    border-width: 1px;
}

/* ---------- Admin sidebar (premium dark) ---------- */
aside[data-sidebar] {
    background: linear-gradient(180deg, var(--vp-nav) 0%, #0c142c 100%);
    border-right: 0 !important;
}
aside[data-sidebar] .nav-link {
    color: #aab6d6;
    border-radius: .625rem;
    margin: .125rem .5rem;
    padding: .55rem .75rem !important;
    transition: background-color .15s ease, color .15s ease;
}
aside[data-sidebar] .nav-link:hover { background: var(--vp-nav-hover); color: #fff; }
aside[data-sidebar] .nav-link.active {
    background: var(--vp-nav-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--vp-accent);
}
aside[data-sidebar] .nav-link svg { opacity: .85; }
aside[data-sidebar] .sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .07) !important; }
aside[data-sidebar] .brand-name { color: #fff; }
aside[data-sidebar] .brand-sub { color: #8d9bc4; }
aside[data-sidebar].sidebar-open { transform: translateX(0) !important; }

/* ---------- Header ---------- */
header.sticky-top { backdrop-filter: blur(8px); background: rgba(255, 255, 255, .85) !important; }

/* ---------- Utilities kept from the Tailwind era ---------- */
.tabular-figures { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* Icon sizing helpers for heroicon SVGs. */
.h-3\.5 { height: .875rem; } .w-3\.5 { width: .875rem; }
.h-4 { height: 1rem; } .w-4 { width: 1rem; }
.h-4\.5 { height: 1.125rem; } .w-4\.5 { width: 1.125rem; }
.h-5 { height: 1.25rem; } .w-5 { width: 1.25rem; }
.h-6 { height: 1.5rem; } .w-6 { width: 1.5rem; }

.text-ink { color: #101828 !important; }
.text-ink-muted { color: #667085 !important; }
.bg-canvas { background-color: #f6f8fb !important; }
.bg-primary-surface { background-color: #eff6ff !important; }

/* Fixed-size icon tile used in card headers. */
.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
}

/* Method picker cards on the withdrawal form. */
label[data-method-card] { transition: border-color .15s ease, box-shadow .15s ease; }
label[data-method-card]:hover { border-color: #93b0f0 !important; }
label[data-method-card].border-primary { box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); background: #f7faff; }

/* ---------- CSP-safe layout helpers (replaces all inline styles) ---------- */

/* Width containers */
.w-xs { width: 100%; max-width: 24rem; }
.w-md { width: 100%; max-width: 40rem; }
.w-lg { width: 100%; max-width: 44rem; }
.w-page { width: 100%; max-width: 48rem; }

/* Icon tile sizes */
.icon-2rem { width: 2rem; height: 2rem; }
.icon-2-75rem { width: 2.75rem; height: 2.75rem; }
.icon-3rem { width: 3rem; height: 3rem; }

/* Search input with leading icon */
.search-wrap { position: relative; flex-grow: 1; min-width: 13rem; }
.search-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); margin-top: 0 !important; }
.search-input { padding-left: 2.25rem; }

/* Admin shell */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 16rem;
    height: 100vh;
    z-index: 1045;
    transform: translateX(-100%);
    transition: transform .25s ease-in-out;
}
.admin-sidebar-header { height: 4rem; }
.admin-sidebar-toggle {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 1045;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.admin-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, .4);
}
.admin-content { min-height: 100vh; }
.admin-main {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 4.5rem 1rem 1.5rem;
}
@media (min-width: 992px) {
    .admin-sidebar { transform: translateX(0); }
    .admin-content { margin-left: 16rem; }
    .admin-main { padding: 2rem 1.5rem 1.5rem; }
    .admin-sidebar-toggle { display: none !important; }
    .admin-backdrop { display: none !important; }
}

/* Site header */
.header-inner { max-width: 48rem; height: 4rem; }

/* OTP digit boxes */
.otp-digit {
    width: 3rem;
    height: 3.5rem;
    font-size: 1.25rem;
    text-align: center;
    font-weight: 600;
}
@media (min-width: 576px) { .otp-digit { width: 3.4rem; height: 4rem; } }

/* Modal body scroll region */
.modal-scroll { max-height: 65vh; overflow-y: auto; }

/* Profile balance band */
.balance-band {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
}
.balance-avatar {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, .15);
}

/* Charts */
.chart-donut { height: 10rem; width: 10rem; flex-shrink: 0; }
.chart-trend { width: 100%; height: 220px; }
.legend-dot { height: .6rem; width: .6rem; border-radius: 50%; flex-shrink: 0; }
.legend-dot-sm { height: .5rem; width: .5rem; border-radius: 50%; }

/* Withdrawal method picker */
label[data-method-card] { min-height: 2.75rem; cursor: pointer; }

/* Toast fade */
.toast[data-toast] { transition: opacity .3s ease, transform .3s ease; }

/* Read-only plain value (admin profile mobile number) */
.plain-value {
    padding: .5rem .75rem;
    color: #667085;
}

/* Centered login shells */
.center-screen {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

/* Custom <dialog> modal box */
dialog.modal-box { max-width: 40rem; width: 100%; padding: 0; border-color: var(--bs-border-color); }

/* Toast stack sits above Bootstrap modals */
.toast-stack { z-index: 1090; }

/* Participant picker scroll region */
.picker-scroll { max-height: 16rem; overflow-y: auto; }

/* Table cell clamp */
.maxw-24 { max-width: 24rem; }

/* Admin login mode tabs */
[data-login-mode] {
    background: transparent;
    color: #667085;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
[data-login-mode][aria-pressed="true"] {
    background: #fff;
    color: #101828;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
