:root {
    --primary: #483D8B;
    --primary-rgb: 72, 61, 139;
    --secondary: #CC6D2E;
    --surface: #FFFFFF;
    --surface-rgb: 255, 255, 255;
    --on-surface: #1C1B1F;
    --on-surface-variant: #49454F;
    --outline: rgba(72, 61, 139, 0.25);
    --card-bg: rgba(244, 242, 250, 0.93);
    --card-avail-bg: rgba(232, 226, 252, 0.93);
    --account-card-bg: rgba(188, 178, 212, 0.72);
    --teal: #4DB6AC;
    --green: #4CAF50;
    --red: #E57373;
    --orange: #FF8C00;
}

body.dark-mode {
    --surface: #1E1B2E;
    --surface-rgb: 30, 27, 46;
    --on-surface: #F2EFFA;
    --on-surface-variant: #C8C2D8;
    --outline: rgba(255, 255, 255, 0.22);
    --card-bg: rgba(42, 38, 64, 0.92);
    --card-avail-bg: rgba(54, 47, 85, 0.92);
    --account-card-bg: rgba(70, 62, 102, 0.78);
}

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--on-surface);
    overflow-x: hidden;
}

/* =========================================================
   DYNAMIC BACKGROUNDS (PORTRAIT VS LANDSCAPE / ADULT VS CHILD)
   ========================================================= */
.app-bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.app-bg-layer {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: opacity 0.9s ease;
}

/* Default portrait/phone backgrounds */
.bg-adult-normal {
    background-image: url('achtergrondsabrina.jpeg');
}
.bg-adult-nopainting {
    background-image: url('achtergrondsabrina2.png');
    opacity: 0;
}
.bg-child-mode {
    background-image: url('achtergrondkinder.jpeg');
    opacity: 0;
}

/* Tablet / Desktop Landscape backgrounds */
@media (min-width: 720px) and (orientation: landscape) {
    .bg-adult-normal {
        background-image: url('achtergrondsabrina_tablet.jpg');
    }
    .bg-adult-nopainting {
        background-image: url('achtergrondsabrina_tablet2.jpg');
    }
    .bg-child-mode {
        background-image: url('achtergrondkinder_tablet.jpg');
    }
}

body.child-painting-open .bg-adult-nopainting {
    opacity: 1;
}

body.is-child-dashboard .bg-child-mode {
    opacity: 1;
}

.app-bg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.16);
    z-index: -1;
    pointer-events: none;
    transition: background 0.3s ease;
}

body.dark-mode .app-bg-overlay {
    background: rgba(15, 12, 26, 0.56);
}

/* =========================================================
   VIEW CONTAINERS
   ========================================================= */
.view-screen {
    display: none;
    min-height: 100vh;
    width: 100%;
}

.view-screen.active {
    display: flex;
    flex-direction: column;
}

/* =========================================================
   EMAIL REDIRECT SCREEN (Verify Email / Reset Password)
   ========================================================= */
