/* --- Custom Viewport Reset & Scroll Locks --- */
html,
body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* --- Global Variables & Styling System --- */
:root {
    --bg-main: #0c0616;
    /* Deep Purple-Black */
    --bg-darker: #07030e;
    /* Darker shade */
    --panel-bg: rgba(22, 10, 43, 0.75);
    --panel-border: rgba(98, 0, 238, 0.15);
    --panel-border-hover: rgba(3, 218, 197, 0.25);

    /* Branding Colors */
    --color-teal: #03dac5;
    /* Accent Teal from colors.xml */
    --color-teal-dim: rgba(3, 218, 197, 0.15);
    --color-navy: #6200ee;
    /* Primary Purple mapped to navy slots */
    --color-navy-dim: rgba(98, 0, 238, 0.15);
    --color-gold: #ffb84d;
    /* Warm Gold */
    --color-gold-dim: rgba(255, 184, 77, 0.15);
    --color-coral: #ff5252;
    /* Neon Coral Red */
    --color-coral-dim: rgba(255, 82, 82, 0.15);
    --color-mint: #25d366;
    /* Success Mint Green */
    --color-mint-dim: rgba(37, 211, 102, 0.15);

    /* Typography Colors */
    --text-white: #ffffff;
    --text-silver: #cbbad6;
    /* Purple-tinted silver */
    --text-muted: #7d6e8c;
    --text-dark: #07030e;

    /* System Elements */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows & Glows */
    --shadow-glow-teal: 0 8px 32px rgba(3, 218, 197, 0.2);
    --shadow-glow-coral: 0 8px 32px rgba(255, 82, 82, 0.15);
    --shadow-panel: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* --- Base Reset & Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-silver);
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 230, 195, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 184, 77, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 230, 195, 0.2);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 230, 195, 0.4);
}

/* --- App Layout Layout --- */
.app-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

/* --- Brand Header Section --- */
.brand-header {
    background: linear-gradient(135deg, rgba(11, 31, 40, 0.8) 0%, rgba(14, 24, 27, 0.8) 100%);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-panel);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fingerprint-logo {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--color-teal) 0%, #008f7a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    box-shadow: 0 0 20px rgba(0, 230, 195, 0.4);
}

.fingerprint-logo svg {
    width: 26px;
    height: 26px;
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.tagline {
    font-size: 13px;
    color: var(--color-teal);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.live-status-panel {
    display: flex;
    align-items: center;
    gap: 24px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-mint);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-mint);
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

.header-amount {
    text-align: right;
}

.amount-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.header-amount h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--color-gold);
    font-weight: 700;
    font-size: 22px;
}

.header-info p {
    color: var(--text-silver);
    font-size: 14px;
    max-width: 800px;
    line-height: 1.5;
}

.header-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.header-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-silver);
}

/* --- Platform Pulse Metrics Bar --- */
.platform-pulse {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(8px);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.metric-card:hover {
    border-color: var(--panel-border-hover);
    transform: translateY(-2px);
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-data {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-data h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin: 2px 0;
}

.metric-detail {
    font-size: 11px;
    color: var(--text-silver);
    opacity: 0.85;
}

/* Card Accent variations */
.teal-glow .metric-icon {
    background: var(--color-teal-dim);
    color: var(--color-teal);
}

.gold-glow .metric-icon {
    background: var(--color-gold-dim);
    color: var(--color-gold);
}

.navy-glow .metric-icon {
    background: rgba(11, 31, 40, 0.5);
    color: #8ec3ff;
    border: 1px solid rgba(142, 195, 255, 0.2);
}

.coral-glow .metric-icon {
    background: var(--color-coral-dim);
    color: var(--color-coral);
}

.metric-icon svg {
    width: 22px;
    height: 22px;
}

/* --- Role Workspace Selector Tabs --- */
.role-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    flex-wrap: wrap;
}

.selector-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.tabs-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.role-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-silver);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.role-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
}

.role-tab.active {
    background: rgba(0, 230, 195, 0.08);
    border-color: rgba(0, 230, 195, 0.3);
    color: var(--color-teal);
    box-shadow: 0 0 15px rgba(0, 230, 195, 0.05);
}

.tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.parent-dot {
    background-color: var(--color-teal);
}

.student-dot {
    background-color: #8ec3ff;
}

.merchant-dot {
    background-color: var(--color-gold);
}

.admin-dot {
    background-color: var(--text-white);
}

