:root {
    --bg: #F4F6F8;
    --card: #FFFFFF;
    --border: #DCE2E8;
    --primary: #2457A7;
    --success: #198754;
    --warning: #D99A00;
    --danger: #C0392B;
    --text: #17212B;
    --text-secondary: #5F6B76;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5), 0 8px 10px -6px rgba(0,0,0,0.3);
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

*:focus { outline: none !important; }
*:focus-visible { outline: none !important; }
button:focus { outline: none !important; box-shadow: none !important; }
a:focus { outline: none !important; }
input:focus { outline: none !important; }
textarea:focus { outline: none !important; }
select:focus { outline: none !important; }

a, button, .btn, [role="button"], input[type="submit"], input[type="button"] {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

a:active, button:active, .btn:active, [role="button"]:active {
    transform: scale(0.96);
}

a:hover, button:hover, .btn:hover, [role="button"]:hover {
    transform: translateY(-1px);
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    background-color: var(--bg);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #2563EB; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-warning { background: var(--warning); color: #000; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; border-radius: 50%; min-width: unset; }
.btn-icon svg { width: 22px; height: 22px; }

.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.btn.loading .spinner { display: block; }
.btn.loading .btn-text { display: none; }
.btn.loading { pointer-events: none; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== INPUTS ========== */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 1;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    transition: all var(--transition);
    outline: none;
}

/* Only add extra left padding when an icon is present */
.input-group:has(.input-icon) input,
.input-group:has(.input-icon) select,
.input-group:has(.input-icon) textarea {
    padding-left: 48px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.input-group select {
    appearance: none;
    cursor: pointer;
}

.input-group select + .input-icon {
    right: 16px;
    left: auto;
}

.input-group .error-text {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.input-group.error input {
    border-color: var(--danger);
}

.input-group.error .error-text {
    display: block;
}

.input-group.success input {
    border-color: var(--success);
}

/* ========== CARDS ========== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.card-body {
    color: var(--text-secondary);
}

/* ========== BALANCE CARD ========== */
.balance-card {
    background: linear-gradient(135deg, #1e1e9e 0%, #4a2bff 55%, #8b3bff 100%);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(74,43,255,0.28);
    color: #fff;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59,130,246,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.balance-label {
    font-size: 13px;
    color: rgba(255,255,255,0.88);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    text-shadow: 0 2px 14px rgba(0,0,0,0.18);
}

.balance-sub {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.balance-sub-item {
    font-size: 13px;
    color: rgba(255,255,255,0.88);
}

.balance-sub-item strong {
    color: #fff;
    font-weight: 600;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.blue { background: rgba(59,130,246,0.15); color: var(--primary); }
.stat-icon.green { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-icon.yellow { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-icon.red { background: rgba(239,68,68,0.15); color: var(--danger); }

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    overflow: hidden;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    min-width: 0;
}

.header-logo span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563EB, #1d4ed8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.header-logo .logo-img {
    width: clamp(34px, 9vw, 44px);
    height: clamp(34px, 9vw, 44px);
    border-radius: clamp(10px, 3vw, 13px);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(74,43,255,0.35);
}

/* Responsive brand mark for auth screens (login / register) */
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.auth-brand img {
    width: clamp(56px, 18vw, 84px);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: clamp(14px, 4vw, 22px);
    box-shadow: 0 8px 24px rgba(74,43,255,0.35);
    max-width: 100%;
}

.auth-brand .auth-title {
    margin-bottom: 0;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo-img {
    width: clamp(56px, 18vw, 84px);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: clamp(14px, 4vw, 22px);
    box-shadow: 0 8px 24px rgba(74,43,255,0.35);
    max-width: 100%;
    margin-bottom: 10px;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-clock {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.header-btn svg {
    width: 22px;
    height: 22px;
}

.header-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(59,130,246,0.1);
}

.header-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.header-profile:hover {
    background: rgba(255,255,255,0.05);
}

.header-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.header-profile-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 240px;
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 16px 0;
    overflow-y: auto;
    z-index: 90;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    border-right: 3px solid transparent;
}

.sidebar-nav-item a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.03);
}

.sidebar-nav-item a.active {
    color: var(--primary);
    background: rgba(59,130,246,0.1);
    border-right-color: var(--primary);
}

.sidebar-nav-item a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.center-btn {
    margin-top: -24px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.center-btn.qr-locked {
    margin-top: -10px;
    opacity: .55;
    filter: grayscale(1) brightness(.95);
}
.bottom-nav-item.center-btn.qr-locked .center-icon {
    box-shadow: none;
    border-color: rgba(255,255,255,0.08);
    background: rgba(170,160,200,.12);
    color: rgba(120,110,160,.5);
}

.bottom-nav-item.center-btn:hover {
    transform: none;
}
.bottom-nav-item.center-btn:active {
    transform: none;
}

.bottom-nav-item .center-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b2ff7 0%, #a855f7 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
    transition: all 0.25s;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.bottom-nav-item .center-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.bottom-nav-item .center-icon:active {
    transform: scale(0.96);
    transition-duration: 120ms;
}

.bottom-nav-item .center-icon:active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    animation: rippleFade 0.4s ease-out forwards;
}

.bottom-nav-item .center-icon:focus,
.bottom-nav-item .center-icon:focus-visible,
.bottom-nav-item .center-icon:focus-within {
    outline: none !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.3) !important;
}

@keyframes rippleFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.bottom-nav-item .center-icon svg {
    width: 30px;
    height: 30px;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 240px;
    margin-top: 64px;
    padding: 32px;
    min-height: calc(100vh - 64px);
}

.main-content.no-sidebar {
    margin-left: 0;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== AUTH PAGES ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}

.auth-logo .logo-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(238,243,255,0.92);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ========== NOTIFICATION POPUP ========== */
.notification-popup {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
}

.notification-item.success { border-left: 4px solid var(--success); }
.notification-item.error { border-left: 4px solid var(--danger); }
.notification-item.warning { border-left: 4px solid var(--warning); }
.notification-item.info { border-left: 4px solid var(--primary); }

.notification-item .notif-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-item .notif-content {
    flex: 1;
}

.notification-item .notif-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.notification-item .notif-message {
    font-size: 13px;
    color: var(--text-secondary);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9997;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text);
    border-color: var(--text-secondary);
}

/* ========== TABLES ========== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: rgba(255,255,255,0.03);
}

th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--primary); }
.badge-neutral { background: rgba(148,163,184,0.15); color: var(--text-secondary); }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== SEARCH BAR ========== */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

/* ========== FILTERS ========== */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--primary);
}

/* ========== ACCOUNT CARD ========== */
.account-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.account-card:hover {
    box-shadow: var(--shadow-lg);
}

.account-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.account-type-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(59,130,246,0.1);
    color: var(--primary);
}

.account-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.account-info-item label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}

.account-info-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.account-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========== SELECTABLE CARDS ========== */
.selectable-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.selectable-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.selectable-card:hover {
    border-color: var(--primary);
    background: rgba(59,130,246,0.05);
}

.selectable-card.selected {
    border-color: var(--primary);
    background: rgba(59,130,246,0.1);
}

.selectable-card svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
    margin-bottom: 12px;
}

