/* v30.6 — finesse pass: subtler depth, cleaner typography, safer stat cards. */
body.dark .panel,body.dark .card,body.dark .stats-grid article,body.dark .report-grid article{
  border-color:#2b3e56!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.018),0 8px 20px rgba(0,0,0,.16)!important;
}
body.dark .panel{padding:16px!important;border-radius:20px!important}

/* Stat cards: smaller icon tile, more breathing room, no amount wrapping. */
body.dark .stats-grid article,body.dark .report-grid article{
  min-height:102px!important;
  padding:16px 14px 15px 62px!important;
  border-radius:20px!important;
}
body.dark .stats-grid article::before,body.dark .report-grid article::before{
  left:14px!important;width:38px!important;height:38px!important;border-radius:12px!important;
  font-size:20px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 5px 12px rgba(0,0,0,.18)!important;
}
body.dark .stats-grid article:nth-child(1)::before{content:'↗'!important;background:linear-gradient(145deg,#0d6f4d,#10513b)!important;color:#2ff0a5!important}
body.dark .stats-grid article:nth-child(2)::before{content:'−'!important;background:linear-gradient(145deg,#235a9c,#183d6d)!important;color:#63b1ff!important}
body.dark .stats-grid article:nth-child(3)::before{content:'●'!important;background:linear-gradient(145deg,#735d19,#493e1d)!important;color:#ffd65c!important}
body.dark .stats-grid article:nth-child(4)::before{content:'▥'!important;background:linear-gradient(145deg,#51358a,#38265d)!important;color:#c77cff!important}
body.dark .stats-grid span,body.dark .report-grid span{font-size:12.5px!important;line-height:1.65!important}
body.dark .stats-grid b,body.dark .report-grid b{font-size:17px!important;line-height:1.55!important;white-space:nowrap!important;letter-spacing:-.25px!important}

/* Hero: elegant, not oversized. */
body.dark .hero-card{padding:22px 22px!important;border-radius:24px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 12px 28px rgba(1,94,61,.18)!important}
body.dark .hero-card::before{width:60px!important;height:60px!important;border-radius:18px!important;font-size:30px!important;left:20px!important;opacity:.9}
body.dark .hero-card>span,body.dark .hero-card>strong,body.dark .hero-card>small{margin-left:74px!important}
body.dark .hero-card strong{font-size:31px!important;line-height:1.35!important}

/* Section hierarchy */
#home .panel .section-title h2{font-size:21px!important;letter-spacing:-.35px!important}
#homeTasksNotes .tn-tabs{gap:10px!important;margin:8px 0 14px!important}
#homeTasksNotes .tn-tabs button{min-height:48px!important;border-radius:15px!important;font-size:15px!important}

/* Reduce toy-like extrusion on every raised button. */
body.dark .primary,#addAccountBtn,#addAssetBtn,#addCommitmentBtn,
#homeTasksNotes .tn-tabs button,.quick,.secondary,.section-title button,.settings-list button,.file-label,
body.dark .icon-btn,.bottom-nav .fab{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 2px 0 rgba(0,0,0,.38),0 7px 15px rgba(0,0,0,.15)!important;
}
#homeTasksNotes .tn-tabs button:first-child{box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 2px 0 #0751b8,0 8px 16px rgba(8,104,239,.20)!important}
#homeTasksNotes .tn-tabs button:nth-child(2){box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 2px 0 #4927b5,0 8px 16px rgba(97,55,228,.19)!important}

/* Task cards: calmer and better aligned. */
#homeTasksNotes .tn-row{min-height:84px!important;padding:13px 14px!important;border-radius:16px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.018),0 5px 14px rgba(0,0,0,.10)!important}
#homeTasksNotes .tn-main b{font-size:17px!important;line-height:1.55!important}
#homeTasksNotes .tn-main small{font-size:12.5px!important;line-height:1.6!important}
#homeTasksNotes .tn-list .tn-row .tn-check{min-width:92px!important;max-width:100px!important;height:40px!important;border-radius:14px!important;padding:0 11px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 2px 0 #057448,0 7px 14px rgba(2,160,91,.18)!important}
#homeTasksNotes .tn-list .tn-row .tn-check::before{width:20px!important;height:20px!important;font-size:13px!important;margin-left:5px!important}
#homeTasksNotes .tn-list .tn-row .tn-check::after{font-size:12.5px!important}
#homeTasksNotes .tn-all{min-height:44px!important;border-radius:14px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 2px 0 #0e1825,0 7px 14px rgba(0,0,0,.12)!important}

/* Inputs and dialogs: quieter, premium. */
body.dark input,body.dark select,body.dark textarea{box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;border-color:#30445c!important}
body.dark dialog{border-radius:20px!important;box-shadow:0 24px 60px rgba(0,0,0,.42)!important}

/* Top controls and nav should feel light, not chunky. */
body.dark .icon-btn{box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 0 #0d1725,0 6px 13px rgba(0,0,0,.18)!important}
body.dark .bottom-nav{box-shadow:0 -6px 18px rgba(0,0,0,.16)!important}
body.dark .bottom-nav .fab{box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 3px 0 #0648a9,0 9px 18px rgba(7,94,234,.26)!important}

/* Preserve mobile geometry. */
.app-shell,.page,.panel,.card,.stats-grid,.report-grid,.tn-row,.tn-tabs,.form-grid{max-width:100%;min-width:0}
.page{overflow-x:hidden}
button,input,select,textarea{max-width:100%;box-sizing:border-box}
@media(max-width:390px){
 body.dark .stats-grid article,body.dark .report-grid article{padding-left:56px!important}
 body.dark .stats-grid article::before,body.dark .report-grid article::before{left:10px!important;width:36px!important;height:36px!important}
 body.dark .stats-grid b,body.dark .report-grid b{font-size:16px!important}
 #homeTasksNotes .tn-list .tn-row .tn-check{min-width:84px!important}
}