.super-dot {
    background-color: var(--color-coral);
}

/* --- Portal Workspace & Active State --- */
.portal-workspace {
    position: relative;
    min-height: 400px;
}

.portal-view {
    display: none;
    animation: fadeIn 0.4s var(--transition-smooth);
}

.portal-view.active {
    display: block;
}

/* --- Dashboard Grid System --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 15px;
    }

    /* Swipable Student Cards */
    .student-select-strip {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 4px 0 10px 0;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .student-selector-chip {
        flex: 0 0 160px;
        scroll-snap-align: start;
        text-align: center;
    }
}



.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title {
    margin-bottom: 4px;
}

.section-title h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
}

.section-title p {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Panel Cards (Glassmorphism design) --- */
.panel-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-panel);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color var(--transition-fast);
}

.panel-card:hover {
    border-color: rgba(0, 230, 195, 0.15);
}

.border-accent-card {
    border-left: 3px solid var(--color-teal);
}

/* --- Custom Parent Portal Layout Styles --- */
.auth-card {
    max-width: 440px;
    margin: 40px auto;
    padding: 30px;
    box-shadow: var(--shadow-glow-teal);
}

.onboarding-card {
    max-width: 440px;
    margin: 40px auto;
    padding: 30px;
}

#parent-edit-profile-modal .modal-content {
    max-width: 440px;
    width: 90%;
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow-glow-teal);
}

#pesapal-modal-content {
    max-width: 800px;
    width: 95%;
    height: 90vh;
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-glow-teal);
    display: flex;
    flex-direction: column;
}

.dashboard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.balance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.form-flex-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#kyc-modal-content {
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
}



.card-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title-bar h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
}

.card-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-silver);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.alert-badge {
    background: var(--color-coral-dim);
    border-color: rgba(255, 82, 82, 0.2);
    color: var(--color-coral);
}

.info-badge {
    background: var(--color-teal-dim);
    border-color: rgba(0, 230, 195, 0.2);
    color: var(--color-teal);
}

.success-badge {
    background: var(--color-mint-dim);
    border-color: rgba(37, 211, 102, 0.2);
    color: var(--color-mint);
}

.panel-text {
    font-size: 13px;
    color: var(--text-silver);
    opacity: 0.85;
}

/* --- Parent/Student balance card style --- */
.main-balance-card {
    background: linear-gradient(135deg, rgba(0, 230, 195, 0.08) 0%, rgba(11, 31, 40, 0.8) 100%);
    border-color: rgba(0, 230, 195, 0.15);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.main-balance-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--color-teal);
    margin-top: 4px;
    text-shadow: 0 0 15px rgba(0, 230, 195, 0.3);
}

.card-description {
    font-size: 13px;
    color: var(--text-silver);
}

/* --- Form Fields & Elements --- */
.panel-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-silver);
}

.form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    border-color: var(--color-teal);
}

input[type="number"],
input[type="tel"] {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast);
}

input[type="number"]:focus,
input[type="tel"]:focus {
    border-color: var(--color-teal);
}

/* Mobile Money Provider Radio chips */
.provider-selector {
    display: flex;
    gap: 10px;
}

.provider-chip {
    flex: 1;
    cursor: pointer;
}

.provider-chip input {
    display: none;
}

.chip-label {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-silver);
    transition: all var(--transition-fast);
}

.provider-chip input:checked+.chip-label.mtn-color {
    background: #ffcc00;
    border-color: #ffcc00;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
}

.provider-chip input:checked+.chip-label.airtel-color {
    background: #ff0000;
    border-color: #ff0000;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

/* Presets row style */
.presets-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.preset-btn,
.preset-btn-pos {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-silver);
    padding: 6px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preset-btn:hover,
.preset-btn-pos:hover {
    background: rgba(0, 230, 195, 0.1);
    border-color: var(--color-teal);
    color: var(--text-white);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    outline: none;
}

.fill-width {
    width: 100%;
}

.btn-teal {
    background: var(--color-teal);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 230, 195, 0.25);
}

.btn-teal:hover:not(:disabled) {
    background: #00ffd8;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 230, 195, 0.35);
}

.btn-teal:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-navy {
    background: rgba(11, 31, 40, 0.8);
    border-color: rgba(0, 230, 195, 0.2);
    color: var(--color-teal);
}

.btn-navy:hover {
    background: rgba(11, 31, 40, 1);
    border-color: var(--color-teal);
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
}