.selectable-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.selectable-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========== QR SECTION ========== */
.qr-section {
    text-align: center;
    padding: 24px;
}

.qr-section img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    background: #fff;
    padding: 8px;
}

/* QR canvas generated by qrcodejs also needs white background */
.qr-section canvas {
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 8px;
    display: block;
}

.qr-section .upi-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.qr-section .upi-display span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.qr-section .upi-display .copy-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 86px;
    }
    
    .bottom-nav {
        display: block;
    }
    .bottom-nav-item.center-btn {
        margin-top: -30px;
    }
    .bottom-nav-item.center-btn.qr-locked {
        margin-top: -20px;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .header-center {
        display: none;
    }
    
    .header-profile-name {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .balance-card {
        padding: 24px;
    }
    
    .balance-amount {
        font-size: 28px;
    }
    
    .auth-card {
        padding: 24px;
    }
    
    .account-card-body {
        grid-template-columns: 1fr;
    }
    
    .notification-popup {
        right: 16px;
        left: 16px;
    }
    
    .notification-item {
        min-width: unset;
    }
    
    .selectable-cards {
        grid-template-columns: 1fr 1fr;
    }

    .page-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .selectable-cards {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 10px 12px;
    }
    
    .main-content {
        padding: 12px;
        padding-bottom: 80px;
    }
    
    .balance-amount {
        font-size: 24px;
    }
}

#creditToastContainer {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: calc(100% - 32px);
    pointer-events: none;
}
#creditToastContainer > * {
    pointer-events: auto;
}

