/* =========================================================
   BKR THEME - one look for the whole portal
   Modern style in the logo colours: navy + saffron + green,
   Marathi-first typography, large touch targets, mobile friendly.
   Loaded by user/includes/header.php, admin/header.php and login.php.
========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800&display=swap");

:root {
    --bkr-navy: #0b3a75;
    --bkr-navy-2: #12509c;
    --bkr-navy-deep: #072650;
    --bkr-saffron: #f28c1b;
    --bkr-saffron-soft: #fff3e3;
    --bkr-green: #1e8a3a;
    --bkr-green-soft: #e7f6ec;
    --bkr-red: #c53030;
    --bkr-red-soft: #fdecec;
    --bkr-bg: #f1f5fa;
    --bkr-card: #ffffff;
    --bkr-line: #dde6f1;
    --bkr-text: #17283d;
    --bkr-muted: #5d6f86;
    --bkr-radius: 16px;
    --bkr-shadow: 0 6px 24px rgba(11, 58, 117, .07);
    --bkr-font: "Noto Sans Devanagari", "Segoe UI", Arial, sans-serif;
}

body {
    font-family: var(--bkr-font) !important;
    background: var(--bkr-bg) !important;
    color: var(--bkr-text);
    -webkit-font-smoothing: antialiased;
}
body input, body select, body textarea, body button { font-family: var(--bkr-font); }

/* ---------- header: tricolour strip + calmer colours ---------- */
.bkr-header {
    background: #fff !important;
    border-bottom: 1px solid var(--bkr-line) !important;
    box-shadow: 0 2px 14px rgba(11, 58, 117, .06) !important;
}
.bkr-header::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bkr-saffron) 0 33.3%, #fff 33.3% 66.6%, var(--bkr-green) 66.6% 100%);
}
.bkr-header-brand h1 { color: var(--bkr-navy) !important; font-weight: 800 !important; letter-spacing: .2px; }
.bkr-header-brand span { color: var(--bkr-saffron) !important; font-weight: 700 !important; }
.bkr-header-add-money { background: var(--bkr-green) !important; border-radius: 12px !important; }
.bkr-header-wallet { border-radius: 14px !important; }
a.bkr-header-notification { text-decoration: none; color: inherit; position: relative; }