/* --- Transaction Ledger list styling --- */
.ledger-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}

.ledger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ledger-icon-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ledger-circle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ledger-circle svg {
    width: 16px;
    height: 16px;
}

.credit-row .ledger-circle {
    background: var(--color-mint-dim);
    color: var(--color-mint);
}

.debit-row .ledger-circle {
    background: rgba(0, 230, 195, 0.05);
    color: #8ec3ff;
}

.alert-row .ledger-circle {
    background: var(--color-gold-dim);
    color: var(--color-gold);
}

.ledger-info h6 {
    color: var(--text-white);
    font-size: 13px;
    font-weight: 600;
}

.ledger-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.ledger-amount-area {
    text-align: right;
}

.ledger-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.credit-amount {
    color: var(--color-teal);
}

.debit-amount {
    color: var(--text-white);
}

.notice-amount {
    color: var(--color-gold);
}

.ledger-time {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
}

/* --- Student Switcher / selector strip --- */
.student-select-strip {
    display: flex;
    gap: 10px;
}

.student-selector-chip {
    flex: 1;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}

.student-selector-chip:hover {
    border-color: var(--panel-border-hover);
}

.student-selector-chip.active {
    background: linear-gradient(135deg, rgba(0, 230, 195, 0.05) 0%, rgba(11, 31, 40, 0.5) 100%);
    border-color: var(--color-teal);
    box-shadow: 0 0 15px rgba(0, 230, 195, 0.05);
}

.student-selector-chip h5 {
    color: var(--text-white);
    font-size: 14px;
    font-weight: 700;
}

.student-selector-chip span {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- Wallet Detail Layout --- */
.wallet-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wallet-detail-school {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: var(--color-mint-dim);
    color: var(--color-mint);
}

.badge-warning {
    background: var(--color-gold-dim);
    color: var(--color-gold);
}

.badge-error {
    background: var(--color-coral-dim);
    color: var(--color-coral);
}

.badge-info {
    background: rgba(142, 195, 255, 0.15);
    color: #8ec3ff;
}

.wallet-detail-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.detail-metric h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
}

.detail-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Progress bar style */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-silver);
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-teal) 0%, #00ffd8 100%);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 230, 195, 0.5);
    transition: width 0.5s ease;
}

/* Control slider and toggles */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-val {
    font-family: 'Outfit', sans-serif;
    color: var(--color-teal);
    font-weight: 700;
}

.cap-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    outline: none;
}

.cap-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-teal);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 230, 195, 0.8);
    transition: transform var(--transition-fast);
}

.cap-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.info-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-silver);
}

.info-metric-row strong {
    color: var(--text-white);
}

/* Freeze Toggle */
.freeze-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 82, 82, 0.05);
    border: 1px solid rgba(255, 82, 82, 0.1);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.freeze-text h5 {
    color: var(--text-white);
    font-size: 13px;
    font-weight: 700;
}

.freeze-text p {
    font-size: 11px;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--color-coral);
}

input:focus+.toggle-slider {
    box-shadow: 0 0 1px var(--color-coral);
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* --- Rules Policy Row Details --- */
.rules-policy-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.policy-rule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.policy-rule-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.policy-details h6 {
    color: var(--text-white);
    font-size: 13px;
    font-weight: 600;
}

.policy-details span {
    font-size: 11px;
    color: var(--text-muted);
}

.policy-val {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
}

.text-teal {
    color: var(--color-teal);
}

.text-coral {
    color: var(--color-coral);
}

.text-navy {
    color: #8ec3ff;
}

.text-gold {
    color: var(--color-gold);
}

/* --- Student Portal Pass Card (RFID style layout) --- */
.smart-pass-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
}

.smart-pass-card {
    width: 100%;
    max-width: 360px;
    height: 220px;
    background: linear-gradient(135deg, #0b1f28 0%, #060b0c 100%);
    border: 1px solid rgba(0, 230, 195, 0.25);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 230, 195, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Card Hologram overlay effect */
.smart-pass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 230, 195, 0.05) 100%);
    pointer-events: none;
}