.ct-toast {
    width: 100%;
    max-width: 360px;
    background: #111827;
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid #2563EB;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow: hidden;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    padding: 14px 14px 14px 12px;
}
.ct-type {
    font-size: 13px;
    font-weight: 600;
    color: #CBD5E1;
    margin-top: 5px;
}
.ct-toast.ct-toast-success {
    border-left-color: #10B981;
}
.ct-toast.ct-toast-error {
    border-left-color: #EF4444;
}
.ct-toast.ct-open {
    transform: translateY(0);
    opacity: 1;
}
.ct-toast.ct-closing {
    transform: translateY(-20px);
    opacity: 0;
}
.ct-body {
    flex: 1;
    min-width: 0;
}
.ct-heading {
    font-size: 15px;
    font-weight: 700;
    color: #F8FAFC;
    line-height: 1.3;
}
.ct-sub {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 400;
    margin-top: 4px;
    line-height: 1.3;
}
.ct-sub strong {
    color: #10B981;
    font-weight: 600;
}
.ct-time {
    font-size: 11px;
    color: #475569;
    margin-top: 6px;
}
.ct-close {
    width: 28px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: color 0.2s;
    padding: 0;
    margin: -2px -2px 0 8px;
    border-radius: 6px;
    line-height: 1;
    transform: none !important;
}
.ct-close:hover {
    color: #F8FAFC;
    transform: none !important;
}
.ct-close:active {
    transform: none !important;
}

@media (max-width: 480px) {
    #creditToastContainer { max-width: 320px; }
}

/* ========== ADMIN DRAWER (mobile) ========== */
/* ========== SMS-STYLE CREDIT NOTIFICATION (TRUECALLER) ========== */
#smsToastContainer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483647;
    display: block;
    pointer-events: none;
}
#smsToastContainer > * { pointer-events: auto; }

.sms-toast {
    position: fixed;
    top: 4px;
    right: 12px;
    max-width: 470px;
    width: 100%;
    background: #1A73E8;
    border: none;
    border-radius: 18px;
    padding: 0 4px 4px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(0,0,0,.45);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s ease;
    box-sizing: border-box;
    color: #ffffff;
}
.sms-toast.sms-open { transform: translateX(0); opacity: 1; }
.sms-toast.sms-closing { transform: translateX(120%); opacity: 0; }

.sms-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1A73E8;
    color: #fff;
    padding: 10px 14px 9px;
    margin: 0 -7px;
}
.sms-brand {
    font-size: 17px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: .2px;
}
.sms-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sms-bar-meta {
    flex: 1;
    text-align: center;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .3px;
    white-space: nowrap;
    color: #fff;
}
.sms-close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin: 0;
}

.sms-card {
    background: #000000;
    border-radius: 10px;
    overflow: hidden;
}

