/* ==========================================================================
   BINGO PANEL — Admin panel stylesheet
   Modern violet/purple + white + light gray.
   ========================================================================== */

:root {
    --primary:      #7C3AED;
    --secondary:    #6D28D9;
    --dark-purple:  #4C1D95;
    --light-purple: #F1EBFD;
    --bg:           #F7F7FA;
    --white:        #FFFFFF;
    --text:         #263238;
    --muted:        #72777D;
    --success:      #28A745;
    --warning:      #F0A500;
    --danger:       #E31B23;
    --info:         #3498DB;
    --border:       #E8E4F0;
    --teal:         #00A6C0;
    --shadow:       0 1px 3px rgba(40, 20, 70, .08), 0 1px 2px rgba(40, 20, 70, .04);
    --shadow-md:    0 4px 14px rgba(50, 25, 95, .12);
    --sidebar-w:    236px;
    --header-h:     60px;
    --radius:       8px;
    --gadar-grad:   linear-gradient(90deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%);
    --sidebar-grad: linear-gradient(180deg, #7C3AED 0%, #6D28D9 55%, #4C1D95 100%);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Segoe UI', Roboto, system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .35em; font-weight: 600; color: var(--text); }
.num { font-weight: 700; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ------------------------------- Layout ------------------------------- */
.app { min-height: 100vh; }

.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;                 /* full-height violet rail */
    width: var(--sidebar-w);
    background: var(--sidebar-grad);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 55;
    transition: transform .22s ease;
}
.sidebar__brand {
    height: var(--header-h); flex: 0 0 var(--header-h);
    display: flex; align-items: center; gap: 10px; padding: 0 20px;
    font-size: 19px; font-weight: 700; color: #fff; letter-spacing: .3px;
}
.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: 12px 0; }
.sidebar__section {
    padding: 14px 20px 6px;
    font-size: 10.5px; text-transform: uppercase;
    letter-spacing: 1.2px; color: rgba(255,255,255,.55);
}
.nav-item {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 20px;
    color: rgba(255,255,255,.92);
    font-size: 14.5px;
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.nav-item.active {
    background: rgba(255,255,255,.16);
    border-left-color: #fff;
    color: #fff;
    font-weight: 600;
}
.nav-item .ico { width: 19px; height: 19px; flex: 0 0 19px; color: #fff; opacity: .95; }
.nav-item .chev { margin-left: auto; transition: transform .18s; }
.nav-group.open > .nav-item .chev { transform: rotate(90deg); }
.nav-sub { max-height: 0; overflow: hidden; transition: max-height .2s ease; background: rgba(0,0,0,.14); }
.nav-group.open .nav-sub { max-height: 320px; }
.nav-sub a {
    display: block; padding: 9px 20px 9px 52px; font-size: 13px; color: rgba(255,255,255,.8);
    border-left: 3px solid transparent;
}
.nav-sub a:hover, .nav-sub a.active { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; border-left-color: #fff; }

/* Header */
.header {
    position: fixed;
    top: 0; right: 0; left: var(--sidebar-w); /* violet bar continuing the sidebar */
    height: var(--header-h);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    display: flex; align-items: center; gap: 12px;
    padding: 0 18px;
    color: #fff;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(76,29,149,.18);
}
.header__toggle {
    background: rgba(255,255,255,.15); border: 0; color: #fff;
    width: 38px; height: 38px; border-radius: 8px; cursor: pointer;
    display: grid; place-items: center;
}
.header__toggle:hover { background: rgba(255,255,255,.25); }
.header__search { position: relative; flex: 1 1 auto; max-width: 420px; }
.header__search input {
    width: 100%; height: 40px; border: 0; border-radius: 8px;
    padding: 0 40px 0 14px; font-size: 13.5px; color: var(--text);
    background: #fff;
}
.header__search .search-ico {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: var(--muted);
}
.header__spacer { flex: 1 1 auto; }
.header__dues {
    background: rgba(255,255,255,.16); padding: 7px 14px; border-radius: 8px;
    font-weight: 600; font-size: 13px; white-space: nowrap;
}
.header__icon-btn {
    position: relative; width: 40px; height: 40px; border-radius: 8px;
    background: rgba(255,255,255,.14); border: 0; color: #fff; cursor: pointer;
    display: grid; place-items: center;
}
.header__icon-btn:hover { background: rgba(255,255,255,.25); }
.badge-dot {
    position: absolute; top: 5px; right: 6px; min-width: 16px; height: 16px;
    background: var(--danger); border-radius: 9px; font-size: 10px; font-weight: 700;
    display: grid; place-items: center; padding: 0 4px; color: #fff;
    border: 2px solid var(--secondary);
}
.userchip {
    display: flex; align-items: center; gap: 9px; cursor: pointer;
    background: rgba(255,255,255,.14); padding: 5px 12px 5px 6px; border-radius: 30px;
    border: 0; color: #fff; font-size: 13px;
}
.userchip:hover { background: rgba(255,255,255,.24); }
.avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--gadar-grad); display: grid; place-items: center;
    font-weight: 700; font-size: 13px; color: #fff;
}

/* Dropdowns */
.dropdown { position: relative; }
.dropdown__menu {
    position: absolute; right: 0; top: calc(100% + 10px);
    min-width: 230px; background: #fff; color: var(--text);
    border-radius: 10px; box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: .16s ease; z-index: 60; overflow: hidden;
}
.dropdown.open .dropdown__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown__header { padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--light-purple); }
.dropdown__item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; color: var(--text); font-size: 13.5px;
}
.dropdown__item:hover { background: var(--light-purple); text-decoration: none; }
.dropdown__scroll { max-height: 320px; overflow-y: auto; }