.smart-pass-card.frozen {
    border-color: rgba(255, 82, 82, 0.35);
    box-shadow: 0 15px 35px rgba(255, 82, 82, 0.15);
    background: linear-gradient(135deg, #1f0b0b 0%, #060202 100%);
}

.pass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pass-chip {
    width: 38px;
    height: 28px;
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    border-radius: 6px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pass-logo-mark {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.pass-body h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.pass-school {
    font-size: 12px;
    color: var(--color-teal);
    font-weight: 600;
    display: block;
}

.smart-pass-card.frozen .pass-school {
    color: var(--color-coral);
}

.pass-class {
    font-size: 11px;
    color: var(--text-muted);
}

.pass-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}

.pass-bal-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.smart-pass-card h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
}

.pass-biometric-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--color-teal);
    font-weight: 600;
}

.smart-pass-card.frozen .pass-biometric-status {
    color: var(--color-coral);
}

.small-fp svg {
    width: 14px;
    height: 14px;
}

/* Quick action buttons grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-btn {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-silver);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.quick-btn:hover:not(.disabled) {
    border-color: var(--panel-border-hover);
    background: rgba(0, 230, 195, 0.05);
    color: var(--text-white);
}

.quick-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Student Modules Grid status */
.modules-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.module-status-tile {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 14px;
    border-radius: var(--radius-sm);
}

.mod-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.mod-tile-header h5 {
    font-size: 12px;
    text-transform: uppercase;
}

.mod-indicator {
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
}

.module-status-tile h3 {
    font-size: 14px;
    color: var(--text-white);
    font-weight: 700;
}

.module-status-tile p {
    font-size: 10px;
    color: var(--text-muted);
}

/* --- Attendance Logs list --- */
.attendance-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid transparent;
}

.log-row.checked-in {
    border-left-color: var(--color-mint);
}

.log-row.checked-out {
    border-left-color: #8ec3ff;
}

.log-row.pending {
    border-left-color: var(--color-gold);
}

.log-meta h6 {
    color: var(--text-white);
    font-size: 13px;
}

.log-meta span {
    font-size: 11px;
    color: var(--text-muted);
}

.log-time {
    font-size: 11px;
    color: var(--text-silver);
}

/* --- Merchant POS Terminal Layout details --- */
.device-status-card {
    background: linear-gradient(135deg, rgba(11, 31, 40, 0.4) 0%, rgba(14, 24, 27, 0.75) 100%);
}

.device-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.merchant-name {
    font-size: 12px;
    color: var(--text-muted);
}

.device-offline-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offline-toggle-info h6 {
    color: var(--text-white);
    font-size: 13px;
    font-weight: 700;
}

.offline-toggle-info p {
    font-size: 11px;
    color: var(--text-muted);
}

/* POS specific fields */
.large-amount-input {
    font-family: 'Outfit', sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    text-align: center;
    color: var(--color-teal) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(0, 230, 195, 0.15) !important;
    padding: 12px !important;
}

.student-quick-info-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.06);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

/* POS Amount presets */
.preset-btn-pos {
    padding: 8px;
    font-size: 11px;
}

/* Checkout Balance summary box */
.checkout-balance-preview-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 14px;
    border-radius: var(--radius-sm);
}

.preview-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-silver);
}

.border-below {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.bold-line {
    font-weight: 700;
    font-size: 14px;
}

/* Biometric auth Scanner container */
.biometric-match-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.fingerprint-scan-visualizer {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--color-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    gap: 10px;
    box-shadow: 0 0 25px rgba(255, 184, 77, 0.1);
    transition: all 0.3s ease;
}

.fingerprint-scan-visualizer.verified {
    border-color: var(--color-teal);
    box-shadow: 0 0 25px rgba(0, 230, 195, 0.2);
}

.fingerprint-scan-visualizer.failed {
    border-color: var(--color-coral);
    box-shadow: 0 0 25px rgba(255, 82, 82, 0.2);
}

.fingerprint-icon {
    width: 46px;
    height: 46px;
    color: var(--color-gold);
    transition: color var(--transition-fast);
}

.verified .fingerprint-icon {
    color: var(--color-teal);
}

.failed .fingerprint-icon {
    color: var(--color-coral);
}

.scan-status-text {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-align: center;
    max-width: 90px;
}

/* Scanner sweep line effect */
.scan-glow {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--color-gold);
    top: 0;
    left: 0;
    box-shadow: 0 0 10px var(--color-gold);
    opacity: 0;
}

.scanning .scan-glow {
    animation: scanSweep 2s infinite linear;
    opacity: 1;
}

.scanning {
    border-color: var(--color-gold);
}

