:root {
    --sidebar: #172033;
    --sidebar-soft: #263249;
    --background: #f3f6fa;
    --surface: #ffffff;
    --text: #172033;
    --muted: #6b7280;
    --border: #dce3ec;
    --accent: #1565c0;
    --accent-dark: #0d47a1;
    --success: #16794b;
    --warning: #9a6700;
    --danger: #b42318;
    --shadow: 0 10px 30px rgba(24, 39, 75, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, Arial, sans-serif; color: var(--text); background: var(--background); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); color: #fff; min-height: 100vh; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { min-height: 94px; padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--sidebar); font-weight: 900; }
.brand small { grid-column: 2; color: #aebbd1; }
.nav { padding: 18px 12px; display: grid; gap: 7px; }
.nav a, .nav-disabled { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: #dce5f3; }
.nav a:hover, .nav a.active { background: var(--sidebar-soft); color: #fff; }
.nav-disabled { opacity: .48; cursor: default; }
.nav-disabled small { font-size: 10px; }
.sidebar-user { margin-top: auto; padding: 18px 20px; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 5px; }
.sidebar-user span { color: #aebbd1; font-size: 13px; }
.sidebar-user a { color: #fff; margin-top: 8px; }
.content-shell { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px 28px; display: flex; align-items: center; gap: 15px; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar p { margin: 4px 0 0; color: var(--muted); }
.menu-button { display: none; border: 0; background: transparent; font-size: 25px; }
.main-content { padding: 28px; flex: 1; }
.footer { padding: 18px 28px; color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.card h2, .card h3 { margin-top: 0; }
.stat-value { font-size: 30px; font-weight: 800; margin-top: 8px; }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.actions-right { margin-left: auto; }
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { color: var(--text); background: #fff; border-color: var(--border); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-small { padding: 7px 10px; font-size: 13px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #f9fbfd; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; background: #edf2f7; }
.badge-success { color: var(--success); background: #e9f8f0; }
.badge-warning { color: var(--warning); background: #fff7db; }
.badge-danger { color: var(--danger); background: #feeceb; }
.form-card { max-width: 860px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 700; }
input[type=text], input[type=date], input[type=number], input[type=url], input[type=password], select, textarea {
    width: 100%; border: 1px solid #cdd6e2; border-radius: 10px; padding: 11px 12px; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(21,101,192,.13); border-color: var(--accent); }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.checkbox input { margin-top: 3px; }
.help { color: var(--muted); font-size: 13px; }
.errors { border: 1px solid #f1b7b3; background: #fff1f0; color: var(--danger); padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; }
.alert { padding: 13px 16px; border-radius: 11px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { color: var(--success); background: #e9f8f0; border-color: #bce5ce; }
.alert-warning { color: var(--warning); background: #fff7db; border-color: #f2d98b; }
.alert-danger { color: var(--danger); background: #feeceb; border-color: #f1b7b3; }
.alert-info { color: #075985; background: #e8f6fd; border-color: #bae6fd; }
.auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #eaf2ff, var(--background) 48%); }
.login-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-logo .brand-mark { background: var(--sidebar); color: #fff; }
.login-card h1 { margin: 0; }
.login-card .qr-input { font-family: monospace; letter-spacing: .04em; }
.camera-box { margin-top: 14px; display: none; }
.camera-box video { width: 100%; border-radius: 12px; background: #111827; }
.qr-card { width: 360px; max-width: 100%; margin: 0 auto; text-align: center; background: #fff; border: 2px solid var(--text); border-radius: 16px; padding: 22px; }
.qr-code { display: grid; place-items: center; min-height: 230px; margin: 16px 0; }
.qr-secret { word-break: break-all; font-family: monospace; font-size: 11px; background: #f2f4f7; padding: 9px; border-radius: 8px; }
.print-only { display: none; }
.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.inline-form { display: inline; }
hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; z-index: 20; left: -260px; width: 242px; transition: left .2s; }
    .menu-open .sidebar { left: 0; }
    .menu-button { display: inline-block; }
    .main-content, .topbar { padding: 18px; }
    .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
    .actions-right { margin-left: 0; }
}
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .footer, .no-print, .alert { display: none !important; }
    .app-shell { display: block; }
    .main-content { padding: 0; }
    .card { border: 0; box-shadow: none; }
    .print-only { display: block; }
    .qr-card { break-inside: avoid; }
}

/* ASK HomeBudget V0.3.0 — dochody */
.filter-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; }
.filter-submit { align-self: end; }
.filter-submit .btn { width: 100%; }
.wide-card { max-width: 1120px; }
.split-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.split-summary > div { border: 1px solid var(--border); border-radius: 12px; padding: 13px; background: #f9fbfd; display: grid; gap: 5px; }
.preview-box { margin-top: 20px; border: 2px solid #b9d5f5; border-radius: 16px; padding: 18px; background: #f4f9ff; }
.preview-box .grid > div { display: grid; gap: 5px; }
.preview-box strong { font-size: 19px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.details-list { margin: 0; display: grid; gap: 0; }
.details-list > div { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.details-list > div:last-child { border-bottom: 0; }
.details-list dt { color: var(--muted); font-weight: 700; }
.details-list dd { margin: 0; }
.row-muted { opacity: .66; }
.danger-zone { border-color: #f1b7b3; }
.danger-text { color: var(--danger); }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 1000px) {
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .filter-grid, .split-summary { grid-template-columns: 1fr; }
    .details-list > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ASK HomeBudget V0.4.0 — wydatki i środki dzieci */
.conditional-box { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcfe; }
.child-funds-box { border-color: #f2d98b; background: #fffdf5; }
.beneficiary-options { gap: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.check-card { border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; background: #fff; }
.expense-preview { border-color: #f2d98b; background: #fffdf5; }
.expense-filter-grid { grid-template-columns: repeat(7,minmax(0,1fr)); }
tfoot th { background: #f4f7fb; }
.child-operation-summary { margin-top: 18px; padding: 14px; border-radius: 12px; display: grid; gap: 5px; }
.child-operation-safe { background: #e9f8f0; border: 1px solid #bce5ce; color: var(--success); }
.child-operation-debt { background: #fff7db; border: 1px solid #f2d98b; color: var(--warning); }
@media (max-width: 1100px) { .expense-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 760px) { .check-grid,.expense-filter-grid { grid-template-columns: 1fr; } }

/* ASK HomeBudget V0.7.0 — niezależny panel dziecka i mobilne zarządzanie dostępem */
.eyebrow { display: inline-block; margin-bottom: 7px; color: #667085; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.success-text { color: var(--success); }
.badge-info { color: #175cd3; background: #eff8ff; }
.btn-wide { width: 100%; }
.login-links { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; }
.household-login-card { width: min(500px,100%); }
.login-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 22px; border-radius: 13px; background: #edf2f7; }
.login-switch-button { border: 0; border-radius: 9px; padding: 11px 12px; background: transparent; color: #667085; font-weight: 800; cursor: pointer; }
.login-switch-button.active { background: #fff; color: var(--text); box-shadow: 0 3px 12px rgba(16,24,40,.08); }
.login-panel { display: none; }
.login-panel.active { display: block; }
.login-help { margin: 14px 0 0; text-align: center; }

.child-body { --child-ink: #12223b; --child-blue: #3659d9; --child-violet: #7047eb; --child-green: #0f9f6e; background: #f4f6fb; }
.child-shell { grid-template-columns: 254px minmax(0,1fr); }
.child-sidebar { width: auto; background: linear-gradient(180deg,#111c33 0%,#172644 100%); }
.child-sidebar .brand { min-height: 106px; }
.child-sidebar .brand-mark { background: linear-gradient(145deg,#fff,#e8edff); color: #2946b8; }
.child-sidebar .nav { padding-top: 24px; }
.child-sidebar .nav a { padding: 14px 15px; border: 1px solid transparent; color: #cbd5e6; }
.child-sidebar .nav a small { color: #7786a5; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.child-sidebar .nav a:hover,.child-sidebar .nav a.active { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.08); color: #fff; }
.child-topbar { min-height: 82px; padding: 17px 34px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.child-topbar h1 { color: var(--child-ink); font-size: 22px; }
.independent-badge { margin-left: auto; padding: 8px 11px; border: 1px solid #d9def9; border-radius: 999px; background: #f5f3ff; color: #5a43c8; font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.child-main-content { padding: 30px 34px 44px; }
.child-dashboard { max-width: 1440px; margin: 0 auto; }
.child-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.7fr); gap: 30px; min-height: 250px; padding: 35px 38px; border-radius: 25px; background: linear-gradient(125deg,#233c9d 0%,#465fd8 52%,#7651e8 100%); color: #fff; box-shadow: 0 24px 55px rgba(54,65,160,.24); }
.child-hero:after { content:""; position:absolute; width:380px; height:380px; right:-120px; top:-190px; border:70px solid rgba(255,255,255,.08); border-radius:50%; }
.child-hero > * { position: relative; z-index: 1; }
.child-hero h2 { margin: 4px 0 10px; font-size: clamp(29px,3vw,42px); line-height: 1.08; }
.child-hero p { max-width: 700px; margin: 0; color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.65; }
.child-eyebrow { color: #dce3ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.btn-light { color: #2944aa; background: #fff; }
.btn-light:hover { background: #f1f4ff; }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); }
.hero-balance { align-self: center; display: grid; gap: 6px; padding: 25px 27px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.hero-balance span { color: rgba(255,255,255,.77); font-size: 13px; font-weight: 700; }
.hero-balance strong { font-size: clamp(32px,3.6vw,50px); line-height: 1.08; }
.hero-balance small { color: rgba(255,255,255,.7); line-height: 1.45; }
.child-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.child-stat-card { display: flex; align-items: center; gap: 14px; min-height: 112px; padding: 20px; border: 1px solid #e4e8f1; border-radius: 18px; background: #fff; box-shadow: 0 9px 25px rgba(29,41,57,.055); }
.child-stat-card > div:last-child { min-width: 0; display: grid; gap: 7px; }
.child-stat-card span { color: #667085; font-size: 12px; font-weight: 700; }
.child-stat-card strong { font-size: 23px; color: var(--child-ink); white-space: nowrap; }
.stat-icon { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; font-size: 22px; font-weight: 900; }
.income-icon { color: #087a55; background: #e7f8f1; }
.expense-icon { color: #c4320a; background: #fff0ea; }
.daily-icon { color: #3659d9; background: #eef1ff; }
.debt-icon { color: #9b2c2c; background: #fff0f0; }
.debt-card { border-color: #ffd1d1; background: #fffafa; }
.child-main-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.75fr); gap: 18px; margin-top: 18px; }
.child-dashboard .card { border-color: #e4e8f1; border-radius: 19px; box-shadow: 0 8px 24px rgba(29,41,57,.05); }
.child-dashboard .card h2 { color: var(--child-ink); }
.child-overview-card { min-height: 270px; }
.budget-net { padding: 8px 11px; border-radius: 11px; font-size: 17px; font-weight: 900; }
.budget-net.positive { color: #087a55; background: #eaf9f3; }
.budget-net.negative { color: #b42318; background: #fff0ef; }
.budget-progress-label { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; color: #667085; font-size: 13px; }
.budget-progress-label strong { color: var(--child-ink); }
.budget-progress { height: 11px; overflow: hidden; margin-top: 10px; border-radius: 999px; background: #edf0f6; }
.budget-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#355bd8,#8051e8); }
.budget-summary-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 28px; }
.budget-summary-row > div { display: grid; gap: 5px; padding: 14px; border-radius: 13px; background: #f7f8fb; }
.budget-summary-row span { color: #667085; font-size: 12px; }
.budget-summary-row strong { font-size: 18px; }
.reserved-card { background: linear-gradient(155deg,#fbfaff,#f5f2ff); border-color: #e3dcff !important; }
.reserved-amount { margin: 13px 0 10px; color: #5e42d3; font-size: clamp(32px,4vw,48px); font-weight: 900; }
.reserved-card p { color: #667085; line-height: 1.6; }
.reserved-card a { display: inline-block; margin-top: 10px; font-weight: 800; text-decoration: none; }
.child-lower-grid { grid-template-columns: minmax(0,1.3fr) minmax(300px,.7fr); }
.compact-links { display: flex; gap: 12px; font-size: 13px; font-weight: 800; }
.activity-list { display: grid; margin: 0 -4px; }
.activity-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid #edf0f4; color: inherit; text-decoration: none; }
.activity-item:last-child { border-bottom: 0; }
.activity-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 20px; font-weight: 900; }
.activity-symbol.income { color: #087a55; background: #e7f8f1; }
.activity-symbol.expense { color: #c4320a; background: #fff0ea; }
.activity-details { min-width: 0; display: grid; gap: 3px; }
.activity-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-details small { color: #98a2b3; }
.activity-amount { white-space: nowrap; }
.activity-amount.income { color: #087a55; }
.activity-amount.expense { color: #c4320a; }
.category-bars { display: grid; gap: 20px; margin-top: 22px; }
.category-bar-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 8px; font-size: 13px; }
.category-bar-row span { color: #667085; }
.category-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #edf0f6; }
.category-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#405fd9,#7d57df); }
.child-debts-card { margin-top: 18px; border-color: #ffd7d4 !important; }
.debt-tile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.debt-tile { display: grid; gap: 5px; padding: 15px; border: 1px solid #fee1df; border-radius: 14px; background: #fffafa; }
.debt-tile > strong { color: #b42318; font-size: 21px; }
.debt-tile small { color: #667085; line-height: 1.4; }

.page-intro { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-intro h2 { margin: 0 0 7px; font-size: 27px; }
.page-intro p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }
.access-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.access-card { display: grid; gap: 15px; padding: 20px; border: 1px solid var(--border); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.access-card-head { display: flex; align-items: center; gap: 13px; }
.access-card-head h3 { margin: 0 0 5px; }
.avatar-circle { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#e8eeff,#f1ebff); color: #4358c9; font-size: 18px; font-weight: 900; }
.avatar-circle-large { flex-basis: 62px; width: 62px; height: 62px; font-size: 24px; }
.access-status { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #edf0f4; }
.access-status span { color: var(--muted); font-size: 13px; }
.child-access-flags { display: flex; flex-wrap: wrap; gap: 7px; }
.mini-chip { padding: 5px 8px; border-radius: 999px; background: #f2f4f7; color: #98a2b3; font-size: 11px; font-weight: 800; }
.mini-chip.on { background: #e8f7ef; color: #087a55; }
.mobile-form-shell { max-width: 720px; margin: 0 auto; }
.access-editor-card { padding: 25px; }
.access-editor-person { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.access-editor-person h2 { margin: 0 0 4px; }
.access-editor-person p { margin: 0; }
.password-generator-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.access-active-check { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #f8fafc; }
.stacked-actions { display: grid; gap: 9px; margin-top: 22px; }
.credential-result { display: grid; gap: 11px; margin-bottom: 20px; padding: 17px; border: 1px solid #b9e4ca; border-radius: 14px; background: #eefbf3; }
.credential-result > span { color: #087a55; font-weight: 900; }
.credential-result > div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 12px; border-radius: 10px; background: #fff; }
.credential-result small { color: var(--muted); }
.credential-result strong { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 18px; }
.credential-result p { margin: 0; color: #397256; font-size: 12px; }

@media (max-width: 1150px) {
    .child-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .access-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .child-hero,.child-main-grid,.child-lower-grid { grid-template-columns: 1fr; }
    .hero-balance { max-width: 500px; }
    .debt-tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .child-main-content { padding: 18px 15px 34px; }
    .child-topbar { padding: 15px 18px; }
    .independent-badge { display: none; }
    .child-hero { min-height: 0; padding: 25px 22px; border-radius: 20px; }
    .child-stat-grid { grid-template-columns: 1fr; }
    .budget-summary-row { grid-template-columns: 1fr; }
    .debt-tile-grid,.access-card-grid { grid-template-columns: 1fr; }
    .activity-item { grid-template-columns: 38px minmax(0,1fr); }
    .activity-amount { grid-column: 2; }
    .password-generator-row { grid-template-columns: 1fr; }
    .admin-mobile-intro { margin-bottom: 15px; }
    .access-card { padding: 17px; }
    .access-editor-card { padding: 18px; }
}
input:not([type]), input[type=email], input[type=datetime-local], input[type=tel] {
    width: 100%; border: 1px solid #cdd6e2; border-radius: 10px; padding: 11px 12px; color: var(--text); background: #fff;
}
input:not([type]):focus, input[type=email]:focus, input[type=datetime-local]:focus, input[type=tel]:focus {
    outline: 3px solid rgba(21,101,192,.13); border-color: var(--accent);
}

/* ========================================================================== 
   ASK HomeBudget V0.9.0 — profesjonalny ciemny panel komputerowy
   ========================================================================== */
.admin-body,
.family-body {
    --dark-bg: #07101f;
    --dark-bg-soft: #0a1527;
    --dark-surface: #101b2d;
    --dark-surface-2: #142238;
    --dark-surface-3: #172840;
    --dark-border: rgba(151, 171, 205, .16);
    --dark-text: #f4f7ff;
    --dark-muted: #8f9db5;
    --dark-accent: #5b7cff;
    --dark-accent-2: #8b5cf6;
    --dark-green: #4ed89a;
    --dark-red: #ff6b66;
    --dark-orange: #ffac4d;
    --dark-cyan: #57c7ff;
    margin: 0;
    color: var(--dark-text);
    background:
        radial-gradient(circle at 82% 6%, rgba(65, 82, 190, .15), transparent 28%),
        radial-gradient(circle at 24% 95%, rgba(30, 149, 147, .08), transparent 26%),
        var(--dark-bg);
}
.admin-body a,
.family-body a { color: #88a2ff; }
.admin-shell,
.family-shell { grid-template-columns: 270px minmax(0,1fr); }
.admin-sidebar,
.family-sidebar {
    width: auto;
    background: linear-gradient(180deg,#07111f 0%,#0a1424 55%,#08111e 100%);
    border-right: 1px solid rgba(142,164,202,.15);
    box-shadow: 18px 0 55px rgba(0,0,0,.18);
}
.admin-brand,
.family-sidebar .brand {
    min-height: 104px;
    padding: 22px 21px;
    border-bottom-color: rgba(255,255,255,.07);
}
.admin-brand .brand-mark,
.family-sidebar .brand-mark {
    width: 46px;
    height: 46px;
    color: #fff;
    background: linear-gradient(145deg,#3f64ff,#8159ef);
    box-shadow: 0 10px 28px rgba(65,91,232,.32);
}
.admin-brand > span:nth-child(2),
.family-sidebar .brand > span:nth-child(2) { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.admin-brand small,
.family-sidebar .brand small { color: #71809a; }
.admin-nav,
.family-sidebar .nav { gap: 5px; padding: 15px 12px 26px; overflow-y: auto; }
.nav-section-label {
    display: block;
    padding: 17px 13px 7px;
    color: #53627b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
}
.admin-nav a,
.family-sidebar .nav a {
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #aeb8ca;
    font-size: 13px;
    font-weight: 700;
    transition: .18s ease;
}
.admin-nav a:hover,
.family-sidebar .nav a:hover { color: #fff; background: rgba(93,117,194,.1); border-color: rgba(113,140,229,.14); }
.admin-nav a.active,
.family-sidebar .nav a.active {
    color: #fff;
    background: linear-gradient(90deg,rgba(63,92,210,.38),rgba(81,56,166,.22));
    border-color: rgba(105,135,255,.38);
    box-shadow: inset 3px 0 0 #6f8dff, 0 10px 25px rgba(19,42,105,.18);
}
.nav-label { display: flex; align-items: center; gap: 11px; }
.nav-label i { width: 23px; text-align: center; color: #7889ab; font-style: normal; font-size: 17px; }
.admin-nav a.active .nav-label i { color: #8fa5ff; }
.admin-sidebar-user,
.family-sidebar .sidebar-user {
    grid-template-columns: 40px minmax(0,1fr);
    column-gap: 11px;
    align-items: center;
    padding: 17px;
    border-top-color: rgba(255,255,255,.07);
    background: rgba(255,255,255,.018);
}
.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(145deg,#4c67e9,#8158da);
}
.admin-sidebar-user > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.admin-sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-sidebar-user a,
.family-sidebar .sidebar-user a { grid-column: 1 / -1; margin-top: 7px; color: #8191ab; font-size: 12px; text-decoration: none; }
.admin-topbar,
.family-topbar {
    min-height: 86px;
    padding: 16px 34px;
    justify-content: space-between;
    background: rgba(7,16,31,.86);
    border-bottom-color: rgba(144,166,204,.12);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 12;
}
.topbar-title { display: grid; gap: 4px; }
.topbar-kicker { color: #63718a; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.admin-topbar h1,
.family-topbar h1 { margin: 0; color: #f4f7ff; font-size: 23px; }
.admin-topbar p,
.family-topbar p { color: var(--dark-muted); }
.topbar-meta { display: flex; align-items: center; gap: 13px; color: #8795ad; font-size: 13px; }
.admin-mode-badge {
    padding: 7px 10px;
    border: 1px solid rgba(127,145,255,.3);
    border-radius: 999px;
    color: #aebcff;
    background: rgba(83,80,190,.16);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}
.admin-main-content,
.family-main-content { padding: 28px 34px 40px; }
.admin-body .footer,
.family-body .footer { color: #596880; border-top: 1px solid rgba(136,157,193,.09); }
.admin-body .card,
.family-body .card {
    color: var(--dark-text);
    background: linear-gradient(145deg,rgba(18,31,51,.96),rgba(12,24,42,.96));
    border-color: var(--dark-border);
    box-shadow: 0 18px 55px rgba(0,0,0,.16);
}
.admin-body .card h2,
.admin-body .card h3,
.family-body .card h2,
.family-body .card h3 { color: #f6f8ff; }
.admin-body .muted,
.admin-body .help,
.family-body .muted,
.family-body .help { color: var(--dark-muted); }
.admin-body .btn-primary,
.family-body .btn-primary {
    background: linear-gradient(135deg,#496dff,#7957df);
    box-shadow: 0 12px 26px rgba(67,83,210,.25);
}
.admin-body .btn-primary:hover,
.family-body .btn-primary:hover { background: linear-gradient(135deg,#5b7cff,#8b63ef); }
.admin-body .btn-secondary,
.family-body .btn-secondary {
    color: #dce4f4;
    background: rgba(255,255,255,.035);
    border-color: rgba(144,163,196,.2);
}
.admin-body .btn-secondary:hover,
.family-body .btn-secondary:hover { background: rgba(255,255,255,.07); }
.admin-body input:not([type]),
.admin-body input[type=text],
.admin-body input[type=date],
.admin-body input[type=datetime-local],
.admin-body input[type=number],
.admin-body input[type=url],
.admin-body input[type=password],
.admin-body input[type=email],
.admin-body input[type=tel],
.admin-body select,
.admin-body textarea,
.family-body input:not([type]),
.family-body input[type=text],
.family-body input[type=date],
.family-body input[type=datetime-local],
.family-body input[type=number],
.family-body input[type=url],
.family-body input[type=password],
.family-body input[type=email],
.family-body input[type=tel],
.family-body select,
.family-body textarea {
    color: #eef3ff;
    background: #0b1729;
    border-color: rgba(143,166,204,.24);
}
.admin-body select option,
.admin-body select optgroup,
.family-body select option,
.family-body select optgroup { background: #0b1729; color: #eef3ff; }
.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus,
.family-body input:focus,
.family-body select:focus,
.family-body textarea:focus { outline: 3px solid rgba(80,107,255,.15); border-color: #647fff; }
.admin-body .table-wrap,
.family-body .table-wrap { background: rgba(7,16,29,.34); border-color: var(--dark-border); }
.admin-body th,
.family-body th { color: #74829b; background: rgba(255,255,255,.02); border-bottom-color: var(--dark-border); }
.admin-body td,
.family-body td { border-bottom-color: rgba(143,164,200,.1); }
.admin-body .alert-info,
.family-body .alert-info { color: #9edbff; background: rgba(40,118,165,.13); border-color: rgba(80,169,216,.25); }
.admin-body .alert-warning,
.family-body .alert-warning { color: #ffd487; background: rgba(166,105,22,.14); border-color: rgba(218,153,52,.27); }
.admin-body .alert-success,
.family-body .alert-success { color: #8ce5b9; background: rgba(34,134,88,.13); border-color: rgba(76,188,126,.25); }
.admin-body .errors,
.family-body .errors { color: #ff9a95; background: rgba(173,47,47,.14); border-color: rgba(238,91,91,.3); }

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 25px;
    margin-bottom: 22px;
    padding: 4px 1px 2px;
}
.dashboard-hero h2 { margin: 6px 0 8px; font-size: clamp(27px,3vw,39px); letter-spacing: -.035em; }
.dashboard-hero p { max-width: 780px; margin: 0; color: var(--dark-muted); line-height: 1.6; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.eyebrow { color: #7588c8; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.stats-dashboard-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; }
.stat-panel {
    min-height: 157px;
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 18px;
    border: 1px solid var(--dark-border);
    border-radius: 17px;
    background: linear-gradient(145deg,rgba(18,31,51,.97),rgba(10,22,38,.98));
    box-shadow: 0 15px 40px rgba(0,0,0,.14);
}
.stat-panel::after { content: ''; position: absolute; width: 120px; height: 120px; right: -48px; bottom: -55px; border-radius: 50%; opacity: .12; filter: blur(2px); }
.stat-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #aeb9ca; font-size: 12px; font-weight: 700; }
.stat-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 17px; font-weight: 900; }
.stat-panel > strong { margin-top: 4px; font-size: clamp(20px,1.8vw,29px); letter-spacing: -.035em; white-space: nowrap; }
.stat-panel > small { color: #718099; line-height: 1.35; }
.micro-line { height: 5px; overflow: hidden; margin-top: auto; border-radius: 999px; background: rgba(255,255,255,.055); }
.micro-line span { display: block; height: 100%; border-radius: inherit; }
.stat-panel-green strong { color: #4ed89a; }.stat-panel-green .stat-symbol { color:#64e2a8;background:rgba(47,184,119,.13);}.stat-panel-green .micro-line span,.stat-panel-green::after{background:#42ce8e;}
.stat-panel-blue strong { color: #6f92ff; }.stat-panel-blue .stat-symbol { color:#7f9cff;background:rgba(73,104,229,.15);}.stat-panel-blue .micro-line span,.stat-panel-blue::after{background:#5c80ff;}
.stat-panel-red strong { color: #ff746d; }.stat-panel-red .stat-symbol { color:#ff857d;background:rgba(225,77,72,.15);}.stat-panel-red .micro-line span,.stat-panel-red::after{background:#ef6058;}
.stat-panel-purple strong { color: #a77bff; }.stat-panel-purple .stat-symbol { color:#b38cff;background:rgba(138,80,223,.16);}.stat-panel-purple .micro-line span,.stat-panel-purple::after{background:#9666ec;}
.stat-panel-orange strong { color: #ffb457; }.stat-panel-orange .stat-symbol { color:#ffc26e;background:rgba(218,135,32,.15);}.stat-panel-orange .micro-line span,.stat-panel-orange::after{background:#efa43d;}
.stat-panel-cyan strong { color: #62cfff; }.stat-panel-cyan .stat-symbol { color:#7dd8ff;background:rgba(55,161,210,.14);}.stat-panel-cyan .micro-line span,.stat-panel-cyan::after{background:#51bce8;}
.dashboard-main-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(285px,.72fr); gap: 16px; margin-top: 16px; }
.dashboard-lower-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.dashboard-section-heading { align-items: flex-start; }
.dashboard-section-heading h2 { margin: 5px 0 0; font-size: 20px; }
.chart-legend { display: flex; gap: 13px; color: #8b98ae; font-size: 12px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend-income { background: #5e80ff; box-shadow: 0 0 12px #4f72ff; }.legend-expense { background: #ff6d68; box-shadow: 0 0 12px #ef5752; }
.bar-chart { height: 260px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); align-items: end; gap: 18px; padding: 28px 10px 0; background: repeating-linear-gradient(to top,transparent 0,transparent 51px,rgba(143,164,200,.07) 52px); border-radius: 13px; }
.bar-month { height: 100%; min-width: 0; display: grid; grid-template-rows: minmax(0,1fr) 25px; gap: 8px; text-align: center; }
.bar-pair { height: 100%; display: flex; justify-content: center; align-items: flex-end; gap: 7px; }
.bar-pair span { width: min(34%,24px); min-height: 4px; border-radius: 7px 7px 2px 2px; transition: height .3s; }
.bar-income { background: linear-gradient(180deg,#7c95ff,#3f64e9); box-shadow: 0 0 18px rgba(66,93,226,.26); }
.bar-expense { background: linear-gradient(180deg,#ff8b84,#df4e4b); box-shadow: 0 0 18px rgba(220,72,72,.2); }
.bar-month small { color: #68768d; }
.benefits-stat-card { display: grid; align-content: start; }
.benefits-stat-card > h2 { margin: 10px 0 5px; color: #9d82ff !important; font-size: 37px; }
.benefits-stat-card > p { color: var(--dark-muted); line-height: 1.55; }
.benefit-mini-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 16px 0 20px; }
.benefit-mini-stats > div { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.035); }
.benefit-mini-stats span { color: #78869c; font-size: 10px; text-transform: uppercase; }
.benefit-mini-stats strong { font-size: 16px; }
.text-link { align-self: end; font-weight: 800; font-size: 13px; text-decoration: none; }
.category-stat-list { display: grid; gap: 17px; margin-top: 18px; }
.category-stat-row > div:first-child { display:flex; justify-content:space-between; gap:15px; margin-bottom:8px; font-size:13px; }
.category-stat-row span { color:#aab5c7; }.category-stat-row strong { color:#f4f7ff; }
.category-stat-bar { height:7px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.055); }
.category-stat-bar span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#536fff,#8b5de7); }
.children-stat-list,.dashboard-activity-list { display:grid; margin-top:10px; }
.child-stat-line,.dashboard-activity-row { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:11px; padding:12px 0; border-bottom:1px solid rgba(143,164,200,.09); color:inherit; text-decoration:none; }
.child-stat-line:last-child,.dashboard-activity-row:last-child { border-bottom:0; }
.mini-avatar { width:38px;height:38px;display:grid;place-items:center;border-radius:12px;color:#dce4ff;background:linear-gradient(145deg,#3b58aa,#6645a9);font-weight:900; }
.child-stat-line > span:nth-child(2),.dashboard-activity-row > span:nth-child(2) { min-width:0;display:grid;gap:4px; }
.child-stat-line small,.dashboard-activity-row small { color:#718098;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.activity-type { width:36px;height:36px;display:grid;place-items:center;border-radius:11px;font-weight:900; }
.activity-type.income { color:#5be0a1;background:rgba(47,180,116,.13); }.activity-type.expense { color:#ff7c75;background:rgba(218,71,67,.14); }
.positive-value { color:#4ed89a; }.negative-value { color:#ff746d; }
.alert-count { padding:5px 8px;border-radius:999px;color:#ffca76;background:rgba(218,133,30,.13);font-size:11px;font-weight:800; }

/* Uproszczony formularz dochodu */
.income-page-layout { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(285px,.65fr); gap:18px; max-width:1300px; margin:0 auto; }
.income-entry-card { padding:28px; }
.income-form-heading { display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding-bottom:22px;margin-bottom:22px;border-bottom:1px solid var(--dark-border); }
.income-form-heading h2 { margin:5px 0 7px;font-size:29px;letter-spacing:-.03em; }
.income-form-heading p { margin:0;color:var(--dark-muted);line-height:1.55; }
.income-heading-icon { width:52px;height:52px;display:grid;place-items:center;border-radius:16px;color:#92a8ff;background:linear-gradient(145deg,rgba(72,99,224,.24),rgba(113,72,193,.2));border:1px solid rgba(111,138,255,.25);font-size:30px; }
.income-parent-selector { max-width:420px;margin-bottom:18px; }
.income-core-grid { display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:16px; }
.income-core-grid .full { grid-column:1/-1; }
.income-amount-field .money-input input { font-size:29px;font-weight:900;letter-spacing:-.025em; }
.money-input { position:relative; }
.money-input input { padding-right:49px !important; }
.money-input > span { position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#77869f;font-weight:800; }
.child-benefit-panel { margin-top:22px;padding:22px;border:1px solid rgba(123,101,225,.27);border-radius:17px;background:linear-gradient(145deg,rgba(76,67,164,.13),rgba(34,59,102,.12)); }
.child-benefit-panel[hidden] { display:none; }
.child-benefit-head { display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px; }
.child-benefit-head h3 { margin:5px 0 6px;font-size:21px; }.child-benefit-head p { margin:0;color:var(--dark-muted);line-height:1.5; }
.equal-split-badge { padding:7px 10px;border:1px solid rgba(149,125,255,.28);border-radius:999px;color:#b5a6ff;background:rgba(119,85,208,.13);font-size:10px;font-weight:900;letter-spacing:.08em;white-space:nowrap; }
.child-choice-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px; }
.child-choice-card { position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 22px;align-items:center;gap:10px;padding:13px;border:1px solid rgba(143,164,200,.17);border-radius:13px;background:rgba(5,14,27,.34);cursor:pointer;transition:.18s; }
.child-choice-card:hover { border-color:rgba(105,132,241,.42);transform:translateY(-1px); }
.child-choice-card input { position:absolute;opacity:0;pointer-events:none; }
.child-choice-card:has(input:checked) { border-color:#617cf0;background:rgba(71,91,194,.2);box-shadow:0 0 0 3px rgba(78,102,219,.08); }
.child-choice-avatar { width:40px;height:40px;display:grid;place-items:center;border-radius:12px;color:#fff;background:linear-gradient(145deg,#4163d5,#7d50cf);font-weight:900; }
.child-choice-data { min-width:0;display:grid;gap:4px; }.child-choice-data small { color:#77869d;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.child-check-mark { color:#6f8098; }.child-choice-card:has(input:checked) .child-check-mark { color:#78e3aa; }
.child-allocation-grid { display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:15px;align-items:end;margin-top:17px; }
.allocation-summary { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
.allocation-summary > div { display:grid;gap:6px;padding:12px;border-radius:11px;background:rgba(255,255,255,.035); }
.allocation-summary span { color:#73829a;font-size:10px;text-transform:uppercase; }.allocation-summary strong { font-size:15px; }
.income-details { margin-top:19px;border:1px solid var(--dark-border);border-radius:13px;background:rgba(255,255,255,.018); }
.income-details summary { padding:14px 16px;cursor:pointer;font-weight:800; }.income-details summary span { margin-left:7px;color:#6f7d94;font-size:11px;font-weight:600; }
.income-details-grid { padding:0 16px 16px; }
.income-submit-row { display:flex;justify-content:flex-end;gap:10px;margin-top:22px; }.btn-large { min-width:180px;padding:12px 18px; }
.income-side-panel { display:grid;align-content:start;gap:16px; }
.income-rule-card ol { margin:16px 0 0;padding-left:20px;color:#9aa7bc;line-height:1.65; }.income-rule-card li+li { margin-top:8px; }
.income-legend-card { display:grid;gap:14px; }.legend-line { display:grid;grid-template-columns:12px minmax(0,1fr);gap:10px;align-items:start; }.legend-line>div { display:grid;gap:3px; }.legend-line small { color:#748198;line-height:1.4; }
.legend-dot { width:9px;height:9px;margin-top:5px;border-radius:50%; }.legend-dot.required{background:#9d75ff;box-shadow:0 0 10px #7c5ad7;}.legend-dot.optional{background:#55c7ff;box-shadow:0 0 10px #389dcc;}.legend-dot.normal{background:#4ed89a;box-shadow:0 0 10px #36a876;}

@media (max-width: 1380px) {
    .stats-dashboard-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .dashboard-lower-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .dashboard-lower-grid > :last-child { grid-column:1/-1; }
}
@media (max-width: 1050px) {
    .admin-shell,.family-shell { grid-template-columns:242px minmax(0,1fr); }
    .dashboard-main-grid,.income-page-layout { grid-template-columns:1fr; }
    .income-side-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .child-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .admin-shell,.family-shell { display:block; }
    .admin-sidebar,.family-sidebar { width:270px;left:-285px; }
    .menu-open .admin-sidebar,.menu-open .family-sidebar { left:0; }
    .admin-main-content,.family-main-content { padding:20px 15px 32px; }
    .admin-topbar,.family-topbar { min-height:70px;padding:13px 16px; }
    .topbar-meta { display:none; }
    .dashboard-hero { align-items:flex-start;flex-direction:column; }
    .stats-dashboard-grid,.dashboard-lower-grid { grid-template-columns:1fr; }
    .dashboard-lower-grid > :last-child { grid-column:auto; }
    .stat-panel { min-height:135px; }
    .bar-chart { height:220px;gap:8px;padding-left:0;padding-right:0; }
    .chart-legend { display:none; }
    .income-entry-card { padding:19px; }
    .income-core-grid,.child-allocation-grid,.income-side-panel { grid-template-columns:1fr; }
    .child-choice-grid { grid-template-columns:1fr; }
    .allocation-summary { grid-template-columns:1fr; }
    .child-benefit-head { flex-direction:column; }
    .income-submit-row { flex-direction:column-reverse; }.income-submit-row .btn { width:100%; }
    .dashboard-activity-row,.child-stat-line { grid-template-columns:38px minmax(0,1fr); }.dashboard-activity-row>strong,.child-stat-line>span:last-child { grid-column:2; }
}


/* ASK HomeBudget V0.9.0.3 — czytelne ciemne kafelki formularzy i uprawnień */
.admin-body .conditional-box,
.family-body .conditional-box {
    color: var(--dark-text);
    background: linear-gradient(145deg, rgba(10, 23, 41, .98), rgba(13, 29, 50, .96));
    border-color: rgba(128, 151, 193, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 14px 34px rgba(0, 0, 0, .12);
}
.admin-body .conditional-box h2,
.admin-body .conditional-box h3,
.family-body .conditional-box h2,
.family-body .conditional-box h3 { color: #f4f7ff; }

.admin-body .child-funds-box,
.family-body .child-funds-box {
    background: linear-gradient(145deg, rgba(48, 37, 17, .42), rgba(15, 27, 45, .97));
    border-color: rgba(231, 174, 73, .30);
}

.beneficiary-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.beneficiary-choice,
.permission-card {
    position: relative;
    min-height: 58px;
    padding: 14px 15px;
    border: 1px solid rgba(133, 157, 198, .22);
    border-radius: 13px;
    color: #dbe4f5;
    background: #101d31;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.beneficiary-choice:hover,
.permission-card:hover {
    transform: translateY(-1px);
    border-color: rgba(105, 132, 241, .55);
    background: #14243b;
}
.beneficiary-choice:has(input:checked),
.permission-card:has(input:checked) {
    color: #f5f7ff;
    border-color: #647fff;
    background: linear-gradient(145deg, rgba(63, 91, 205, .31), rgba(82, 58, 161, .23));
    box-shadow: 0 0 0 3px rgba(82, 108, 235, .10), inset 3px 0 0 #7d94ff;
}
.beneficiary-choice input,
.permission-card input { accent-color: #7189ff; }
.permission-card { width: 100%; }
.permission-card + .help { margin: 3px 4px 0; }

.admin-body .check-card,
.family-body .check-card {
    color: #dbe4f5;
    background: #101d31;
    border-color: rgba(133, 157, 198, .22);
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.admin-body .check-card:hover,
.family-body .check-card:hover {
    transform: translateY(-1px);
    border-color: rgba(105, 132, 241, .55);
    background: #14243b;
}
.admin-body .check-card:has(input:checked),
.family-body .check-card:has(input:checked) {
    border-color: #647fff;
    background: rgba(66, 88, 190, .25);
    box-shadow: 0 0 0 3px rgba(82, 108, 235, .09);
}

/* Ciemne znaczniki w kolumnie Uprawnienia na liście dzieci */
.admin-body .badge,
.family-body .badge {
    color: #b9c5da;
    background: rgba(126, 145, 178, .13);
    border: 1px solid rgba(137, 158, 196, .17);
}
.admin-body .badge-success,
.family-body .badge-success {
    color: #75e0ac;
    background: rgba(36, 145, 92, .16);
    border-color: rgba(79, 201, 137, .26);
}
.admin-body .badge-warning,
.family-body .badge-warning {
    color: #ffd17e;
    background: rgba(174, 112, 24, .17);
    border-color: rgba(231, 166, 68, .25);
}
.admin-body .badge-danger,
.family-body .badge-danger {
    color: #ff9690;
    background: rgba(174, 55, 55, .17);
    border-color: rgba(235, 94, 91, .27);
}
.admin-body .badge-info,
.family-body .badge-info {
    color: #8bd3ff;
    background: rgba(39, 123, 174, .17);
    border-color: rgba(80, 169, 216, .25);
}

@media (max-width: 900px) {
    .beneficiary-options { grid-template-columns: 1fr; }
}

/* ASK HomeBudget V0.9.1.0 — ciemne Pieniądze dzieci oraz Długi i zobowiązania */
.admin-body .child-stat-card {
    color: var(--dark-text);
    border-color: rgba(126, 151, 194, .20);
    background: linear-gradient(145deg, #101d31, #0c1728);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .17), inset 0 1px 0 rgba(255,255,255,.025);
}
.admin-body .child-stat-card:hover { border-color: rgba(105, 132, 241, .42); transform: translateY(-1px); }
.admin-body .child-stat-card span { color: #8f9db5; }
.admin-body .child-stat-card strong { color: #f4f7ff; }
.admin-body .child-stat-card .income-icon { color: #63e0ab; background: rgba(42, 175, 116, .15); }
.admin-body .child-stat-card .debt-icon { color: #ff8f89; background: rgba(197, 64, 64, .16); }
.admin-body .child-stat-card .daily-icon { color: #8ba4ff; background: rgba(69, 94, 204, .18); }
.admin-body .child-stat-card .expense-icon { color: #ffc06b; background: rgba(194, 119, 30, .17); }

.debt-page-heading { display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:20px; }
.debt-page-heading h2 { margin:4px 0 8px;font-size:clamp(27px,3vw,38px); }
.debt-page-heading p { max-width:760px;margin:0;color:var(--dark-muted,#667085);line-height:1.6; }
.debt-summary-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px; }
.debt-summary-card { position:relative;overflow:hidden;display:grid;gap:8px;min-height:132px;padding:22px;border:1px solid rgba(126,151,194,.18);border-radius:17px;background:linear-gradient(145deg,#101d31,#0c1728);box-shadow:0 14px 32px rgba(0,0,0,.13); }
.debt-summary-card:after { content:"";position:absolute;width:120px;height:120px;right:-62px;top:-64px;border:25px solid rgba(96,123,255,.08);border-radius:50%; }
.debt-summary-card span,.debt-summary-card small { color:#8f9db5; }
.debt-summary-card strong { color:#f4f7ff;font-size:clamp(24px,2.4vw,34px);line-height:1.1; }
.debt-summary-card.paid strong { color:#63e0ab; }
.debt-summary-card.remaining strong { color:#ffd17e; }
.debt-summary-card.overdue { border-color:rgba(238,91,87,.28);background:linear-gradient(145deg,rgba(65,23,30,.78),#0c1728); }
.debt-summary-card.overdue strong { color:#ff8f89; }
.debt-list-card { margin-top:0; }
.debt-table td { vertical-align:middle; }
.debt-party-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:22px; }
.debt-party-card { padding:20px;border:1px solid rgba(116,145,197,.22);border-radius:16px;background:linear-gradient(145deg,rgba(16,31,53,.98),rgba(12,23,40,.98)); }
.debt-party-card.creditor-card { border-color:rgba(103,182,151,.24); }
.debt-party-card h3 { margin:2px 0 18px;font-size:21px; }
.party-household-note { padding:14px;border:1px solid rgba(106,132,239,.20);border-radius:12px;color:#cbd6e9;background:rgba(76,99,196,.12);line-height:1.5; }
.debt-detail-grid { align-items:start; }
.debt-payment-card { border-color:rgba(78,216,154,.22) !important; }
.debt-closed-message { display:grid;gap:8px;padding:22px;border:1px solid rgba(126,151,194,.18);border-radius:14px;background:rgba(255,255,255,.025); }
.debt-closed-message strong { font-size:24px; }
.debt-closed-message span { color:#8f9db5; }
.debt-status-value { font-size:22px !important; }

.family-body .debt-summary-card { background:#fff;border-color:#e2e8f0;box-shadow:0 8px 24px rgba(29,41,57,.05); }
.family-body .debt-summary-card span,.family-body .debt-summary-card small { color:#667085; }
.family-body .debt-summary-card strong { color:#172033; }
.family-body .debt-summary-card.paid strong { color:#087a55; }
.family-body .debt-summary-card.remaining strong { color:#9a6700; }
.family-body .debt-summary-card.overdue strong { color:#b42318; }
.family-body .debt-page-heading p { color:#667085; }

@media (max-width:1100px) { .debt-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.debt-party-grid { grid-template-columns:1fr; } }
@media (max-width:760px) { .debt-page-heading { align-items:stretch;flex-direction:column; }.debt-summary-grid { grid-template-columns:1fr; }.debt-page-heading .actions { width:100%; }.debt-page-heading .actions .btn { flex:1; } }

/* ASK HomeBudget V0.9.2.0 — skarbonki dzieci */
.admin-body .child-stat-card .piggy-icon { color:#ffcf70;background:rgba(204,139,30,.17); }
.piggy-hero { position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.65fr);gap:24px;align-items:center;padding:28px;border:1px solid rgba(116,143,198,.22);border-radius:21px;background:linear-gradient(135deg,#111f35 0%,#0d1728 58%,#261a3e 100%);box-shadow:0 20px 48px rgba(0,0,0,.20); }
.piggy-hero:after { content:"";position:absolute;width:270px;height:270px;right:-105px;top:-130px;border:54px solid rgba(116,93,255,.09);border-radius:50%; }
.piggy-hero h2 { margin:5px 0 10px;font-size:clamp(28px,3vw,42px);color:#f6f8ff; }
.piggy-hero p { max-width:780px;margin:0;color:#a8b4c9;line-height:1.65; }
.piggy-hero .hero-actions { position:relative;z-index:1;margin-top:20px; }
.piggy-hero-total { position:relative;z-index:1;display:grid;gap:7px;padding:22px;border:1px solid rgba(255,255,255,.10);border-radius:17px;background:rgba(7,15,28,.48);backdrop-filter:blur(10px); }
.piggy-hero-total span,.piggy-hero-total small { color:#99a8c1; }
.piggy-hero-total strong { color:#ffd27c;font-size:clamp(28px,3vw,39px); }
.piggy-summary-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0; }
.piggy-summary-card { display:grid;gap:7px;min-height:122px;padding:21px;border:1px solid rgba(120,148,195,.19);border-radius:17px;background:linear-gradient(145deg,#101d31,#0b1626);box-shadow:0 14px 32px rgba(0,0,0,.14); }
.piggy-summary-card span,.piggy-summary-card small { color:#8f9db5; }
.piggy-summary-card strong { color:#f5f7ff;font-size:30px; }
.piggy-summary-card.deposit strong { color:#69e4af; }
.piggy-summary-card.withdrawal strong { color:#ff9690; }
.piggy-list-card,.piggy-history-card { margin-top:0; }
.piggy-card-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px; }
.piggy-child-card { display:grid;gap:16px;padding:20px;border:1px solid rgba(121,149,197,.20);border-radius:18px;background:linear-gradient(150deg,#111f34,#0d1829);box-shadow:0 15px 34px rgba(0,0,0,.14);transition:transform .18s ease,border-color .18s ease; }
.piggy-child-card:hover { transform:translateY(-2px);border-color:rgba(111,137,255,.46); }
.piggy-child-head { display:flex;align-items:center;gap:12px; }
.piggy-avatar { display:grid;place-items:center;width:46px;height:46px;border-radius:14px;color:#ffd27c;font-size:25px;background:rgba(204,139,30,.14);border:1px solid rgba(237,175,68,.18); }
.piggy-child-head span,.piggy-balance span,.piggy-meta span { color:#8998b0;font-size:12px;text-transform:uppercase;letter-spacing:.07em; }
.piggy-child-head h3 { margin:3px 0 0;color:#f5f7ff;font-size:21px; }
.piggy-balance { display:grid;gap:5px;padding:16px;border:1px solid rgba(248,193,87,.16);border-radius:14px;background:rgba(191,126,25,.08); }
.piggy-balance strong { color:#ffd27c;font-size:28px; }
.piggy-meta { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.piggy-meta>div { display:grid;gap:5px;padding:11px;border:1px solid rgba(125,151,193,.13);border-radius:11px;background:rgba(255,255,255,.025); }
.piggy-meta strong { color:#dce4f4;font-size:13px; }
.piggy-difference { padding:10px 12px;border-radius:10px;font-size:13px;color:#b9c5d8;background:rgba(123,145,180,.10); }
.piggy-difference.ok { color:#72dfad;background:rgba(41,153,101,.13); }
.piggy-difference.shortage { color:#ff9690;background:rgba(184,59,59,.14); }
.piggy-difference.surplus { color:#8fd4ff;background:rgba(49,128,181,.14); }
.piggy-actions { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px; }
.piggy-actions a { padding:9px 7px;border:1px solid rgba(126,150,192,.18);border-radius:9px;color:#cdd7e8;text-align:center;text-decoration:none;font-size:12px;background:rgba(255,255,255,.025); }
.piggy-actions a:hover { color:#fff;border-color:rgba(105,132,241,.55);background:rgba(72,92,190,.20); }
.piggy-history-card { margin-top:20px; }
.piggy-history-table td { vertical-align:middle; }
.table-action { font-size:12px;text-decoration:none; }
.piggy-form-layout { display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.7fr);gap:20px;align-items:start; }
.piggy-operation-card { max-width:none; }
.piggy-actor-box,.piggy-debt-box { display:grid;gap:15px;margin-top:20px;padding:18px;border:1px solid rgba(119,147,196,.20);border-radius:15px;background:linear-gradient(145deg,rgba(15,31,53,.98),rgba(11,22,38,.98)); }
.piggy-actor-box h3 { margin:3px 0 0;color:#f4f7ff; }
.withdrawal-actor-box { border-color:rgba(228,106,98,.22); }
.piggy-debt-box { border-color:rgba(241,179,67,.22);background:linear-gradient(145deg,rgba(48,36,16,.35),rgba(12,24,41,.98)); }
.piggy-debt-box .permission-card small { display:block;margin-top:4px;color:#95a4ba;line-height:1.45; }
.optional-details { margin-top:20px;border:1px solid rgba(119,147,196,.18);border-radius:14px;background:rgba(255,255,255,.02); }
.optional-details summary { cursor:pointer;padding:14px 16px;color:#dce4f3;font-weight:700; }
.optional-details .details-content { padding:0 16px 16px; }
.piggy-submit-row { margin:20px 0 0; }
.piggy-info-card { position:sticky;top:94px;display:grid;gap:12px;border-color:rgba(106,132,239,.22) !important;background:linear-gradient(145deg,#101d31,#0b1626) !important; }
.piggy-info-card.warning { border-color:rgba(237,158,55,.24) !important; }
.piggy-info-card h3 { margin:0;color:#f4f7ff;line-height:1.35; }
.piggy-info-card ul { margin:0;padding-left:20px;color:#a5b2c7;line-height:1.65; }
.piggy-info-card li+li { margin-top:7px; }
.piggy-count-result { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 22px;padding:15px;border:1px solid rgba(121,149,197,.20);border-radius:14px;background:rgba(255,255,255,.025); }
.piggy-count-result>div { display:grid;gap:5px;padding:12px;border-radius:11px;background:rgba(5,13,25,.35); }
.piggy-count-result span { color:#8f9db5;font-size:12px;text-transform:uppercase;letter-spacing:.06em; }
.piggy-count-result strong { color:#f5f7ff;font-size:23px; }
.piggy-count-result.ok { border-color:rgba(69,199,139,.28); }
.piggy-count-result.ok strong { color:#70dfad; }
.piggy-count-result.shortage { border-color:rgba(229,83,77,.30); }
.piggy-count-result.shortage>div:last-child strong { color:#ff9690; }
.piggy-count-result.surplus { border-color:rgba(65,159,219,.30); }
.piggy-count-result.surplus>div:last-child strong { color:#8fd4ff; }
.admin-body .btn-danger { color:#fff;background:linear-gradient(135deg,#c74747,#a62f3d);border-color:#d35a5a;box-shadow:0 8px 22px rgba(148,39,50,.20); }
.admin-body .btn-danger:hover { background:linear-gradient(135deg,#d45151,#b53846); }

@media (max-width:1200px) {
    .piggy-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .piggy-form-layout { grid-template-columns:1fr; }
    .piggy-info-card { position:static; }
}
@media (max-width:820px) {
    .piggy-hero { grid-template-columns:1fr;padding:21px; }
    .piggy-summary-grid,.piggy-card-grid,.piggy-count-result { grid-template-columns:1fr; }
    .piggy-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .piggy-meta { grid-template-columns:1fr; }
}

/* ASK HomeBudget V0.10.0 — jeden wspólny budżet */
.unified-budget-hero { display:flex;justify-content:space-between;gap:24px;align-items:center;overflow:hidden;border-color:rgba(101,127,244,.26)!important;background:linear-gradient(135deg,#111f36 0%,#0b1729 55%,#1e183b 100%)!important;box-shadow:0 20px 50px rgba(0,0,0,.20); }
.unified-budget-hero h2 { margin:5px 0 10px;color:#f5f7ff;font-size:clamp(26px,3vw,40px); }
.unified-budget-hero p { max-width:840px;margin:0;color:#a6b4ca;line-height:1.65; }
.unified-budget-strip { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 4px; }
.unified-budget-strip>div { display:grid;gap:5px;padding:15px 17px;border:1px solid rgba(111,138,190,.18);border-radius:13px;background:linear-gradient(145deg,rgba(16,30,51,.96),rgba(9,20,35,.96)); }
.unified-budget-strip span { color:#8f9db5;font-size:12px;text-transform:uppercase;letter-spacing:.06em; }
.unified-budget-strip strong { color:#f4f7ff;font-size:22px; }
.unified-child-fund-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:15px; }
.unified-child-fund-card { display:flex;gap:14px;align-items:center;padding:17px;border:1px solid rgba(115,143,194,.18);border-radius:15px;background:linear-gradient(145deg,#101e33,#0b1728); }
.unified-child-fund-card .child-avatar { display:grid;place-items:center;flex:0 0 44px;height:44px;border-radius:13px;color:#aeb8ff;font-size:20px;font-weight:800;background:rgba(102,89,235,.17);border:1px solid rgba(123,113,255,.25); }
.unified-child-fund-card>div:last-child { display:grid;gap:3px;min-width:0; }
.unified-child-fund-card strong { color:#f5f7ff; }
.unified-child-fund-card span,.unified-child-fund-card small { color:#8e9cb3;font-size:12px; }
.unified-child-fund-card b { color:#7ce1b2;font-size:22px; }
.unified-expense-card .unified-beneficiary-box { border-color:rgba(102,128,236,.24);background:linear-gradient(145deg,#101d31,#0b1626); }
.unified-expense-preview { border-color:rgba(112,137,241,.27);background:linear-gradient(145deg,#101e33,#0c1728); }
.income-positive { color:#68dda9!important; }
.expense-negative { color:#ff918b!important; }

@media (max-width:1050px) {
    .unified-child-fund-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
    .unified-budget-hero { align-items:flex-start;flex-direction:column; }
    .unified-budget-strip,.unified-child-fund-grid { grid-template-columns:1fr; }
}

/* V0.10.2 — długi wobec dzieci w module Pieniądze dzieci */
.child-debt-section { border-color: rgba(239, 155, 74, .20) !important; background: linear-gradient(145deg, #101d31, #0b1627) !important; }
.child-debt-section .section-description { max-width: 760px; margin: 7px 0 0; color: #91a0b8; line-height: 1.55; }
.child-debt-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 18px 0 20px; }
.child-debt-summary article { display: grid; gap: 7px; min-height: 118px; padding: 18px; border: 1px solid rgba(129, 151, 193, .18); border-radius: 15px; background: linear-gradient(145deg, rgba(18, 34, 57, .96), rgba(10, 21, 37, .96)); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.child-debt-summary article:first-child { border-color: rgba(235, 113, 102, .25); background: linear-gradient(145deg, rgba(62, 25, 31, .42), rgba(10, 21, 37, .96)); }
.child-debt-summary article.paid { border-color: rgba(74, 199, 143, .22); }
.child-debt-summary span,.child-debt-summary small { color: #8f9db4; }
.child-debt-summary strong { color: #f5f7ff; font-size: clamp(24px, 2.4vw, 32px); }
.child-debt-summary article:first-child strong { color: #ff9690; }
.child-debt-summary article.paid strong { color: #6fe0ad; }
.child-creditor-name { color: #ffd17d; }
.child-debt-table td { vertical-align: middle; }
.child-debt-table tbody tr:hover { background: rgba(91, 112, 212, .07); }
@media (max-width: 1150px) { .child-debt-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .child-debt-summary { grid-template-columns: 1fr; } }

/* ASK HomeBudget V0.10.3 — mobilne logowanie rodzica */
.parent-mobile-login {
    width: min(540px, 100%);
    overflow: hidden;
    border: 1px solid #243451;
    background: linear-gradient(155deg, #111d31 0%, #0b1525 58%, #17142d 100%);
    color: #f5f7ff;
    box-shadow: 0 28px 70px rgba(7, 14, 27, .35);
}
.parent-mobile-login .muted,
.parent-mobile-login .help { color: #9aa9bf; }
.parent-login-logo { margin-bottom: 25px; }
.parent-login-logo .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(145deg, #6575ff, #7854e8);
    color: #fff;
    box-shadow: 0 10px 26px rgba(89, 92, 236, .30);
}
.parent-login-logo h1 { color: #fff; font-size: 27px; }
.login-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #8fa0ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
}
.parent-login-switch {
    gap: 9px;
    padding: 7px;
    margin-bottom: 24px;
    border: 1px solid rgba(135, 155, 194, .15);
    background: rgba(5, 13, 25, .55);
}
.parent-login-switch .login-switch-button {
    min-height: 86px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 9px;
    padding: 12px 13px;
    color: #9aa9bf;
    text-align: left;
    border: 1px solid transparent;
}
.parent-login-switch .login-switch-button > span:nth-child(2) {
    color: #cdd7e7;
    font-size: 14px;
}
.parent-login-switch .login-switch-button small {
    grid-column: 2;
    color: #76869e;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}
.parent-login-switch .login-switch-button.active {
    color: #fff;
    border-color: rgba(119, 132, 255, .45);
    background: linear-gradient(145deg, rgba(78, 91, 211, .34), rgba(94, 61, 174, .25));
    box-shadow: 0 10px 24px rgba(31, 35, 91, .25), inset 0 0 0 1px rgba(255, 255, 255, .025);
}
.parent-login-switch .login-switch-button.active > span:nth-child(2) { color: #fff; }
.parent-login-switch .login-switch-button.active small { color: #b8c2e6; }
.login-option-icon {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: #79daa9;
    background: rgba(57, 185, 124, .14);
}
.login-option-icon.qr-icon {
    color: #aeb8ff;
    background: rgba(104, 96, 236, .18);
    font-size: 20px;
}
.parent-mobile-login label { color: #dfe6f3; }
.parent-mobile-login input[type=text],
.parent-mobile-login input[type=password] {
    min-height: 48px;
    color: #f7f9ff;
    border-color: rgba(127, 151, 194, .28);
    background: rgba(5, 14, 27, .58);
}
.parent-mobile-login input::placeholder { color: #65758d; }
.parent-mobile-login input:focus {
    border-color: #7180ff;
    outline-color: rgba(98, 111, 255, .18);
}
.login-password-group { margin-top: 17px; }
.parent-login-submit {
    min-height: 49px;
    margin-top: 21px;
    background: linear-gradient(135deg, #5268eb, #7651db);
    box-shadow: 0 12px 28px rgba(71, 78, 201, .25);
}
.parent-login-submit:hover { background: linear-gradient(135deg, #6075f6, #835ee6); }
.mobile-qr-intro { display: grid; gap: 5px; margin-bottom: 14px; }
.mobile-qr-intro strong { font-size: 16px; }
.mobile-qr-intro span { color: #93a2b8; font-size: 12px; line-height: 1.45; }
.parent-camera-box {
    display: none;
    margin: 0;
    padding: 11px;
    border: 1px solid rgba(113, 135, 186, .24);
    border-radius: 18px;
    background: rgba(4, 10, 20, .58);
}
.parent-camera-box.active { display: block; }
.camera-stage {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 485px;
    border-radius: 14px;
    background: #030812;
}
.camera-stage video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 0;
}
.camera-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0 31%, rgba(2, 7, 16, .52) 49%, rgba(2, 7, 16, .73) 100%);
    pointer-events: none;
}
.camera-target {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(62vw, 250px);
    max-width: 70%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 22px;
    box-shadow: 0 0 45px rgba(93, 105, 255, .22);
    pointer-events: none;
}
.camera-target i { position: absolute; width: 42px; height: 42px; border-color: #8792ff; border-style: solid; }
.camera-target i:nth-child(1) { left: 0; top: 0; border-width: 4px 0 0 4px; border-radius: 16px 0 0 0; }
.camera-target i:nth-child(2) { right: 0; top: 0; border-width: 4px 4px 0 0; border-radius: 0 16px 0 0; }
.camera-target i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 4px 4px; border-radius: 0 0 0 16px; }
.camera-target i:nth-child(4) { right: 0; bottom: 0; border-width: 0 4px 4px 0; border-radius: 0 0 16px 0; }
.camera-scan-line {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(56vw, 225px);
    max-width: 64%;
    height: 2px;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, transparent, #7b8aff 14%, #83e6c1 50%, #7b8aff 86%, transparent);
    box-shadow: 0 0 13px #7181ff;
    animation: askQrScan 2.3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes askQrScan {
    0%, 100% { margin-top: -86px; opacity: .35; }
    50% { margin-top: 86px; opacity: 1; }
}
.camera-status-row { display: flex; align-items: center; gap: 9px; padding: 12px 4px 2px; }
.camera-status-row p { margin: 0; line-height: 1.45; }
.camera-status-dot {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e6ad45;
    box-shadow: 0 0 0 5px rgba(230, 173, 69, .10);
}
.camera-status-dot.ready { background: #52d59a; box-shadow: 0 0 0 5px rgba(82, 213, 154, .11); }
.camera-status-dot.error { background: #f06d68; box-shadow: 0 0 0 5px rgba(240, 109, 104, .11); }
.camera-status-dot.loading { animation: askQrPulse 1.1s ease-in-out infinite; }
@keyframes askQrPulse { 50% { opacity: .35; transform: scale(.82); } }
.camera-retry { margin-top: 9px; color: #dbe3f2; border-color: rgba(128, 151, 190, .26); background: rgba(255, 255, 255, .035); }
.qr-manual-fallback {
    margin-top: 13px;
    border: 1px solid rgba(125, 148, 188, .16);
    border-radius: 13px;
    background: rgba(255, 255, 255, .022);
}
.qr-manual-fallback summary { padding: 13px 14px; color: #aab7ca; cursor: pointer; font-size: 12px; font-weight: 700; }
.qr-manual-content { padding: 0 14px 14px; }
.qr-manual-content .btn { margin-top: 11px; }
.login-security-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 19px;
    padding: 13px;
    border: 1px solid rgba(69, 197, 138, .17);
    border-radius: 13px;
    background: rgba(39, 139, 95, .08);
}
.login-security-note > span { color: #69dda9; font-weight: 900; }
.login-security-note > div { display: grid; gap: 3px; }
.login-security-note strong { color: #dff8ed; font-size: 12px; }
.login-security-note small { color: #8ea99c; line-height: 1.45; }
.parent-mobile-login .login-links { border-color: rgba(125, 148, 188, .14); }
.parent-mobile-login .login-links a { color: #aab8ff; font-size: 12px; }

@media (max-width: 620px) {
    .auth-layout {
        place-items: stretch;
        padding: 0;
        background: #08111f;
    }
    .parent-mobile-login {
        width: 100%;
        min-height: 100vh;
        padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .parent-login-logo { margin-top: 7px; }
    .parent-login-switch .login-switch-button { min-height: 82px; padding: 10px; }
    .parent-login-switch .login-switch-button > span:nth-child(2) { font-size: 13px; }
    .camera-stage { max-height: none; aspect-ratio: 4 / 5; }
    .login-security-note { margin-top: 14px; }
}

@media (max-width: 380px) {
    .parent-login-switch .login-switch-button small { display: none; }
    .parent-login-switch .login-switch-button { min-height: 62px; grid-template-rows: 1fr; }
    .login-option-icon { grid-row: 1; }
}

/* ASK HomeBudget V0.10.4 — panel dziecka: skarbonka, świadczenia, pożyczki i zobowiązania */
.child-module-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; margin-top:18px; }
.child-module-card { min-height:178px; display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:13px; align-items:start; padding:19px; border:1px solid #e2e7f1; border-radius:18px; background:#fff; color:inherit; text-decoration:none; box-shadow:0 9px 25px rgba(29,41,57,.055); transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.child-module-card:hover { transform:translateY(-3px); box-shadow:0 16px 34px rgba(29,41,57,.1); border-color:#cdd6f5; }
.child-module-card > b { align-self:center; color:#98a2b3; font-size:20px; }
.child-module-card small { color:#8a94a8; font-size:10px; font-weight:900; letter-spacing:.09em; }
.child-module-card h3 { margin:5px 0 6px; color:var(--child-ink); font-size:18px; }
.child-module-card strong { display:block; color:var(--child-ink); font-size:21px; }
.child-module-card p { margin:8px 0 0; color:#667085; font-size:12px; line-height:1.45; }
.module-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; font-size:20px; font-weight:900; }
.piggy-module .module-icon { color:#9b5b00; background:#fff3d4; }
.benefits-module .module-icon { color:#3659d9; background:#edf1ff; }
.borrow-module .module-icon { color:#087a55; background:#e7f8f1; }
.obligations-module .module-icon { color:#b42318; background:#fff0ef; }

.child-section-page { max-width:1280px; margin:0 auto; }
.child-section-hero { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(270px,.6fr); gap:24px; align-items:center; padding:30px 32px; margin-bottom:18px; border-radius:23px; color:#fff; box-shadow:0 20px 44px rgba(31,48,112,.18); }
.child-section-hero h2 { margin:5px 0 9px; font-size:clamp(28px,3vw,40px); }
.child-section-hero p { max-width:760px; margin:0; color:rgba(255,255,255,.8); line-height:1.6; }
.child-section-hero .eyebrow { color:rgba(255,255,255,.75); }
.piggy-hero { background:linear-gradient(125deg,#8f5b14,#d3932e); }
.benefits-hero { background:linear-gradient(125deg,#233c9d,#6650db); }
.debt-hero { background:linear-gradient(125deg,#8c2733,#c4494f); }
.child-section-value { display:grid; gap:7px; padding:22px; border:1px solid rgba(255,255,255,.2); border-radius:18px; background:rgba(255,255,255,.12); backdrop-filter:blur(8px); }
.child-section-value span { color:rgba(255,255,255,.72); font-size:12px; font-weight:800; }
.child-section-value strong { color:#fff; font-size:clamp(30px,4vw,46px); }
.child-section-value.negative { background:rgba(96,0,9,.24); }
.child-readonly-card { margin-top:18px; }
.readonly-pill { display:inline-flex; padding:6px 10px; border-radius:999px; background:#eef1f7; color:#667085; font-size:11px; font-weight:900; }
.child-table th { background:#f7f9fc; }
.child-mini-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:18px 0; }
.child-mini-stats > section { display:grid; gap:6px; padding:18px; border:1px solid #e4e8f1; border-radius:16px; background:#fff; box-shadow:0 8px 22px rgba(29,41,57,.045); }
.child-mini-stats span { color:#667085; font-size:12px; font-weight:700; }
.child-mini-stats strong { color:var(--child-ink); font-size:24px; }
.child-page-intro { align-items:flex-start; }
.child-form-card { max-width:none; }
.loan-info-box { display:grid; gap:6px; margin:18px 0; padding:15px 17px; border:1px solid #cfd9fb; border-radius:14px; background:#f4f6ff; color:#48536c; line-height:1.5; }
.loan-info-box strong { color:#2946b8; }
.child-debt-link { color:inherit; text-decoration:none; }
.child-obligation-list { display:grid; gap:14px; margin-top:16px; }
.child-obligation-card { overflow:hidden; border:1px solid #ead7d7; border-radius:17px; background:#fffafa; }
.child-obligation-card.settled { border-color:#dfe8e3; background:#fbfdfc; opacity:.78; }
.obligation-main { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:19px 20px 13px; }
.obligation-main h3 { margin:8px 0 4px; color:var(--child-ink); }
.obligation-main p { margin:0; color:#667085; }
.obligation-amount { display:grid; gap:4px; text-align:right; }
.obligation-amount span { color:#667085; font-size:12px; }
.obligation-amount strong { color:#b42318; font-size:25px; }
.obligation-meta { display:flex; flex-wrap:wrap; gap:10px 20px; padding:12px 20px; border-top:1px solid #f1e5e5; border-bottom:1px solid #f1e5e5; color:#667085; font-size:12px; }
.child-repayment-form { display:grid; grid-template-columns:minmax(140px,.55fr) minmax(150px,.65fr) minmax(220px,1.3fr) auto; gap:12px; align-items:end; padding:17px 20px 20px; background:#fff; }
.child-repayment-form .btn { min-height:43px; }

@media (max-width:1180px) {
    .child-module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .child-repayment-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
    .child-module-grid,.child-mini-stats { grid-template-columns:1fr; }
    .child-section-hero { grid-template-columns:1fr; padding:24px 21px; border-radius:19px; }
    .child-section-value { max-width:none; }
    .child-module-card { min-height:0; }
    .child-repayment-form { grid-template-columns:1fr; }
    .obligation-main { display:grid; }
    .obligation-amount { text-align:left; }
    .child-table table { min-width:690px; }
}

/* ASK HomeBudget V0.10.5 — należności dziecka i automatyczne wyrównywanie zobowiązań */
.child-module-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.receivables-module .module-icon { color:#047857; background:#e7f8f1; }
.receivables-module strong { color:#047857; }
.receivables-hero { background:linear-gradient(125deg,#075f57,#0e8f75 55%,#38a98b); }
.receivables-hero .receivable-value { background:rgba(1,72,65,.28); }
.child-receivable-list { display:grid; gap:14px; margin-top:16px; }
.child-receivable-card { overflow:hidden; border:1px solid #cfe9df; border-radius:17px; background:#f8fffc; }
.child-receivable-card.settled { border-color:#dfe8e3; background:#fbfdfc; opacity:.78; }
.receivable-amount strong { color:#047857; }
.child-receivable-form { background:#fbfffd; }
.automatic-settlement-card { border-color:#cfe9df; background:linear-gradient(180deg,#fff,#f8fffc); }
.automatic-settlement-card .eyebrow { color:#047857; }

@media (max-width:1450px) and (min-width:1181px) {
    .child-module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:760px) {
    .readonly-pill { max-width:100%; white-space:normal; text-align:left; }
}

/* V0.10.6 — mobilna wpłata rodzica do skarbonki */
.parent-piggy-page{display:grid;gap:20px}.parent-piggy-hero{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:28px;border:1px solid rgba(116,132,255,.24);border-radius:24px;background:linear-gradient(135deg,rgba(47,54,111,.82),rgba(18,22,42,.96));box-shadow:0 22px 52px rgba(0,0,0,.22)}.parent-piggy-hero h2{margin:5px 0 8px;font-size:clamp(1.65rem,3vw,2.45rem)}.parent-piggy-hero p{max-width:760px;margin:0;color:var(--muted)}.parent-piggy-budget{min-width:260px;padding:18px 20px;border:1px solid rgba(71,218,158,.28);border-radius:18px;background:rgba(17,28,35,.78)}.parent-piggy-budget span,.parent-piggy-budget small{display:block;color:var(--muted)}.parent-piggy-budget strong{display:block;margin:5px 0;font-size:1.85rem;color:#63e6b6}.parent-piggy-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}.parent-piggy-form-card,.parent-piggy-side-card{background:linear-gradient(180deg,rgba(28,33,58,.98),rgba(17,21,39,.98));border-color:rgba(125,138,255,.18)}.parent-child-piggy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0 22px}.parent-child-piggy-option{position:relative;display:flex;align-items:center;gap:13px;padding:15px;border:1px solid rgba(139,150,190,.22);border-radius:17px;background:rgba(10,14,29,.72);cursor:pointer;transition:.18s ease}.parent-child-piggy-option:hover{border-color:rgba(111,127,255,.55);transform:translateY(-1px)}.parent-child-piggy-option.selected{border-color:#7382ff;background:linear-gradient(135deg,rgba(82,93,204,.3),rgba(24,29,55,.92));box-shadow:0 0 0 1px rgba(115,130,255,.22),0 14px 28px rgba(0,0,0,.18)}.parent-child-piggy-option input{position:absolute;opacity:0;pointer-events:none}.parent-child-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#5967d9,#8d68df);font-weight:800;color:#fff}.parent-child-piggy-option>span:nth-of-type(2){display:grid;gap:3px;min-width:0}.parent-child-piggy-option small{color:var(--muted)}.parent-child-piggy-option b{margin-left:auto;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:rgba(115,130,255,.12);color:transparent}.parent-child-piggy-option.selected b{background:#7281ff;color:#fff}.parent-piggy-fields{margin-top:6px}.parent-piggy-rule{display:flex;gap:12px;align-items:flex-start;margin-top:18px;padding:15px;border:1px solid rgba(89,179,255,.22);border-radius:16px;background:rgba(29,72,112,.18)}.parent-piggy-rule>span{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:#3688d8;color:white;font-weight:800}.parent-piggy-rule p{margin:0;color:var(--muted)}.parent-piggy-actions{margin-top:20px}.parent-piggy-side-card h3{margin-top:5px}.parent-piggy-list{display:grid;gap:10px;margin-top:16px}.parent-piggy-list a{display:flex;justify-content:space-between;gap:12px;padding:13px 14px;border:1px solid rgba(139,150,190,.18);border-radius:14px;background:rgba(8,12,25,.55);color:inherit;text-decoration:none}.parent-piggy-list a:hover{border-color:rgba(115,130,255,.55)}.parent-piggy-list strong{color:#65dfb0}
@media(max-width:980px){.parent-piggy-layout{grid-template-columns:1fr}.parent-piggy-side-card{order:-1}.parent-piggy-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.parent-piggy-hero{align-items:stretch;flex-direction:column;padding:20px}.parent-piggy-budget{min-width:0}.parent-child-piggy-grid,.parent-piggy-list{grid-template-columns:1fr}.parent-piggy-actions{display:grid}.parent-piggy-actions .btn{width:100%;justify-content:center}}

/* V0.10.7 — porównanie wydatków na dzieci w panelu administratora */
.child-expense-comparison-card {
    margin: 22px 0;
    padding: 24px;
    border-color: rgba(118, 132, 255, .17);
    background:
        radial-gradient(circle at 88% 0, rgba(87, 75, 212, .13), transparent 34%),
        linear-gradient(145deg, rgba(16, 25, 45, .97), rgba(10, 18, 34, .98));
    box-shadow: 0 22px 48px rgba(1, 6, 18, .24);
}
.child-expense-heading { align-items: flex-start; gap: 20px; }
.child-expense-heading h2 { margin-bottom: 6px; }
.child-expense-heading p { max-width: 760px; margin: 0; color: #8f9db2; line-height: 1.55; }
.child-expense-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 18px;
}
.child-expense-summary-grid > div {
    display: grid;
    gap: 7px;
    min-height: 88px;
    padding: 16px 17px;
    border: 1px solid rgba(126, 145, 190, .14);
    border-radius: 15px;
    background: rgba(4, 12, 25, .48);
}
.child-expense-summary-grid span { color: #8796ad; font-size: 12px; font-weight: 700; }
.child-expense-summary-grid strong { color: #f4f7ff; font-size: 21px; }
.child-expense-comparison-list { display: grid; gap: 10px; }
.child-expense-comparison-row {
    display: grid;
    grid-template-columns: minmax(220px, .85fr) minmax(260px, 1.45fr) minmax(150px, .55fr);
    align-items: center;
    gap: 20px;
    padding: 15px 16px;
    border: 1px solid rgba(122, 143, 184, .12);
    border-radius: 15px;
    background: linear-gradient(120deg, rgba(255,255,255,.025), rgba(255,255,255,.012));
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.child-expense-comparison-row:hover {
    transform: translateY(-1px);
    border-color: rgba(118, 132, 255, .3);
    background: linear-gradient(120deg, rgba(91, 100, 226, .07), rgba(255,255,255,.018));
}
.child-expense-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.child-expense-person .mini-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(58, 68, 185, .24);
}
.child-expense-person > div { display: grid; gap: 4px; min-width: 0; }
.child-expense-person strong { overflow: hidden; color: #f4f7ff; text-overflow: ellipsis; white-space: nowrap; }
.child-expense-person small { color: #8493aa; font-size: 11px; line-height: 1.35; }
.child-expense-bars { display: grid; gap: 7px; }
.child-expense-bar {
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: rgba(107, 126, 168, .12);
    box-shadow: inset 0 0 0 1px rgba(135, 153, 198, .06);
}
.child-expense-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5b68e9, #8b63e8 62%, #bb74e9);
    box-shadow: 0 0 18px rgba(114, 101, 236, .35);
}
.child-expense-previous { color: #74839a; font-size: 11px; }
.child-expense-value { display: grid; justify-items: end; gap: 7px; text-align: right; }
.child-expense-value > strong { color: #f7f9ff; font-size: 18px; }
.child-expense-trend {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}
.child-expense-trend.trend-up { color: #ffb989; background: rgba(226, 119, 62, .12); }
.child-expense-trend.trend-down { color: #77dfb0; background: rgba(53, 185, 123, .12); }
.child-expense-trend.trend-flat { color: #a8b4c8; background: rgba(130, 145, 174, .12); }

@media (max-width: 1050px) {
    .child-expense-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .child-expense-comparison-row { grid-template-columns: minmax(190px, .8fr) minmax(220px, 1.2fr) minmax(130px, .5fr); gap: 14px; }
}
@media (max-width: 760px) {
    .child-expense-comparison-card { padding: 18px; }
    .child-expense-heading { display: grid; }
    .child-expense-summary-grid { grid-template-columns: 1fr 1fr; }
    .child-expense-comparison-row { grid-template-columns: 1fr; gap: 12px; }
    .child-expense-value { grid-template-columns: auto auto; align-items: center; justify-content: space-between; justify-items: initial; text-align: left; }
}
@media (max-width: 430px) {
    .child-expense-summary-grid { grid-template-columns: 1fr; }
}