.redirect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-banner {
    width: 82%;
    max-width: 320px;
    height: 105px;
    background-image: url('achtergrondbanner.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
}

.glass-card {
    background: rgba(var(--surface-rgb), 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 22px;
    padding: 28px 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

/* =========================================================
   LOGIN & REGISTER SCREEN
   ========================================================= */
.login-shell {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 32px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.login-top {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
    margin: 8px 0 26px;
    text-align: center;
}

.field-group {
    width: 100%;
    margin-bottom: 16px;
    position: relative;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    padding-left: 4px;
}

.sabrina-input, .sabrina-select {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    color: var(--on-surface);
    background: rgba(var(--surface-rgb), 0.88);
    border: 1.8px solid rgba(72, 61, 139, 0.38);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sabrina-input:focus, .sabrina-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    bottom: 9px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.login-options-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.85);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.85);
    padding: 4px;
}

.link-btn:hover {
    text-decoration: underline;
}

.login-bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    transition: transform 0.12s ease, opacity 0.2s ease;
}

.btn-primary {
    background: var(--primary);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-primary:hover, .btn-secondary:hover {
    opacity: 0.95;
}

.btn-primary:active, .btn-secondary:active {
    transform: scale(0.985);
}

.register-pill {
    width: 84%;
    background: rgba(var(--surface-rgb), 0.78);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 11px 16px;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    margin-top: 2px;
}

.error-banner {
    width: 100%;
    background: #FDECEA;
    color: #B3261E;
    border: 1px solid #F5C2C0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
    display: none;
}

.success-banner {
    width: 100%;
    background: #E8F5E9;
    color: #1B5E20;
    border: 1px solid #A5D6A7;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
    display: none;
}

/* =========================================================
   3D FLYING PAINTING CHILD LOGIN MODAL (Matches Tablet/Phone)
   ========================================================= */
.painting-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px 16px;
    perspective: 1200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.painting-backdrop.open {
    pointer-events: auto;
    opacity: 1;
}

.painting-frame-card {
    width: 95%;
    max-width: 500px;
    background: rgba(var(--surface-rgb), 0.94);
    border-radius: 4px;
    border: 1px solid var(--on-surface);
    padding: 1px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
    /* Portrait/Phone origin: top-right painting */
    transform-origin: 75% -35%;
    transform: scale(0.05) rotateY(-75deg);
    transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 720px) and (orientation: landscape) {
    /* Tablet/Desktop Landscape origin: left back-wall painting (25% 32%) */
    .painting-frame-card {
        transform-origin: -25% -45%;
        transform: scale(0.05) rotateY(75deg);
    }
}

.painting-backdrop.open .painting-frame-card {
    transform: scale(1) rotateY(0deg);
}

.painting-wood-border {
    border: 6px solid #A47456;
    border-radius: 3px;
    padding: 6px;
}

.painting-inner-border {
    border: 1px solid var(--on-surface);
    padding: 24px;
}

/* =========================================================
   DASHBOARD TOP BAR & HEADER
   ========================================================= */
.top-app-bar {
    width: 100%;
    height: 60px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icon-btn-plain {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-circle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.15s ease;
}

.top-circle-btn:hover {
    transform: scale(1.08);
}

.top-circle-btn.inverted {
    background: #FFFFFF;
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
}

.top-circle-btn .material-symbols-rounded {
    font-size: 19px;
}

.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--orange);
    border: 2px solid #FFFFFF;
    display: none;
}

.notif-badge.active {
    display: block;
    animation: pulseBadge 1.1s infinite alternate;
}

@keyframes pulseBadge {
    from { transform: scale(0.9); background: var(--orange); }
    to { transform: scale(1.25); background: #FF3D00; }
}

/* =========================================================
   ADULT DASHBOARD CONTENT (PORTRAIT & LANDSCAPE)
   ========================================================= */
.dashboard-main {
    width: 100%;
    padding: 4px 16px 36px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .dashboard-main {
        padding: 4px 32px 36px;
    }
}

.overview-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.overview-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

@media (min-width: 720px) {
    .overview-title {
        font-size: 30px;
    }
}

.person-tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.person-tab {
    height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: rgba(var(--surface-rgb), 0.82);
    color: var(--on-surface);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.person-tab.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

/* =========================================================
   SYNCHRONIZED 2-ROW / 2-COLUMN GRID (Matches Tablet Landscape!)
   ========================================================= */
.dashboard-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Row 1 & Row 2: Stacked on mobile/portrait, 2 equal columns with equal height on Landscape! */
.sync-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (min-width: 840px) and (orientation: landscape) {
    .sync-row {
        flex-direction: row;
        align-items: stretch;
        gap: 28px;
    }
    .sync-col-left, .sync-col-right {
        flex: 1 1 0;
        min-width: 0;
    }
}

.sync-col-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.sync-col-right {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

/* Balance & Info Cards */
.two-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.balance-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.balance-card.available {
    background: var(--card-avail-bg);
}

.balance-card-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--on-surface-variant);
    margin-bottom: 4px;
}

.balance-card-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--on-surface);
}

.balance-card-amount.positive {
    color: var(--green);
}

.balance-card-amount.negative {
    color: #E53935;
}