/* Biometric Checklist steps list */
.biometric-steps-list {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.bio-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.step-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bio-step.completed {
    color: var(--text-silver);
}

.bio-step.completed .step-bullet {
    background-color: var(--color-teal);
    border-color: var(--color-teal);
    box-shadow: 0 0 8px var(--color-teal);
}

.bio-step.current {
    color: var(--color-gold);
    font-weight: 600;
}

.bio-step.current .step-bullet {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    animation: pulse 1.2s infinite;
}

/* active receipt card layout */
.receipt-header {
    text-align: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.receipt-header h5 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    letter-spacing: 0.5px;
    font-size: 13px;
}

.receipt-header p {
    font-size: 10px;
    color: var(--text-muted);
}

.receipt-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-silver);
}

.receipt-line strong {
    color: var(--text-white);
}

.border-top-dashed {
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.pt-10 {
    padding-top: 10px;
}

/* POS sales metrics cards strip */
.sales-queue-metrics-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.inline-flex-card {
    gap: 8px;
    justify-content: center;
}

.inline-flex-card h5 {
    font-size: 12px;
    color: var(--text-muted);
}

.inline-flex-card h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
}

/* --- School Admin metrics registry grid --- */
.school-admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.admin-metric-tile {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-metric-tile .label {
    font-size: 11px;
    color: var(--text-muted);
}

.admin-metric-tile h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
}

.admin-metric-tile .detail {
    font-size: 9px;
    color: var(--text-silver);
    opacity: 0.8;
}

/* Biometric enrollment visualizer pad */
.enrollment-flow-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.enroll-scanner-visual {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    gap: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.enroll-scanner-visual.active {
    border-color: var(--color-teal);
    box-shadow: 0 0 15px rgba(0, 230, 195, 0.25);
    color: var(--color-teal);
}

.enroll-scanner-visual.active .fingerprint-icon {
    color: var(--color-teal);
    animation: pulse 1s infinite;
}

.enroll-scanner-visual.enrolled {
    border-color: var(--color-mint);
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.2);
    color: var(--color-mint);
}

.enroll-scanner-visual.enrolled .fingerprint-icon {
    color: var(--color-mint);
}

.enroll-metrics-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.enroll-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-silver);
}

.mt-10 {
    margin-top: 10px;
}

/* Policy Configuration styles */
.policy-settings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.policy-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.policy-setting-meta h5 {
    color: var(--text-white);
    font-size: 13px;
    font-weight: 600;
}

.policy-setting-meta p {
    font-size: 10px;
    color: var(--text-muted);
}

.policy-setting-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.policy-input-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    width: 90px;
    padding: 6px 10px;
    text-align: right;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}

.policy-input-box:focus {
    border-color: var(--color-teal);
}

.policy-setting-input span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Share chart bar list representation */
.share-chart-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.share-chart-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.share-label {
    font-size: 12px;
    color: var(--text-silver);
}

.share-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.share-fill {
    height: 100%;
    border-radius: 4px;
}

.fill-teal {
    background-color: var(--color-teal);
    box-shadow: 0 0 8px rgba(0, 230, 195, 0.3);
}

.fill-navy {
    background-color: #8ec3ff;
    box-shadow: 0 0 8px rgba(142, 195, 255, 0.3);
}

.fill-gold {
    background-color: var(--color-gold);
    box-shadow: 0 0 8px rgba(255, 184, 77, 0.3);
}

.fill-coral {
    background-color: var(--color-coral);
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.3);
}

/* --- Super Admin registries lists --- */
.schools-registry-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.registry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.registry-info h6 {
    color: var(--text-white);
    font-size: 13px;
}

.registry-info span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Security center details */
.kms-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kms-key-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.key-details h6 {
    color: var(--text-white);
    font-size: 13px;
    font-weight: 700;
}

.key-details span {
    font-size: 10px;
    color: var(--text-muted);
    font-family: monospace;
}

.security-steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sec-step-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.sec-step-row.checked {
    color: var(--text-silver);
}

.step-check {
    color: var(--color-teal);
    font-weight: 700;
}

/* Fraud signals list */
.fraud-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fraud-alert-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.01);
}

.fraud-alert-row.high-risk {
    border-left-color: var(--color-coral);
    background: rgba(255, 82, 82, 0.02);
}

.fraud-alert-row.medium-risk {
    border-left-color: var(--color-gold);
    background: rgba(255, 184, 77, 0.02);
}

.fraud-alert-row.low-risk {
    border-left-color: #8ec3ff;
    background: rgba(142, 195, 255, 0.02);
}

.alert-meta h6 {
    color: var(--text-white);
    font-size: 13px;
}