/* Content */
.main { margin-left: var(--sidebar-w); padding-top: var(--header-h); min-height: 100vh; }
.content { padding: 22px 26px 60px; max-width: 1500px; }

/* Page header */
.page-head {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 22px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    box-shadow: var(--shadow);
}
.page-head h1 {
    font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 12px;
    color: var(--primary);
}
.page-head h1 .grad {
    background: linear-gradient(90deg, #7C3AED 0%, #A855F7 60%, #C026D3 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.page-head .subtitle { color: var(--muted); font-size: 13.5px; margin-top: 3px; font-style: italic; }
.breadcrumb { font-size: 13.5px; color: var(--muted); background: #F2F1F6;
    padding: 10px 16px; border-radius: 10px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* Alert & announcement */
.alert-box {
    background: #fff; border: 1px solid var(--border);
    border-left: 4px solid #16121f; border-radius: var(--radius);
    padding: 22px 26px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.alert-box p {
    margin: 0; font-size: 25px; font-weight: 700; line-height: 1.5;
    color: #16121f; white-space: pre-line;
}
.alert-box p .hl {
    background: #FFF3A6; box-decoration-break: clone; -webkit-box-decoration-break: clone;
    padding: 3px 6px;
}
.alert-box .no-ico { color: var(--danger); margin-right: 8px; vertical-align: -3px; }

.announce {
    background: linear-gradient(90deg, #2FA84A, #28A745);
    color: #fff; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 22px;
    font-size: 17px; font-weight: 600; box-shadow: 0 4px 14px rgba(40,167,69,.25);
    display: flex; align-items: center; gap: 12px;
}
.announce .em { font-weight: 800; }

/* Section title */
.section-title {
    font-size: 23px; font-weight: 700; margin: 30px 0 18px; color: #241d33;
    padding-left: 14px; border-left: 5px solid var(--primary); border-radius: 2px;
    line-height: 1.2;
}

/* Metric cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
    background: #fff; border: 1px solid #EFEDF4; border-radius: 16px;
    box-shadow: 0 8px 22px rgba(50,30,90,.07); position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}
.card .card-top { padding: 22px 22px 18px; flex: 1 1 auto; }
.card .card-ico {
    width: 58px; height: 58px; border-radius: 15px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    box-shadow: 0 6px 14px rgba(109,40,217,.30);
    margin-bottom: 16px;
}
.card .card-label { font-size: 13px; color: #8a8496; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.card .card-num { font-size: 38px; font-weight: 700; line-height: 1.15; color: #241d33; margin-top: 4px; }
.card .card-foot {
    border-top: 1px solid #F0EEF5; padding: 13px 22px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13.5px; color: #8a8496; font-weight: 500;
}
.card .card-foot:hover { background: #FAF8FE; color: var(--primary); text-decoration: none; }
.card.c-blue   .card-ico { background: linear-gradient(135deg, #38BDF8, #2563EB); box-shadow: 0 6px 14px rgba(37,99,235,.30); }
.card.c-green  .card-ico { background: linear-gradient(135deg, #4ADE80, #16A34A); box-shadow: 0 6px 14px rgba(22,163,74,.30); }
.card.c-orange .card-ico { background: linear-gradient(135deg, #FBBF24, #F97316); box-shadow: 0 6px 14px rgba(249,115,22,.30); }
.card.c-red    .card-ico { background: linear-gradient(135deg, #FB7185, #E11D48); box-shadow: 0 6px 14px rgba(225,29,72,.30); }
.card.c-purple .card-ico { background: linear-gradient(135deg, #A78BFA, #7C3AED); box-shadow: 0 6px 14px rgba(124,58,237,.30); }

/* Panel */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.panel__head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel__head h3 { font-size: 15px; margin: 0; }
.panel__body { padding: 18px; }
.panel__body.flush { padding: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl thead th {
    background: var(--light-purple); color: var(--dark-purple);
    text-align: left; padding: 11px 14px; font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
table.tbl tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tbody tr:hover { background: #FBF7FB; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .amt-in  { color: var(--success); font-weight: 700; }
.tbl .amt-out { color: var(--danger);  font-weight: 700; }
.tbl .amt-info{ color: var(--info);    font-weight: 700; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* Badges */
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600; letter-spacing: .3px; white-space: nowrap;
}
.badge-controller      { background: #74306F; color: #fff; }
.badge-mini_controller { background: #9F3A91; color: #fff; }
.badge-supermaster     { background: #B83F94; color: #fff; }
.badge-master          { background: #3498DB; color: #fff; }
.badge-admin           { background: #F0A500; color: #fff; }
.badge-seller          { background: #28A745; color: #fff; }
.badge-active,   .badge-completed, .badge-paid, .badge-received { background: #E6F6EA; color: #1E7E34; }
.badge-suspended,.badge-pending,   .badge-unused { background: #FFF4DB; color: #A5730A; }
.badge-expired,  .badge-cancelled, .badge-overdue,.badge-revoked,.badge-failed,.badge-device_limit_reached { background: #FDE7E8; color: #B21520; }
.badge-info { background: #E4F1FB; color: #1F6FA5; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 7px; justify-content: center;
    padding: 9px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; background: #fff; color: var(--text);
    transition: filter .15s, background .15s, box-shadow .15s; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gadar-grad); color: #fff; box-shadow: 0 3px 10px rgba(109,40,217,.28); }
.btn-primary:hover { filter: brightness(1.05); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--dark-purple); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-info    { background: var(--info); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--light-purple); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-icon { padding: 6px 9px; }

.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Forms */
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
label.lbl { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: #444; }
.input, .select, textarea.input {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; font-family: inherit; background: #FbFAFC; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus {
    outline: 0; border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(184,63,148,.12);
}
textarea.input { resize: vertical; min-height: 90px; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 5px; }
.input-wrap { position: relative; }
.input-wrap .toggle-pw {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: 0; border: 0; cursor: pointer; color: var(--muted);
}
.help { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* Filters bar */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .form-group { margin: 0; }
.filters .input, .filters .select { min-width: 150px; padding: 8px 11px; }

/* Flash toast */
.toast-wrap { position: fixed; top: 74px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: #fff; border-left: 4px solid var(--info); border-radius: 8px;
    box-shadow: var(--shadow-md); padding: 13px 18px; min-width: 260px; max-width: 380px;
    display: flex; align-items: center; gap: 10px; font-size: 13.5px;
    animation: toastIn .25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Search results dropdown */
.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-md); color: var(--text); overflow: hidden; display: none; z-index: 70;
}
.search-results.show { display: block; }
.search-results a { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--light-purple); text-decoration: none; }
.search-results .st { font-size: 11px; color: var(--muted); background: var(--light-purple); padding: 2px 8px; border-radius: 20px; }

/* Key chips */
.keylist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 10px; }
.keychip {
    background: var(--light-purple); border: 1px dashed var(--primary); border-radius: 8px;
    padding: 10px 12px; font-family: 'Consolas', monospace; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between; gap: 8px; letter-spacing: 1px;
}
.keychip button { background:0; border:0; cursor:pointer; color: var(--secondary); }

/* Overlay for mobile sidebar */
.overlay { position: fixed; inset: 0; background: rgba(30,10,35,.4); z-index: 35; display: none; }
.overlay.show { display: block; }

/* Stat strip */
.statstrip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat-pill { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; box-shadow: var(--shadow); }
.stat-pill .n { font-size: 19px; font-weight: 700; }
.stat-pill .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }

/* Responsive */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .header { left: 0; }
    .main { margin-left: 0; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .header__search { max-width: none; }
    .header__dues { display: none; }
    .content { padding: 16px 14px 50px; }
}

/* ------------------------------- Login ------------------------------- */
body.login-page {
    background: #fff;
    display: grid; place-items: center; min-height: 100vh; padding: 0;
}
.login-card {
    width: 100%; max-width: 1480px; background: #fff;
    overflow: hidden;
    display: grid; grid-template-columns: 43fr 57fr; min-height: 100vh;
}
.login-brand {
    position: relative;
    background:
        radial-gradient(560px 420px at 0% 0%, rgba(167,139,250,.35), transparent 65%),
        radial-gradient(480px 380px at 8% 100%, rgba(196,181,253,.28), transparent 65%),
        linear-gradient(160deg, #FDFCFF 0%, #F6F2FE 100%);
    color: var(--text); padding: 48px 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    border-right: 1px solid #F0ECF8;
}
.login-brand .logo-tile {
    width: 138px; height: 138px; border-radius: 30px;
    background: linear-gradient(145deg, #170a2e 0%, #0d0620 60%, #1b0f38 100%);
    display: grid; place-items: center;
    box-shadow: 0 18px 40px rgba(23,10,46,.35);
    margin-bottom: 22px;
}
.login-brand .wordmark { font-size: 40px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.login-brand .wordmark .bi { color: #7C3AED; }
.login-brand .wordmark .ngo { background: linear-gradient(90deg, #7C3AED 20%, #C026D3 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-brand .wordmark-sub { font-size: 15px; font-weight: 600; letter-spacing: 11px; text-indent: 11px; color: #6b6478; margin-top: 6px; }
.login-brand .welcome { font-size: 40px; font-weight: 700; color: #2b2438; margin-top: 44px; line-height: 1.15; }
.login-brand .tagline { font-size: 16px; color: #8a8496; margin-top: 12px; }
.login-features { display: flex; gap: 16px; margin-top: 52px; width: 100%; max-width: 540px; justify-content: center; }
.login-feature {
    flex: 1 1 0; background: #fff; border: 1px solid #EFEAF7; border-radius: 14px;
    padding: 22px 14px 18px; box-shadow: 0 6px 18px rgba(60,30,110,.06);
}
.login-feature .fico {
    width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px;
    background: var(--light-purple); color: var(--primary);
    display: grid; place-items: center;
}
.login-feature .ft { font-weight: 700; font-size: 14.5px; color: #2b2438; }
.login-feature .fs { font-size: 12.5px; color: #8a8496; margin-top: 2px; }

.login-form {
    padding: 56px 72px; display: flex; flex-direction: column; justify-content: center;
    max-width: 640px; width: 100%; margin: 0 auto;
}
.login-avatar {
    width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 20px;
    border: 2px solid #E4DBF7; color: #B9A6E8;
    display: grid; place-items: center;
}
.login-form h2 { font-size: 33px; text-align: center; margin-bottom: 6px; color: #241d33; font-weight: 700; }
.login-form h2 .accent { color: var(--primary); }
.login-underline { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 34px; }
.login-underline::before, .login-underline::after { content: ""; height: 2px; width: 64px; background: #E7E1F3; }
.login-underline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin: 0 6px; }
.login-form .lbl { font-size: 12.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #4a4458; }
.input-wrap { position: relative; }
.input-wrap .in-ico {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #9d94b3; pointer-events: none; display: grid; place-items: center;
}
.input-wrap .input { padding-left: 44px; height: 54px; font-size: 15px; border-radius: 10px; }
.input-wrap .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.13); }
.input-wrap .eye {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; cursor: pointer; color: #9d94b3; display: grid; place-items: center; padding: 2px;
}
.input-wrap .eye:hover { color: var(--primary); }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.login-remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #555061; cursor: pointer; }
.login-remember input { width: 16px; height: 16px; accent-color: var(--primary); }
.login-forgot { font-size: 14px; color: var(--primary); font-weight: 500; }
.login-form .btn-signin {
    height: 56px; font-size: 15.5px; font-weight: 700; letter-spacing: 1.5px;
    border-radius: 10px; width: 100%;
    background: linear-gradient(90deg, #8B5CF6 0%, #6D28D9 100%);
    color: #fff; box-shadow: 0 10px 24px rgba(109,40,217,.30);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: 0; cursor: pointer; font-family: inherit;
}
.login-form .btn-signin:hover { filter: brightness(1.06); }
.login-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: #9d94b3; font-size: 13px; font-weight: 600; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: #E7E1F3; }
.login-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.login-alt .btn { height: 52px; font-size: 14.5px; font-weight: 600; border-radius: 10px; margin: 0; }
.btn-demo { background: #C9AFF5; color: #fff; opacity: 1; cursor: not-allowed; border: 0; }
.btn-demo:hover { filter: none; }
.btn-setup { background: linear-gradient(90deg, #0FB5CE 0%, #0895AE 100%); color: #fff; box-shadow: 0 6px 16px rgba(8,149,174,.28); border: 0; }
.btn-setup:hover { color: #fff; text-decoration: none; filter: brightness(1.05); }
.login-copy { text-align: center; font-size: 13px; color: #8a8496; margin-top: 34px; }
.login-copy b { color: var(--primary); font-weight: 700; }
.login-alert { background: #FDE7E8; color: #B21520; border-radius: 8px; padding: 11px 14px; font-size: 13px; margin-bottom: 18px; text-align: center; }
.login-alert.success { background: #E6F6EA; color: #1E7E34; }

@media (max-width: 1024px) {
    .login-form { padding: 48px 40px; }
    .login-brand { padding: 40px 28px; }
}
@media (max-width: 860px) {
    .login-card { grid-template-columns: 1fr; min-height: 100vh; }
    .login-brand { padding: 44px 24px; border-right: 0; border-bottom: 1px solid #F0ECF8; }
    .login-brand .welcome { font-size: 30px; margin-top: 30px; }
    .login-features { margin-top: 32px; }
    .login-form { padding: 40px 24px; }
    .login-alt { grid-template-columns: 1fr; }
}

/* Network breakdown chips (Control Panel Manage) */
.netcell { display: flex; flex-wrap: wrap; gap: 4px; max-width: 340px; }
.netchip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 20px;
    background: var(--light-purple); color: var(--dark-purple); white-space: nowrap;
}
.netchip b { font-weight: 700; }
.netchip.n0 { opacity: .45; }
.netcell.empty-net { color: var(--muted); font-size: 12px; }
.keys-pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-weight: 700; font-size: 13px; color: var(--dark-purple);
    background: #F3E8F2; padding: 4px 10px; border-radius: 8px;
}

/* Header search button (magenta square beside the input) — matches reference */
.header__search { display: flex; align-items: stretch; gap: 0; flex: 0 0 auto; width: 320px; max-width: 42vw; }
.header__search input { flex: 1 1 auto; border-radius: 8px 0 0 8px; }
.header__searchbtn {
    border: 0; background: var(--dark-purple); color: #fff; cursor: pointer;
    width: 46px; border-radius: 0 8px 8px 0; display: grid; place-items: center;
}
.header__searchbtn:hover { background: #5f2a5b; }
.header__dues {
    background: transparent; padding: 0 6px; border-radius: 0;
    font-weight: 700; font-size: 15px; letter-spacing: .3px; white-space: nowrap; color: #fff;
}

.badge-demo { background: #EDE9FE; color: #5B21B6; }

.demo-switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.demo-switch-title { font-size: 16px; font-weight: 700; color: var(--dark-purple); margin-bottom: 4px; }
.demo-toggle-form { margin: 0; flex: 0 0 auto; }
.demo-switch {
    position: relative; width: 58px; height: 32px; border: 0; border-radius: 999px;
    background: #D1D5DB; cursor: pointer; padding: 0; flex: 0 0 58px;
    transition: background .2s ease;
}
.demo-switch.on { background: linear-gradient(90deg, #8B5CF6 0%, #6D28D9 100%); }
.demo-switch-knob {
    position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18);
    transition: transform .2s ease;
}
.demo-switch.on .demo-switch-knob { transform: translateX(26px); }

.login-alt form { margin: 0; }
.login-alt form .btn { width: 100%; }
.btn-demo.btn-demo-on {
    background: linear-gradient(90deg, #8B5CF6 0%, #6D28D9 100%);
    cursor: pointer; box-shadow: 0 6px 16px rgba(109,40,217,.28);
}
.btn-demo.btn-demo-on:hover { filter: brightness(1.06); }
.demo-key-box {
    background: #F5F0FF; border: 1px solid #DDD6FE; border-radius: 10px;
    padding: 14px 16px; margin: 0 0 18px; text-align: left;
}
.demo-key-label { font-size: 12px; font-weight: 600; color: #6D28D9; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.demo-key-row { display: flex; align-items: center; gap: 10px; }
.demo-key-row code {
    flex: 1; font-size: 16px; font-weight: 700; letter-spacing: .6px;
    background: #fff; border-radius: 8px; padding: 10px 12px; color: #4C1D95;
}
.demo-key-hint { font-size: 12px; color: #6B7280; margin-top: 8px; }
