@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #08090b;
    --side: #111113;
    --panel: #18181b;
    --panel2: #242427;
    --field: #202024;
    --text: #f5f8ff;
    --muted: #9fb1ca;
    --line: #303036;
    --blue: #1298d5;
    --blue2: #28b8ff;
    --green: #27c986;
    --red: #ef5668;
    --yellow: #f5b22c;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    overflow-y: auto;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg);
    color: var(--text);
    font-family: Manrope, "Hind Siliguri", Arial, sans-serif;
    text-rendering: geometricPrecision;
}

a { color: inherit; }

@media (prefers-reduced-motion: no-preference) {
    body { animation: pageIn .28s ease-out both; }
    .content-wrap > * { animation: softUp .32s ease-out both; }
    .card, .table-card, .form, .section-card, .gateway-card, .invoice-toolbar { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
    .card:hover, .table-card:hover, .section-card:hover, .gateway-card:hover { transform: translateY(-1px); border-color: rgba(53,200,255,.32); }
    .btn, .nav a, .logout, .gateway-tab, .account-tabs label, input, select, textarea { transition: transform .14s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, opacity .16s ease; }
    .btn:active, .gateway-tab:active, .account-tabs label:active { transform: scale(.985); }
}

@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes softUp {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.app {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    min-height: 100vh;
    align-items: start;
    overflow: hidden;
}

.side {
    background: var(--side);
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
}

.brand {
    padding: 0 10px 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: block;
    flex: 0 0 auto;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(23, 217, 164, .12);
}

.logo {
    font-size: 26px;
    line-height: 1;
    font-weight: 900;
    color: #35c8ff;
}

.sublogo {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav-group {
    margin: 18px 10px 7px;
    color: #35c8ff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav a,
.logout {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #e3eeff;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.nav a:hover,
.nav a.active,
.logout:hover {
    background: #0e567c;
    color: #fff;
}

.logout-wrap {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.main {
    min-width: 0;
    height: 100vh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.admin-top {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 30px;
    border-bottom: 1px solid var(--line);
    background: #18181b;
}

.admin-top .eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #35c8ff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.topbar-mark {
    width: 18px;
    height: 18px;
    display: block;
    border-radius: 4px;
}

.admin-top b {
    display: block;
    margin-top: 3px;
    font-size: 18px;
}

.admin-top select {
    width: 240px;
    max-width: 100%;
}

.content-wrap { padding: 30px; }

.page-head,
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

h1 { margin: 0; font-size: 30px; line-height: 1.15; }
h2 { margin: 28px 0 14px; font-size: 20px; }
.hint { margin: 8px 0 0; color: var(--muted); }

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    padding: 10px 15px;
    font-family: Manrope, "Hind Siliguri", Arial, sans-serif;
    font-size: 14px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(18,152,213,.16);
}

.btn:hover {
    transform: translateY(-1px);
    background: #16a8ea;
    box-shadow: 0 14px 28px rgba(18,152,213,.24);
}

.btn.secondary { background: #263348; border: 1px solid #3b4a62; box-shadow: none; }
.btn.secondary:hover { background: #314057; border-color: #4d6180; }
.btn.danger { background: #d94155; box-shadow: 0 10px 22px rgba(239,86,104,.16); }
.btn.danger:hover { background: #ef5668; box-shadow: 0 14px 28px rgba(239,86,104,.24); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: #bfeaff; box-shadow: none; }
.btn.ghost:hover { background: rgba(40,184,255,.10); border-color: rgba(40,184,255,.44); }

.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.metric-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.balance-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(380px, 1.5fr);
    gap: 16px;
    align-items: stretch;
}

.card,
.form,
.table-card,
.section-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.card { padding: 22px; }
.hero-card { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 800; }
.stat b { display: block; margin-top: 7px; font-size: 27px; }

.metric-card {
    min-height: 128px;
    border-radius: 8px;
    padding: 20px;
    color: #fff;
}

.metric-card span { font-size: 12px; font-weight: 900; text-transform: uppercase; }
.metric-card b { display: block; margin-top: 12px; font-size: 32px; }
.metric-card small { display: block; margin-top: 8px; font-weight: 700; }
.metric-blue { background: #2f78ef; }
.metric-green { background: #20b985; }
.metric-yellow { background: #eda51a; }
.metric-red { background: #eb315f; }
.balance-overview-card {
    min-height: 128px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 20px;
}
.balance-overview-card > span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.balance-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.balance-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(159, 177, 202, .16);
}
.balance-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.balance-row strong {
    display: block;
    color: #eef5ff;
    font-size: 15px;
    line-height: 1.25;
}
.balance-row small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.balance-amount {
    text-align: right;
}
.balance-amount b {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.2;
    white-space: nowrap;
}
.account-balance-card b {
    font-size: clamp(22px, 2vw, 30px);
    white-space: nowrap;
}
.account-balance-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.35;
    word-break: break-word;
}

.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 860px; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { background: var(--panel2); color: #eef5ff; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
tbody tr, table tr { transition: background .16s ease; }
table tr:hover td { background: rgba(40,184,255,.035); }
td small, .muted { color: var(--muted); }

.pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: capitalize;
}

.pending { background: rgba(245,178,44,.14); color: var(--yellow); }
.success, .active, .online { background: rgba(39,201,134,.14); color: var(--green); }
.failed, .expired, .inactive, .offline { background: rgba(239,86,104,.14); color: var(--red); }

.form {
    max-width: 1080px;
    padding: 22px;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.setup-sections { display: grid; gap: 16px; }
.section-card { padding: 18px; }
.section-card h2 { margin: 0 0 12px; font-size: 18px; }
.field { margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--field);
    color: var(--text);
    border-radius: 8px;
    padding: 12px;
    font: inherit;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--blue2);
    box-shadow: 0 0 0 3px rgba(40,184,255,.14);
}

textarea { min-height: 100px; resize: vertical; }

.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.checks label { display: flex; gap: 9px; align-items: center; margin: 0; color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 11px; }
.checks input { width: auto; }

.ok,
.err {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 800;
}

.ok { background: rgba(39,201,134,.14); color: var(--green); border: 1px solid rgba(39,201,134,.28); }
.err { background: rgba(239,86,104,.14); color: var(--red); border: 1px solid rgba(239,86,104,.28); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-divider {
    width: 1px;
    height: 32px;
    background: var(--line);
}
.search { max-width: 360px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions .btn,
.inline-form .btn,
td .btn {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 850;
}
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.inline-form input { min-width: 150px; }
.success-btn { background: #19b85b; box-shadow: 0 10px 22px rgba(25,184,91,.16); }
.success-btn:hover { background: #22c76a; box-shadow: 0 14px 28px rgba(25,184,91,.24); }
.empty-row {
    text-align: center;
    padding: 46px 18px !important;
    color: var(--muted);
}
.action-stack {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    flex-wrap: nowrap;
}
.action-stack form {
    margin: 0;
}
.invoice-toolbar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 22px;
}
.invoice-filter {
    display: grid;
    grid-template-columns: 104px minmax(240px, 1fr) 150px 150px 110px;
    gap: 10px;
    align-items: center;
    margin: 0;
}
.entries-control {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
}
.entries-control select {
    height: 38px;
    min-height: 38px;
    padding: 0 10px;
}
.transaction-toolbar-group {
    flex: 1 1 680px;
    justify-content: flex-end;
    min-width: 0;
}
.transaction-toolbar {
    display: grid;
    grid-template-columns: auto minmax(230px, 400px) minmax(170px, 320px) auto;
    align-items: center;
    justify-content: end;
    gap: 12px;
    width: min(100%, 920px);
}
.transaction-toolbar .entries-control {
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.transaction-toolbar .entries-control select,
.transaction-toolbar .search,
.transaction-toolbar select[name="status"],
.transaction-toolbar .btn {
    height: 44px;
    min-height: 44px;
}
.transaction-toolbar .entries-control select {
    width: 82px;
}
.transaction-toolbar .search {
    width: 100%;
    max-width: none;
}
.transaction-toolbar select[name="status"] {
    width: 100%;
    line-height: 1.2;
    padding-top: 0;
    padding-bottom: 0;
}
.transaction-toolbar .btn {
    align-self: center;
    white-space: nowrap;
}
.transaction-toolbar .toolbar-divider {
    display: none;
}
.transaction-toolbar .btn.danger {
    grid-column: 4;
}
.modal {
    width: min(640px, calc(100vw - 30px));
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel2);
    color: var(--text);
    padding: 0;
    box-shadow: 0 28px 90px rgba(0,0,0,.58);
}
.modal::backdrop {
    background: rgba(4,8,15,.72);
    backdrop-filter: blur(5px);
}
.modal form { padding: 0; margin: 0; }
.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; }
.modal .form-grid,
.modal .field,
.modal-section-title,
.modal-actions {
    margin-left: 22px;
    margin-right: 22px;
}
.modal .form-grid { margin-top: 20px; }
.modal-section-title {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 900;
}
.modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #344155;
    color: #d9e6fb;
    font: inherit;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 22px;
    border-top: 1px solid var(--line);
}
.gateway-builder {
    width: min(640px, 100%);
    display: grid;
    gap: 26px;
}
.gateway-card {
    background: #222d3c;
    border: 1px solid #344155;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 18px 44px rgba(0,0,0,.18);
}
.gateway-card h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.gateway-card h3 {
    margin: 22px 0 14px;
    color: #19c5ff;
    font-size: 15px;
    border-bottom: 1px solid rgba(25,197,255,.30);
    padding-bottom: 9px;
}
.cyan { color: #19c5ff; }
.divider {
    height: 1px;
    background: #3a4657;
    margin: 12px 0 20px;
}
.gateway-select-card {
    padding-bottom: 18px;
}
.gateway-select-card h2 {
    font-size: 16px;
    margin-bottom: 14px;
}
.gateway-tabs,
.account-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.gateway-tab,
.account-tabs label {
    min-height: 31px;
    border: 0;
    border-radius: 999px;
    background: #374254;
    color: #fff;
    padding: 8px 15px;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0,0,0,.14);
}
.gateway-tab.active,
.account-tabs label:has(input:checked) {
    background: linear-gradient(135deg, #14b9ff, #047fbd);
    box-shadow: 0 10px 24px rgba(20,185,255,.22);
}
.gateway-tab:hover,
.account-tabs label:hover {
    transform: translateY(-1px);
    background: #435068;
}
.gateway-tab.active:hover,
.account-tabs label:has(input:checked):hover {
    background: linear-gradient(135deg, #21c0ff, #078acc);
}
.account-tabs input { display: none; }
.gateway-brand-field { max-width: 320px; }
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}
.gateway-grid[hidden],
#accountTypeBlock[hidden],
.account-tabs label[hidden],
[hidden] {
    display: none !important;
}
.amount-field {
    position: relative;
}
.amount-field input {
    padding-right: 78px;
}
.amount-field > span {
    position: absolute;
    right: 16px;
    top: 34px;
    min-width: 42px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #1f2b3d;
    color: #e8f2ff;
    border: 1px solid rgba(126, 160, 201, .42);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .03em;
    pointer-events: none;
}
.fee-field input {
    padding-right: 54px;
}
.fee-field > span {
    min-width: 30px;
}
.field-icon {
    color: #18c2ff;
    font-weight: 900;
    margin-right: 5px;
}
.gateway-card input,
.gateway-card select,
.gateway-card textarea {
    background: #3a4658;
    border-color: #566274;
    color: #fff;
}
.gateway-card input::placeholder {
    color: #aebbd0;
}
.gateway-card input:disabled {
    opacity: 1;
    color: #d9e5f6;
    background: #3b4658;
}
.gateway-card input[type="file"] {
    min-height: 44px;
    padding: 9px;
}
.current-upload {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(24,194,255,.28);
    background: rgba(24,194,255,.08);
    color: #dbeafe;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 800;
}
.current-upload-thumb {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    flex: 0 0 auto;
}
.current-upload-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.current-upload small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    word-break: break-all;
}
.current-upload-empty {
    color: var(--muted);
    background: rgba(148,163,184,.08);
    border-color: rgba(148,163,184,.22);
}
.radio-stack {
    display: grid;
    gap: 12px;
}
.radio-stack label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    border: 1px solid rgba(73, 94, 124, .56);
    background: linear-gradient(180deg, rgba(14, 23, 38, .96), rgba(10, 18, 31, .96));
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    color: #dcecff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.radio-stack input {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    background: #314057;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    cursor: pointer;
    outline: none;
    transition: background .16s ease, box-shadow .16s ease;
}
.radio-stack input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.28);
    transition: transform .16s ease;
}
.radio-stack input:checked {
    background: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74,158,255,.14);
}
.radio-stack input:checked::after {
    transform: translateX(20px);
}
.radio-stack label:has(input:checked) {
    border-color: rgba(74, 158, 255, .72);
    background: linear-gradient(180deg, rgba(18, 39, 64, .98), rgba(12, 25, 43, .98));
    box-shadow: 0 12px 26px rgba(18, 152, 213, .12), inset 0 1px 0 rgba(255,255,255,.04);
}
.radio-stack label:hover {
    border-color: rgba(74, 158, 255, .48);
    background: #101b2d;
}
.radio-stack b,
.radio-stack small {
    display: block;
}
.radio-stack b {
    color: #eef6ff;
    font-size: 14px;
    line-height: 1.25;
}
.radio-stack small {
    margin-top: 5px;
    color: #a9c4e8;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 750;
}
.gateway-note {
    margin-top: 14px;
    border: 1px solid rgba(245,178,44,.28);
    background: rgba(245,178,44,.10);
    color: #ffe2a0;
    border-radius: 8px;
    padding: 12px 13px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}
.gateway-controls {
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.save-gateway {
    width: 100%;
    margin-top: 20px;
    background: linear-gradient(135deg, #28ca68, #0b9c91);
    box-shadow: 0 14px 28px rgba(39,201,134,.20);
}
.save-gateway:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(39,201,134,.26);
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 28% 22%, rgba(18, 152, 213, .14), transparent 32%),
        radial-gradient(circle at 72% 76%, rgba(39, 201, 134, .10), transparent 28%),
        var(--bg);
}

.login-card {
    width: min(540px, 100%);
    border: 1px solid rgba(84, 113, 154, .55);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(21, 31, 47, .98), rgba(14, 21, 35, .98));
    padding: 42px 38px 36px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
    text-align: center;
}

.login-mark {
    width: 72px;
    height: 72px;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 18px 38px rgba(23, 217, 164, .16);
    margin: 0 auto 26px;
}

.login h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.06;
}

.login-subtitle {
    margin: 10px 0 28px;
    color: #b9cff1;
    font-size: 18px;
    font-weight: 800;
}

.login-alert {
    border: 1px solid rgba(239, 86, 104, .35);
    background: rgba(239, 86, 104, .12);
    color: #ff6f7f;
    border-radius: 8px;
    padding: 12px 13px;
    margin-bottom: 16px;
    font-weight: 900;
}

.google-login-btn {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: #fff;
    color: #142033;
    font-size: 19px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 18px 34px rgba(0, 0, 0, .24);
}

.google-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(0, 0, 0, .30);
}

.google-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid #dbe3ef;
    background: #fff;
    flex: 0 0 auto;
}

.google-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.login-footnote {
    margin: 24px 0 0;
    color: #b8cbea;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 800;
}

.login-footnote b { color: #dceaff; }
.pager { margin-top: 16px; color: var(--muted); }
.compact-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 14px;
}
.pager-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pager-btn,
.pager-current {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 12px;
    background: var(--field);
    color: #dceaff;
    font-weight: 800;
    text-decoration: none;
}
.pager-btn:not(.disabled):hover {
    border-color: rgba(53, 200, 255, .42);
    color: #fff;
}
.pager-btn.disabled {
    opacity: .48;
    cursor: not-allowed;
}
.pager-current {
    background: transparent;
    color: var(--muted);
}
.setup-note { border: 1px solid rgba(40,184,255,.28); background: rgba(40,184,255,.10); color: #b8e9ff; border-radius: 8px; padding: 13px 14px; margin-bottom: 18px; font-weight: 800; }
.device-setup-card {
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(39, 201, 134, .32);
    border-radius: 8px;
    background: rgba(39, 201, 134, .08);
}
.device-setup-card h2 {
    margin: 0 0 6px;
    color: #dfffee;
}
.setup-copy-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 92px;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}
.setup-copy-row span {
    display: block;
    color: #d7e8ff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}
.setup-copy-row code {
    min-height: 44px;
    display: flex;
    align-items: center;
    overflow: auto hidden;
    white-space: nowrap;
    border: 1px solid rgba(53, 200, 255, .22);
    border-radius: 8px;
    background: #0e1523;
    color: #e8f9ff;
    padding: 10px 12px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}
.device-setup-qr {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border-radius: 8px;
    background: #0e1523;
    padding: 16px;
    text-align: center;
}
.device-setup-qr img {
    width: 220px;
    height: 220px;
    border-radius: 8px;
    background: #fff;
}
.device-setup-qr p {
    margin: 0;
    color: #b8cbea;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 800;
}
.device-setup-finish {
    max-width: 1080px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.device-setup-finish .hint {
    margin: 0;
}
.help-float { display: none; }
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .metric-cards, .dashboard-summary-grid, .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .balance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .balance-overview-card { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
    .app {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .side { position: relative; height: auto; }
    .main { height: auto; min-height: 100vh; overflow: visible; }
    .content-wrap { padding: 18px; }
    .admin-top, .page-head, .topbar { align-items: flex-start; flex-direction: column; }
    .grid, .metric-cards, .dashboard-summary-grid, .balance-grid, .form-grid, .checks { grid-template-columns: 1fr; }
    .balance-row { grid-template-columns: 1fr; gap: 6px; }
    .balance-amount { text-align: left; }
    .invoice-toolbar, .invoice-filter, .transaction-toolbar { grid-template-columns: 1fr; width: 100%; }
    .transaction-toolbar-group { width: 100%; flex-basis: auto; }
    .transaction-toolbar .entries-control { width: 100%; }
    .gateway-builder { max-width: none; }
    .gateway-grid { grid-template-columns: 1fr; }
    table { min-width: 760px; }
    .device-setup-card { grid-template-columns: 1fr; }
    .setup-copy-row { grid-template-columns: 1fr; }
}