.alert-meta span {
    font-size: 10px;
    color: var(--text-muted);
}

/* --- Real-Time Notification Banner popup style --- */
.notification-banner {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    width: 320px;
    background: rgba(11, 31, 40, 0.95);
    border: 1px solid var(--color-teal);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0, 230, 195, 0.25);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(360px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-banner.active {
    transform: translateX(0);
}

.notification-banner.hidden {
    display: none;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 230, 195, 0.1);
    color: var(--color-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon svg {
    width: 18px;
    height: 18px;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    color: var(--text-white);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.notification-content p {
    font-size: 11px;
    color: var(--text-silver);
    line-height: 1.3;
}

.notification-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}

.notification-close:hover {
    color: var(--text-white);
}

/* --- App Footer Style --- */
.app-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
    margin-top: 16px;
}

.app-footer p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Core Keyframe Animations --- */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        transform: scale(1.05);
        opacity: 0.9;
        box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes scanSweep {
    0% {
        top: 0%;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive CSS & Media Queries --- */

/* Tablet & Smaller Screens (< 1024px) */
@media (max-width: 1024px) {
    .app-container {
        padding: 15px;
    }

    .platform-pulse {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .dashboard-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 15px;
    }

    .panel-card {
        padding: 20px;
    }
}

/* Mobile Phones (< 768px) */
@media (max-width: 768px) {
    .brand-header .header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .live-status-panel {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255, 255, 255, 0.02);
        padding: 10px 12px;
        border-radius: var(--radius-sm);
    }

    .header-amount {
        text-align: right;
    }

    .platform-pulse {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .role-selector {
        position: sticky;
        top: 0;
        z-index: 1999;
        background: rgba(12, 6, 22, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        margin: 0 -15px 20px -15px;
        padding: 12px 15px;
        border-bottom: 1px solid var(--panel-border);
    }

    .tabs-wrapper {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .tabs-wrapper::-webkit-scrollbar {
        height: 3px;
    }

    .tabs-wrapper::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    .role-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 13px;
        padding: 6px 12px;
    }

    .dashboard-grid {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 15px;
    }

    /* Touch Target Sizing Optimizations */
    input[type="tel"],
    input[type="number"],
    input[type="text"],
    input[type="email"],
    select {
        height: 48px;
        font-size: 15px !important;
    }

    .btn {
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    /* Preset button adjustments */
    .preset-btn {
        height: 38px;
        flex: 1;
    }

    /* Avatar selection list fit */
    .avatar-selection-grid {
        justify-content: center;
        gap: 15px !important;
    }

    .avatar-preview-box {
        font-size: 34px !important;
        padding: 12px !important;
    }

    /* Dialog Overlay sizing */
    .modal-content {
        padding: 20px !important;
    }

    .parent-profile-badge {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
        padding: 8px 12px !important;
    }

    /* Parent Portal Layout Updates */
    .brand-header {
        padding: 16px !important;
    }

    .header-info p {
        font-size: 13px !important;
    }

    .auth-card,
    .onboarding-card,
    #kyc-verification-modal .modal-content,
    #parent-edit-profile-modal .modal-content,
    #pesapal-modal-content,
    #kyc-modal-content {
        padding: 20px 16px !important;
        margin: 16px auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }


    #pesapal-modal-content {
        height: 85vh !important;
    }

    .balance-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .balance-card-header div:last-child {
        text-align: left !important;
    }

    .freeze-text {
        flex: 1;
        padding-right: 12px;
    }
}

/* Special Mobile Narrow Screens (< 580px) */
@media (max-width: 580px) {
    .form-flex-row {
        flex-direction: column !important;
    }

    .form-flex-row .form-group {
        flex: none !important;
        width: 100% !important;
    }
}



/* Accessibility & Utilities */
.hidden {
    display: none !important;
}

/* Global Text Wrapping Fixes (Mobile / Desktop) */
.btn,
button,
.role-tab {
    white-space: nowrap !important;
}

@media (max-width: 768px) {

    .btn,
    button,
    .role-tab {
        font-size: 11px !important;
        padding: 8px 12px !important;
    }
}

/* --- Mobile Responsive Table Fix --- */
.ledger-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
    width: 100%;
}

.ledger-container::-webkit-scrollbar {
    height: 4px;
}

.ledger-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.ledger-row {
    min-width: 480px;
    /* Forces wide layout on small screens and enables internal horizontal scroll */
}