.info-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.info-card-label {
    font-size: 12px;
    color: var(--on-surface-variant);
    margin-bottom: 2px;
}

.info-card-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--on-surface);
}

.info-circle-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-circle-icon.up {
    background: rgba(76, 175, 80, 0.14);
    color: var(--green);
}

.info-circle-icon.down {
    background: rgba(229, 115, 115, 0.16);
    color: var(--red);
}

/* Rekeningen section */
.section-subtitle {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 8px;
}

.accounts-four-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.account-type-card {
    height: 84px;
    background: var(--account-card-bg);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    transition: transform 0.14s ease, background 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

@media (min-width: 600px) {
    .account-type-card {
        height: 96px;
    }
}

.account-type-card:hover {
    transform: translateY(-2px);
}

.account-type-card .material-symbols-rounded {
    font-size: 34px;
}

/* Right-side Navigation Tiles */
.nav-tile-btn {
    flex: 1 1 0;
    min-height: 118px;
    background: var(--card-bg);
    border: none;
    border-radius: 16px;
    padding: 12px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--on-surface);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

@media (min-width: 600px) and (orientation: portrait) {
    .nav-tile-btn {
        min-height: 132px;
    }
}

.nav-tile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

.nav-tile-btn .material-symbols-rounded {
    font-size: 36px;
    color: var(--primary);
}

.nav-tile-label {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: pre-line;
}

/* Centered Action Button underneath (Foto 3!) */
.centered-bottom-action {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.btn-enter-transaction {
    width: 100%;
    height: 56px;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.32);
    transition: transform 0.12s ease, opacity 0.2s;
}

@media (min-width: 840px) and (orientation: landscape) {
    .btn-enter-transaction {
        width: 48%;
    }
}

.btn-enter-transaction:hover {
    opacity: 0.95;
}

.vs-footer-logo {
    height: 48px;
    opacity: 0.55;
    object-fit: contain;
}

/* =========================================================
   CHILD DASHBOARD LAYOUT
   ========================================================= */
.child-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 840px) and (orientation: landscape) {
    .child-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        align-items: start;
    }
}

.child-total-card {
    background: var(--primary);
    color: #FFFFFF;
    border-radius: 26px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.30);
}

.child-accounts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.child-acc-tile {
    background: var(--card-bg);
    border: none;
    border-radius: 18px;
    padding: 14px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.child-acc-tile .material-symbols-rounded {
    font-size: 28px;
    color: var(--primary);
}

/* =========================================================
   MODALS / SUB-SCREENS (Accounts, Transactions, Goals, etc.)
   ========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

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

.modal-sheet {
    background: var(--surface);
    color: var(--on-surface);
    width: 100%;
    max-width: 660px;
    max-height: 90vh;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
    overflow: hidden;
    animation: modalPop 0.22s ease-out;
}

@keyframes modalPop {
    from { transform: translateY(16px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    padding: 18px 22px;
    background: rgba(var(--primary-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--outline);
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--outline);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.list-item-row {
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--outline);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.badge-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-paid {
    background: rgba(76, 175, 80, 0.16);
    color: var(--green);
}

.badge-unpaid {
    background: rgba(229, 115, 115, 0.16);
    color: #D32F2F;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(var(--primary-rgb), 0.14);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width 0.3s ease;
}

.tabs-segmented {
    display: flex;
    background: rgba(var(--primary-rgb), 0.09);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 16px;
    gap: 4px;
}

.tab-seg-btn {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--on-surface);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

.tab-seg-btn.active {
    background: var(--primary);
    color: #FFFFFF;
}

/* Confetti overlay for Saving Goals */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti-emoji {
    position: absolute;
    top: -40px;
    font-size: 28px;
    animation: fallDown 2.8s linear forwards;
}

@keyframes fallDown {
    to {
        transform: translateY(105vh) rotate(360deg);
    }
}

/* =========================================================
   LEFT NAVIGATION DRAWER (Matches DashboardScreen.kt Drawer)
   ========================================================= */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 310px;
    max-width: 86vw;
    background: var(--surface);
    color: var(--on-surface);
    z-index: 260;
    transform: translateX(-104%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.28);
    overflow-y: auto;
    padding: 20px 14px 28px;
}