/* ---------- sidebar: look lives in user/includes/bkr_sidebar.php ---------- */
.bkr-sidebar-badge {
    margin-left: auto; background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center;
    animation: bkrBadge 1.8s ease-in-out infinite;
}
@keyframes bkrBadge { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); } 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); } }
#bkrAdminSidebar .side-link .bkr-sidebar-badge { margin-left: auto; }
#bkrAdminHeader .brand-icon img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- shared building blocks (new pages) ---------- */
.bkr-h {
    display: flex; align-items: center; gap: 12px;
    margin: 26px 0 14px; font-size: 19px; font-weight: 800; color: var(--bkr-navy);
}
.bkr-h::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--bkr-line), transparent); }
.bkr-h .bkr-h-ico {
    width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bkr-saffron-soft); color: var(--bkr-saffron); font-size: 17px;
}
.bkr-card { background: var(--bkr-card); border: 1px solid var(--bkr-line); border-radius: var(--bkr-radius); box-shadow: var(--bkr-shadow); }
.bkr-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.bkr-pill.info { background: #e8f1ff; color: #0b4aa2; }
.bkr-pill.warn { background: #fff4e0; color: #a35a00; }
.bkr-pill.danger { background: var(--bkr-red-soft); color: var(--bkr-red); }
.bkr-pill.success { background: var(--bkr-green-soft); color: #13692c; }

/* ---------- GLOBAL LOADER (every service submit) ---------- */
#bkrLoader {
    position: fixed; inset: 0; z-index: 99999;
    display: none; align-items: center; justify-content: center;
    background: rgba(7, 38, 80, .55);
    backdrop-filter: blur(3px);
    padding: 16px;
}
#bkrLoader.show { display: flex; animation: bkrFade .2s ease-out; }
@keyframes bkrFade { from { opacity: 0; } to { opacity: 1; } }
.bkr-loader-card {
    width: min(340px, 100%); background: #fff; border-radius: 22px; padding: 28px 24px 22px; text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25); position: relative; overflow: hidden;
}
.bkr-loader-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
    background: linear-gradient(90deg, var(--bkr-saffron) 0 33.3%, #fff 33.3% 66.6%, var(--bkr-green) 66.6% 100%);
}
.bkr-loader-ring { position: relative; width: 104px; height: 104px; margin: 4px auto 16px; }
.bkr-loader-ring::before, .bkr-loader-ring::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 5px solid transparent; border-top-color: var(--bkr-loader-color, var(--bkr-navy));
    animation: bkrSpin 1s linear infinite;
}
.bkr-loader-ring::after {
    inset: 12px; border-top-color: var(--bkr-saffron); animation-duration: 1.5s; animation-direction: reverse;
}
.bkr-loader-icon {
    position: absolute; inset: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--bkr-loader-color, var(--bkr-navy)) 12%, #fff);
    color: var(--bkr-loader-color, var(--bkr-navy)); font-size: 24px;
    animation: bkrBob 1.2s ease-in-out infinite;
}
@keyframes bkrSpin { to { transform: rotate(360deg); } }
@keyframes bkrBob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.06); } }
.bkr-loader-title { font-size: 17px; font-weight: 800; color: var(--bkr-text); line-height: 1.5; }
.bkr-loader-sub { margin-top: 6px; font-size: 13px; color: var(--bkr-muted); }
.bkr-loader-dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.bkr-loader-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--bkr-loader-color, var(--bkr-navy)); animation: bkrDot 1.2s infinite; }
.bkr-loader-dots span:nth-child(2) { animation-delay: .15s; background: var(--bkr-saffron); }
.bkr-loader-dots span:nth-child(3) { animation-delay: .3s; background: var(--bkr-green); }
@keyframes bkrDot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.15); } }
button.bkr-busy, input.bkr-busy { opacity: .7; cursor: progress !important; }

/* ---------- MOBILE: make every page usable on a phone ---------- */
.bkr-mobile-menu { display: none; }
@media (max-width: 768px) {
    .bkr-mobile-menu {
        display: inline-flex; align-items: center; justify-content: center; flex: none;
        width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--bkr-line);
        background: #fff; color: var(--bkr-navy); font-size: 18px; cursor: pointer; margin-right: 4px;
    }
    /* No slide-in flash on page load: hidden, without animation, until the script is ready. */
    body:not(.bkr-sb-ready) .bkr-sidebar { transition: none !important; }
    body:not(.bkr-sb-ready) .bkr-sidebar-backdrop { transition: none !important; }
    .bkr-sidebar-toggle { display: none !important; }
    /* Pages with their own shell still reserved the desktop sidebar width on phones. */
    main.bkr-main-area { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
    .main-content { left: 0 !important; right: auto !important; width: 100% !important; max-width: 100% !important; }
    /* Card page made the sidebar a flex item (position:relative), so it kept 175px of space. */
    .dashboard-wrapper > aside.bkr-sidebar, aside.bkr-sidebar.bkr-sidebar {
        position: fixed !important; top: var(--bkr-header-height) !important; left: 0 !important; bottom: 0 !important;
        flex: none !important; min-width: 0 !important;
    }
    .dashboard-wrapper > .main-content.main-content { flex: 1 1 100% !important; left: 0 !important; }
    html, body { overflow-x: hidden; }
    .main-content img, .main-content video, .main-content iframe { max-width: 100%; height: auto; }
    .main-content table:not(.bkr-keep-table) { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .main-content input:not([type=checkbox]):not([type=radio]),
    .main-content select, .main-content textarea { max-width: 100%; font-size: 16px; } /* 16px stops iOS zoom */
    .main-content .container, .main-content .wrap, .main-content .card, .main-content form { max-width: 100%; }
    .bkr-header-helpdesk, .bkr-header-wallet-info small { display: none !important; }
    .bkr-header-brand span { font-size: 9.5px !important; }
}
@media (max-width: 480px) {
    .bkr-header-add-money { padding: 7px 9px !important; font-size: 11px !important; }
    .bkr-header-profile-info { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