.sms-body { padding: 11px 16px 6px; }
.sms-bank-row {
    display: flex;
    align-items: center;
    gap: 11px;
}
.sms-bank-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #D70015;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.sms-bank-logo svg { width: 16px; height: 16px; display: block; }
img.sms-bank-logo {
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #E8E6E3;
    padding: 3px;
    object-fit: contain;
    object-position: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    flex-shrink: 0;
}
.sms-bank-name {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: .1px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sms-credit {
    font-size: 28px;
    font-weight: 800;
    color: #00C853;
    margin: 9px 0 6px;
    line-height: 1.1;
}
.sms-credit.sms-debit {
    color: #FF5A1F;
}
.sms-text {
    font-size: 15.5px;
    line-height: 1.55;
    color: #9AA0A6;
    margin: 0 0 9px;
}
.sms-text b,
.sms-text strong {
    color: #FFFFFF;
    font-weight: 700;
}
.sms-ai {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 6px;
    line-height: 1.2;
}
.sms-ai-icon {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
    display: block;
}
.sms-ai-label {
    font-size: 15.5px;
    font-weight: 500;
    color: #9AA0A6;
    letter-spacing: .1px;
}
.sms-actions {
    display: flex;
    border-top: 1px solid #16233A;
    background: #0A1424;
}
.sms-act {
    flex: 1;
    border: none;
    background: transparent;
    color: #5B9BFF;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .3px;
    font-family: inherit;
    text-transform: none;
    padding: 11px 6px;
    cursor: pointer;
}
.sms-act + .sms-act { border-left: 1px solid #16233A; }
.sms-act:active { background: rgba(255,255,255,.06); }

/* ---- Paytm notification banner ---- */
.paytm-toast {
    position: fixed;
    top: 4px;
    right: 12px;
    width: 100%;
    max-width: 470px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    background: rgba(14,16,20,.78);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 28px;
    box-shadow: 0 14px 38px rgba(0,0,0,.55);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-sizing: border-box;
    color: #F3F5F8;
    cursor: pointer;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s ease;
    z-index: 2147483647;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .paytm-toast { background: rgba(14,16,20,.58); }
}
.paytm-toast.paytm-open { transform: translateX(0); opacity: 1; }
.paytm-toast.paytm-closing { transform: translateX(120%); opacity: 0; }

.paytm-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a2f74;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.paytm-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.paytm-copy {
    flex: 1;
    min-width: 0;
}
.paytm-title {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: #F3F5F8;
}
.paytm-title-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.paytm-sep { font-weight: 700; }
.paytm-now {
    font-weight: 600;
}
.paytm-bell {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    color: #F3F5F8;
}
.paytm-sub {
    margin-top: 3px;
    font-size: 16px;
    line-height: 1.3;
    color: rgba(233,238,246,.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.paytm-expand {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
    color: #F3F5F8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.paytm-expand svg {
    width: 22px;
    height: 22px;
    display: block;
}
.paytm-expand:active { background: rgba(255,255,255,.20); }

@media (max-width: 560px) {
    .paytm-toast {
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        gap: 11px;
        padding: 12px 16px;
        border-radius: 0 0 20px 20px;
    }
    .paytm-icon { width: 48px; height: 48px; border-radius: 14px; }
    .paytm-title { font-size: 15.5px; }
    .paytm-sub { font-size: 14.5px; }
    .paytm-bell { width: 17px; height: 17px; }
    .paytm-expand { width: 38px; height: 38px; }
}

@media (max-width: 560px) {
    .sms-toast {
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0 0 16px 16px;
    }
    .sms-bank-name { font-size: 16px; }
    .sms-credit { font-size: 25px; }
    .sms-text { font-size: 15px; }
    .sms-ai { gap: 8px; margin-bottom: 8px; }
    .sms-ai-icon { width: 21px; height: 21px; }
    .sms-ai-label { font-size: 15px; }
    .sms-act { font-size: 13.5px; padding: 11px 4px; }
}
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.2s;
}
.hamburger-btn:hover { border-color: var(--primary); color: var(--primary); }
.hamburger-btn svg { width: 20px; height: 20px; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,0.6);
    z-index: 91;
    opacity: 0;
    transition: opacity 0.3s;
}
.sidebar-backdrop.active { opacity: 1; }

@media (max-width: 768px) {
    .hamburger-btn { display: flex; }
    .sidebar-backdrop { display: block; pointer-events: none; }
    .sidebar-backdrop.active { pointer-events: auto; }
    .sidebar {
        display: block;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
        top: 64px;
        bottom: 0;
        width: 264px;
        z-index: 92;
        box-shadow: 8px 0 32px rgba(0,0,0,0.35);
    }
    .sidebar.open { transform: translateX(0); }
}

/* ========== BROADCAST MODAL ========== */
.broadcast-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(2,6,23,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: bcFadeIn 0.25s ease;
}
@keyframes bcFadeIn { from { opacity: 0; } to { opacity: 1; } }
.broadcast-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 18px;
    padding: 28px 24px 24px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    animation: bcPop 0.35s cubic-bezier(0.16,1,0.3,1);
    text-align: center;
}
@keyframes bcPop { from { opacity: 0; transform: translateY(24px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.broadcast-modal.bc-hiding { animation: bcHide 0.3s ease forwards; }
@keyframes bcHide { to { opacity: 0; transform: translateY(12px) scale(0.97); } }
.bc-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(51,65,85,0.5);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
    padding: 0;
}
.bc-close:hover { background: rgba(239,68,68,0.2); color: #EF4444; }
.bc-poster-wrap { margin: -28px -24px 18px; border-radius: 18px 18px 0 0; overflow: hidden; }
.bc-poster { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.bc-title { font-size: 19px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.bc-message { font-size: 14px; color: var(--text-secondary); line-height: 1.55; white-space: pre-line; }

/* ========== CHECKBOX PERMISSION CARDS ========== */
.perm-grid { grid-template-columns: repeat(4, 1fr); }
.checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
    background: transparent;
    user-select: none;
}
.checkbox-card:hover { border-color: var(--primary); color: var(--text); }
.checkbox-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(59,130,246,0.1);
    color: var(--text);
}
.checkbox-card input { accent-color: var(--primary); }
@media (max-width: 768px) {
    .perm-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
 * GLOBAL RESPONSIVE HARDENING + TEXT SELECTION (ALL PANELS)
 * ============================================================ */

/* --- Overflow guards: page horizontal scroll kabhi nahi --- */
html, body { max-width: 100%; overflow-x: hidden; }

/* --- Responsive media (images/logos/avatars/banners) --- */
img, video, canvas, iframe { max-width: 100%; height: auto; }
svg { max-width: 100%; }

/* --- Smart wrapping: text/plates kabhi container se bahar na nikle --- */
p, h1, h2, h3, h4, h5, label, td, th, li, code, pre,
.stat-value, .stat-label, .card-title, .page-title, .page-subtitle,
.notif-title, .notif-message, .header-profile-name, .balance-amount {
    overflow-wrap: break-word;
}
code { white-space: normal; }
td, th { max-width: 260px; overflow-wrap: break-word; }

/* --- Tables: sirf container ke andar scroll, page nahi --- */
.table-container { max-width: 100%; -webkit-overflow-scrolling: touch; }

/* --- Text selection: UI text non-selectable; fields selectable --- */
body { user-select: none; -webkit-user-select: none; }
input, textarea, select, [contenteditable="true"] { user-select: text; -webkit-user-select: text; }

/* --- Responsive typography (no browser zoom needed) --- */
.page-title { font-size: clamp(21px, 3.5vw, 28px); }
.card-title { font-size: clamp(17px, 2.6vw, 20px); }
.balance-amount { font-size: clamp(24px, 4vw, 34px); }
.auth-title { font-size: clamp(20px, 4.5vw, 24px); }
.stat-value { font-size: clamp(19px, 3vw, 24px); }
.modal-title { font-size: clamp(17px, 3vw, 20px); }
.header-logo { font-size: clamp(16px, 3vw, 20px); }

/* --- Responsive form/info grids (replaces fixed inline grids) --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2x { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: end; }

/* --- Tablet (compact spacing) --- */
@media (max-width: 1024px) {
    .grid-2, .grid-3 { column-gap: 16px; row-gap: 16px; }
    .main-content { padding: 24px 20px; }
}

/* --- Small tablet / large phones --- */
@media (max-width: 820px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .page-header { margin-bottom: 20px; }
    .stats-grid { margin-bottom: 20px; gap: 14px; }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .card { padding: 20px; }
    .modal-content { padding: 24px; }
    .auth-card { padding: 24px 20px; }
    .main-content { padding: 16px 14px 84px; }
    .filter-bar select, .filter-bar input { flex: 1 1 100%; }
    .search-bar { max-width: none; }
}

@media (max-width: 480px) {
    body { font-size: 14px; }
    .card { padding: 16px; }
    .card-title { font-size: 17px; }
    .main-content { padding: 12px 10px 84px; }
    .stats-grid { gap: 10px; margin-bottom: 16px; }
    .page-header { margin-bottom: 16px; }
    .grid-2x { grid-template-columns: 1fr; }
    th, td { padding: 10px 12px; }
    table { font-size: 13px; }
    .btn { padding: 11px 16px; font-size: 14px; }
    .btn-sm { padding: 7px 12px; font-size: 12px; }
    .modal-overlay { padding: 10px; align-items: flex-start; padding-top: 24px; }
    .modal-content { padding: 18px 16px; max-height: 92vh; }
    .auth-page { padding: 12px; }
    .auth-card { padding: 22px 16px; }
    .auth-logo .logo-text { font-size: 24px; }
    .notification-popup { top: 68px; right: 10px; left: 10px; }
    .header { padding: 8px 10px; height: 60px; }
    .header-logo .logo-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }
    .header-profile { padding: 4px 8px; }
    .header-profile-img { width: 34px; height: 34px; }
    .main-content { margin-top: 60px; }
    .sidebar { top: 60px; }
    .bottom-nav-item .center-icon { width: 56px; height: 56px; }
    .balance-card { padding: 20px; }
}

/* ============================================================
 * PAYMENT SCREENSHOT MODAL - Responsive
 * ============================================================ */
#screenshotModal .modal-content {
    max-width: 560px;
    width: 100%;
    padding: 16px;
}

#screenshotModal img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    object-fit: contain;
}

@media (max-width: 480px) {
    #screenshotModal .modal-content {
        max-width: 100%;
        padding: 12px;
        margin: 8px;
    }
    #screenshotModal img {
        max-height: 60vh;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    #screenshotModal .modal-content {
        max-width: 500px;
    }
}