.drawer-overlay.open .nav-drawer {
    transform: translateX(0);
}

.drawer-header-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    padding: 4px 12px 14px;
    margin: 0;
}

.drawer-section-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--primary);
    padding: 10px 12px 6px;
}

.drawer-acc-icons-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 4px 8px 8px;
}

.drawer-acc-icon-btn {
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: rgba(var(--primary-rgb), 0.06);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.drawer-acc-icon-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.drawer-acc-expanded-list {
    padding: 4px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-acc-subitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.05);
    font-size: 13.5px;
    cursor: pointer;
}

.drawer-acc-subitem:hover {
    background: rgba(var(--primary-rgb), 0.12);
}

.drawer-divider {
    border: none;
    border-top: 1px solid var(--outline);
    margin: 10px 8px;
}

.drawer-item-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--on-surface);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    padding: 11px 12px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: background 0.15s ease;
}

.drawer-item-btn:hover {
    background: rgba(var(--primary-rgb), 0.09);
}

.drawer-item-btn .material-symbols-rounded {
    font-size: 21px;
    color: var(--primary);
}

/* =========================================================
   SECONDARY SUB-MODAL (For nested dialogs without losing main modal)
   ========================================================= */
.submodal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(3px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.submodal-overlay.open {
    display: flex;
}

.submodal-sheet {
    background: var(--surface);
    color: var(--on-surface);
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.38);
    overflow: hidden;
    animation: modalPop 0.18s ease-out;
}

/* =========================================================
   SETTINGS SUB-SCREENS, CARDS, SWITCHES & ARREAR CARDS
   ========================================================= */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 600px) {
    .settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.settings-card-btn {
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid var(--outline);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    font-family: inherit;
    color: var(--on-surface);
    transition: transform 0.12s ease, background 0.15s ease;
}

.settings-card-btn:hover {
    background: rgba(var(--primary-rgb), 0.12);
    transform: translateY(-1px);
}

.settings-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.arrear-warning-card {
    background: rgba(255, 140, 0, 0.12);
    border: 1.5px solid rgba(255, 140, 0, 0.45);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--outline);
    margin-bottom: 10px;
}

.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.icon-picker-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1.5px solid var(--outline);
    background: rgba(var(--surface-rgb), 0.9);
    font-size: 21px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-picker-btn.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.18);
    transform: scale(1.08);
}

.theme-swatch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.theme-swatch-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 2px solid var(--outline);
    background: rgba(var(--surface-rgb), 0.9);
    color: var(--on-surface);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.theme-swatch-btn.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.12);
}

.theme-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* =========================================================
   2-PAGE CHILD DASHBOARD (Matches ChildDashboardScreen.kt)
   ========================================================= */
.child-Welcome-card {
    background: rgba(var(--surface-rgb), 0.88);
    backdrop-filter: blur(10px);
    border-radius: 26px;
    padding: 26px 22px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 2px solid rgba(var(--primary-rgb), 0.18);
}

.child-3d-money-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #FFFFFF;
    border-radius: 28px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 16px 36px rgba(var(--primary-rgb), 0.35);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.child-3d-money-card:hover {
    transform: translateY(-3px) scale(1.01);
}

.child-action-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.child-big-action-btn {
    height: 82px;
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    transition: transform 0.12s ease;
}

.child-big-action-btn:active {
    transform: scale(0.97);
}

.bg-custom-layer {
    opacity: 0;
    z-index: 1;
}

body.has-custom-bg .bg-custom-layer {
    opacity: 1;
}

@media print {
    body * {
        visibility: hidden;
    }
    #app-modal-overlay, #app-modal-overlay * {
        visibility: visible;
    }
    #app-modal-overlay {
        position: absolute;
        inset: 0;
        background: #FFFFFF;
    }
    .modal-sheet {
        max-width: 100%;
        max-height: none;
        box-shadow: none;
    }
    .modal-footer {
        display: none !important;
    }
}