/* ============================================================
 * BRAND HEADINGS — no black titles anywhere in user pages.
 * Page titles get navy→purple gradient text, section titles get
 * solid brand purple. Both stay fully readable on light cards.
 * ============================================================ */
.dp-wrap h1, .dp-wrap h2,
.ac-wrap h1,
.af-wrap h1, .af-wrap h2,
.pa-wrap h1,
.hm-wrap h1,
.wl-wrap h1 {
    background: linear-gradient(120deg, #1a1446 0%, #5b2bff 75%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.dp-sec-t,
.dp-secrow .dp-sec-t,
.dp-pagehead h1,
.dp-head h1 {
    color: #4a2bff;
}


/* ============================================================
 * MIN DESIGN SYSTEM v2 — refined minimal white + blue
 * ============================================================ */
.mn-wrap{--mn-ink:#0e1c38;--mn-muted:#8c96ad;--mn-line:#edf0f7;--mn-accent:#2563eb;--mn-accent2:#4d81ff;--mn-soft:#f2f6ff;--mn-ok:#15a05a;--mn-warn:#c97d0a;--mn-bad:#e11d48;max-width:640px;margin:0 auto;padding:10px 16px 110px;color:var(--mn-ink);font-family:'Inter',sans-serif;animation:mnIn .3s ease;-webkit-tap-highlight-color:transparent}
@keyframes mnIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.mn-pagehead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 2px 16px}
.mn-pagehead h1{font-size:21px;font-weight:800;letter-spacing:-.4px;margin:0}
.mn-pagehead .mn-link{flex-shrink:0}
.mn-card{background:#fff;border:1px solid var(--mn-line);border-radius:18px;box-shadow:0 1px 2px rgba(14,28,56,.03),0 12px 32px -20px rgba(14,28,56,.14);padding:20px;transition:box-shadow .25s ease}
.mn-card:hover{box-shadow:0 1px 2px rgba(14,28,56,.03),0 14px 36px -20px rgba(14,28,56,.18)}
.mn-card+.mn-card{margin-top:12px}
.mn-seclabel{font-size:10.5px;font-weight:700;letter-spacing:1.1px;text-transform:uppercase;color:#9aa4bb;margin:22px 2px 10px}
.mn-seclabel:first-child{margin-top:2px}
.mn-sub{font-size:12.5px;color:var(--mn-muted);line-height:1.6}
.mn-link{font-size:13px;font-weight:700;color:var(--mn-accent);text-decoration:none;transition:opacity .15s}
.mn-link:hover{opacity:.75}
.mn-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px;border:none;border-radius:13px;background:linear-gradient(135deg,var(--mn-accent),var(--mn-accent2));color:#fff;font-size:14px;font-weight:700;letter-spacing:.1px;font-family:inherit;cursor:pointer;text-decoration:none;box-shadow:0 8px 20px -8px rgba(37,99,235,.55);transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}
.mn-btn:hover{filter:brightness(1.05);box-shadow:0 10px 24px -8px rgba(37,99,235,.6)}
.mn-btn:active{transform:scale(.985)}
.mn-btn:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.mn-btn.mn-ghost{background:var(--mn-soft);color:var(--mn-accent);box-shadow:none}
.mn-btn.mn-ghost:hover{filter:none;background:#e8efff}
.mn-btn.mn-danger{background:#fef1f3;color:var(--mn-bad);box-shadow:none}
.mn-btnrow{display:flex;gap:10px;margin-top:14px}
.mn-btnrow .mn-btn{flex:1}
.mn-field{margin-bottom:14px}
.mn-field label{display:block;font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:#9aa4bb;margin-bottom:7px}
.mn-field input,.mn-field select{width:100%;padding:13px 14px;font-size:14.5px;font-weight:600;border:1.5px solid #e5eaf3;border-radius:12px;background:#fff;color:var(--mn-ink);box-sizing:border-box;font-family:inherit;transition:border-color .2s,box-shadow .2s}
.mn-field input::placeholder{color:#b6bdd0}
.mn-field input:focus,.mn-field select:focus{border-color:var(--mn-accent);outline:none;background:#fff;box-shadow:0 0 0 4px rgba(37,99,235,.1)}
.mn-badge{display:inline-block;font-size:10.5px;font-weight:700;letter-spacing:.3px;padding:5px 11px;border-radius:999px}
.mn-badge.ok{background:#e8f8ee;color:var(--mn-ok)}
.mn-badge.warn{background:#fdf4df;color:var(--mn-warn)}
.mn-badge.bad{background:#fdeef1;color:var(--mn-bad)}
.mn-badge.info{background:var(--mn-soft);color:var(--mn-accent)}
.mn-statrow{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.mn-stat{background:#fff;border:1px solid var(--mn-line);border-radius:16px;padding:15px 16px;box-shadow:0 1px 2px rgba(14,28,56,.03)}
.mn-stat em{font-style:normal;display:block;font-size:10.5px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:#9aa4bb}
.mn-stat strong{display:block;font-size:19px;font-weight:800;letter-spacing:-.3px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mn-stat.mini strong{font-size:15.5px}
.mn-list{display:flex;flex-direction:column;gap:8px}
.mn-listrow{background:#fff;border:1px solid var(--mn-line);border-radius:15px;padding:13px 15px;display:flex;align-items:center;gap:12px;min-width:0;transition:box-shadow .2s,transform .2s}
.mn-listrow:hover{box-shadow:0 8px 22px -14px rgba(14,28,56,.18)}
.mn-listrow .mn-grow{flex:1;min-width:0}
.mn-listrow strong{display:block;font-size:13.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mn-listrow em{font-style:normal;display:block;font-size:11.5px;color:var(--mn-muted);margin-top:2px}
.mn-listrow .mn-amt{font-size:14.5px;font-weight:800;flex-shrink:0}
.mn-chip{width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:800;flex-shrink:0}
.mn-chip.up{background:#e8f8ee;color:var(--mn-ok)}
.mn-chip.down{background:#fdeef1;color:var(--mn-bad)}
.mn-pos{color:var(--mn-ok)}.mn-neg{color:var(--mn-bad)}
.mn-tabs{display:flex;gap:9px;overflow-x:auto;padding-bottom:2px;margin-bottom:14px;scrollbar-width:none}
.mn-tabs::-webkit-scrollbar{display:none}
.mn-tab{flex-shrink:0;padding:10px 17px;border-radius:999px;border:1px solid var(--mn-line);background:#fff;color:#7d87a2;font-size:12.5px;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap;transition:all .2s ease}
.mn-tab:hover{border-color:#d9e1f2;color:var(--mn-ink)}
.mn-tab.on{background:var(--mn-accent);border-color:var(--mn-accent);color:#fff;box-shadow:0 6px 16px -6px rgba(37,99,235,.5);font-weight:700}
.mn-empty{background:var(--mn-soft);border-radius:16px;padding:26px 16px;text-align:center;font-size:12.5px;font-weight:600;color:var(--mn-muted)}
.mn-warn{background:#fffaf0;border:1px solid #fbe9c8;border-radius:14px;padding:12px 14px;font-size:12.5px;font-weight:600;color:var(--mn-warn)}
.mn-info{background:var(--mn-soft);border-radius:14px;padding:12px 14px;font-size:12.5px;font-weight:600;color:var(--mn-accent);line-height:1.6}
.mn-hero{background:linear-gradient(130deg,#0d1b36,#16336e 55%,#2563eb);border:none;color:#fff;border-radius:20px;padding:24px;box-shadow:0 18px 40px -18px rgba(37,99,235,.55)}
.mn-hero .mn-seclabel{color:rgba(255,255,255,.6)}
.mn-hero .mn-link{color:#c4d7ff}
.mn-hero .mn-sub{color:rgba(255,255,255,.65)}
.mn-hero .mn-stat{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.14);box-shadow:none}
.mn-hero .mn-stat em{color:rgba(255,255,255,.6)}
.mn-hero .mn-stat strong{color:#fff}
.mn-hero .mn-btn.mn-ghost{background:rgba(255,255,255,.14);color:#fff}
.mn-hero .mn-btn.mn-ghost:hover{background:rgba(255,255,255,.22);filter:none}
@media(max-width:560px){.mn-wrap{padding:6px 14px 100px}}

/* ============================================================
   DIVENPAY DASHBOARD v4 — polished light-blue fintech interface
   Dashboard-only components; all existing routes and data logic stay intact.
   ============================================================ */


/* Compact mobile sizing for clearly labeled demo notifications. */
@media (max-width: 560px) {
    .sms-toast {
        left: 6px; right: 6px; top: 6px; width: auto; max-width: none;
        border-radius: 17px; padding: 0 3px 3px;
    }
    .sms-bar { padding: 8px 12px 7px; }
    .sms-body { padding: 9px 16px 5px; }
    .sms-bank-name { font-size: 15px; }
    .sms-credit { font-size: 23px; margin: 7px 0 5px; }
    .sms-text { font-size: 14px; line-height: 1.45; margin-bottom: 7px; }
    .sms-ai { gap: 7px; margin-bottom: 6px; }
    .sms-ai-icon { width: 19px; height: 19px; }
    .sms-ai-label { font-size: 14px; }
    .sms-act { font-size: 12.5px; padding: 9px 4px; }

    .paytm-toast {
        left: 6px; right: 6px; top: 6px; width: auto; max-width: none;
        gap: 9px; padding: 9px 12px; border-radius: 20px;
    }
    .paytm-icon { width: 40px; height: 40px; border-radius: 12px; }
    .paytm-title { font-size: 14.5px; line-height: 1.3; }
    .paytm-sub { margin-top: 2px; font-size: 13px; line-height: 1.25; }
    .paytm-bell { width: 16px; height: 16px; }
    .paytm-expand { width: 34px; height: 34px; }
    .paytm-expand svg { width: 19px; height: 19px; }
}

/* Clearly identify simulated transaction notifications as  */
.sms-toast::after, .paytm-toast::after {

    position: absolute; z-index: 3; top: 5px; right: 42px;
    padding: 2px 6px; border-radius: 5px;
    background: #ffcf33; color: #202020;
    font: 800 9px/1.2 Arial, sans-serif; letter-spacing: .5px;
    pointer-events: none;
}
.paytm-toast::after { top: 3px; right: 58px; }
