/* Forest glass — all effects local, no image/font downloads. */
html,html[data-theme=light]{
 --ink:#0b2b26;--muted:#365e50;--line:rgba(35,83,71,.2);
 --glass:rgba(247,255,249,.76);--glass-inner:rgba(255,255,255,.42);
 --edge:rgba(255,255,255,.88);--shadow:0 14px 38px #16383212;
 --field:rgba(255,255,255,.84);--nav-width:248px;
}
html[data-theme=dark]{
 --ink:#daf1de;--muted:#a8cbbb;--line:rgba(142,182,155,.24);
 --glass:rgba(11,43,38,.86);--glass-inner:rgba(35,83,71,.38);
 --edge:rgba(218,241,222,.26);--shadow:0 16px 40px #0003;
 --field:rgba(5,31,32,.78);
}
html body{
 background:radial-gradient(ellipse at 5% 8%,#daf1de 0,transparent 48%),
 radial-gradient(ellipse at 95% 30%,#8eb69b99 0,transparent 45%),
 radial-gradient(ellipse at 35% 95%,#c4e8dc 0,transparent 55%),#e9f1e9;
 color:var(--ink);min-height:100dvh;
}
html[data-theme=dark] body{
 background:radial-gradient(ellipse at 0 0,#235347 0,transparent 48%),
 radial-gradient(ellipse at 95% 30%,#163832 0,transparent 50%),
 radial-gradient(ellipse at 20% 95%,#0b3938 0,transparent 50%),#051f20;
}
html body :is(a,.text-button,.tile-open){color:#235347}
html[data-theme=dark] body :is(a,.text-button,.tile-open){color:#bde3c8}
html body :is(.brand,.box-tile,.module-grid a,.secondary){color:var(--ink)}
html body :is(.panel,.auth,.box-tile,.responsible-group,.cards article:not(.balance),.topbar,.site-navigation,.entry-dialog){
 background:linear-gradient(135deg,var(--glass-inner),transparent 65%),var(--glass);
 border:1px solid var(--edge);border-radius:24px;
 box-shadow:inset 0 1px 0 var(--edge),var(--shadow);
 backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}
html body :is(.family-card,.member-card,.module-grid a,.task-families .family-card){
 background:var(--glass-inner);border:1px solid var(--line);border-radius:18px;
}
html body :is(input,select,textarea){background:var(--field);border:1px solid var(--line);color:var(--ink);border-radius:12px}
html body :is(.secondary,.admin-strip a,.close){background:var(--glass-inner);border:1px solid var(--line);color:var(--ink);border-radius:12px}
html body :is(.primary,.primary:hover){
 background:linear-gradient(120deg,#235347,#0b2b26);color:#daf1de;border:1px solid #235347;border-radius:14px;
 box-shadow:inset 0 1px 0 #daf1de33,0 6px 18px #0b2b261a;
}
html[data-theme=dark] body :is(.primary,.primary:hover){background:linear-gradient(120deg,#daf1de,#8eb69b);color:#051f20;border-color:#8eb69b}
html body .cards .balance{
 background:radial-gradient(ellipse at top right,#8eb69b55,transparent 65%),linear-gradient(135deg,#235347,#051f20);
 border:1px solid #8eb69b88;color:#daf1de;border-radius:24px;box-shadow:var(--shadow);
}
html body .cards .balance small{color:#daf1de}
html body :is(.eyebrow,.entry-title small,.panel-footer,footer){color:var(--muted)}
html body :is(th,.role-badge,.viewer-badge){background:var(--glass-inner);color:var(--ink)}
html body .positive{color:#236448}html[data-theme=dark] body .positive{color:#a3e2b9}
html body :is(.tabs [aria-current=page],.site-menu [aria-current=page]){
 background:#235347;color:#daf1de;border-color:transparent;
}
html body :is(.module-grid a>span){color:inherit}
html body :is(a,button,input,select,textarea):focus-visible{outline:3px solid #599878;outline-offset:4px}
html body .topbar{border-radius:0;border-width:0 0 1px;padding:16px 28px;height:auto;min-height:88px;gap:20px}
html body .account-actions{max-width:none;gap:16px}
html body .topbar .brand{max-width:55%}
html body .brand-icon{background:var(--accent);color:var(--on-accent);box-shadow:0 4px 12px #051f2022}
html body .dashboard{padding:30px clamp(16px,3vw,40px);max-width:1400px}
.page-heading{margin-bottom:24px}
.cards strong{font-variant-numeric:tabular-nums}
.site-navigation{margin:18px 24px;padding:12px;position:relative;z-index:6}
.navigation-tools{display:flex;gap:8px;align-items:center}
.navigation-tools button{font-size:13px;min-height:44px;padding:8px 12px;gap:8px}
.site-menu{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.site-menu[hidden]{display:none!important}
.site-menu a{display:flex;align-items:center;gap:10px;padding:10px 14px;min-height:46px;text-decoration:none;border-radius:12px;font-size:14px;line-height:1.35}
.nav-icon{width:26px;text-align:center;flex-shrink:0;font-size:23px;line-height:1}
.nav-label{overflow-wrap:anywhere}
html body .site-menu a:hover{background:var(--glass-inner);color:var(--ink)}
html body .tabs{border-radius:16px;gap:8px}
html body .tabs a{border-radius:12px}
html body .entry-dialog::backdrop{background:#051f2099;backdrop-filter:blur(4px)}
html body .auth{padding:34px 28px;max-width:520px}
html body progress{accent-color:#235347}html body progress::-webkit-progress-value{background:#235347}
html body progress::-moz-progress-bar{background:#235347}
@media(min-width:901px){
 html[data-nav-position=left] .has-navigation{padding-left:var(--nav-width)}
 html[data-nav-position=left] .site-navigation{position:fixed;left:16px;top:16px;bottom:16px;width:calc(var(--nav-width) - 32px);margin:0;overflow-y:auto;scrollbar-width:thin}
 html[data-nav-position=left] .site-menu{flex-direction:column}
 html[data-nav-position=left] .navigation-tools{flex-direction:column;align-items:stretch}
 html[data-nav-position=left][data-nav-collapsed=true]{--nav-width:110px}
 html[data-nav-position=left][data-nav-collapsed=true] .nav-label,
 html[data-nav-position=left][data-nav-collapsed=true] .nav-toggle-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 html[data-nav-position=left][data-nav-collapsed=true] .site-menu a{padding:10px;justify-content:center}
 html[data-nav-position=left][data-nav-collapsed=true] .nav-position{font-size:11px;padding:8px 2px}
}
@media(max-width:900px){
 html body .topbar{padding:14px 16px;flex-wrap:wrap;gap:10px}
 html body .topbar .brand{max-width:none;flex-basis:60%;font-size:17px}
 html body .account-actions{order:3;flex-basis:100%;justify-content:flex-end;font-size:13px}
 .site-navigation{margin:12px 16px;padding:8px;border-radius:18px!important}
 .navigation-tools{justify-content:space-between}
 html[data-nav-position=left] .site-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .site-menu a{padding:10px;font-size:13px}
 html body .dashboard{padding-top:18px}
 .manage-grid{grid-template-columns:1fr}
 .cards{gap:12px}
 html body .tabs{background:var(--glass);backdrop-filter:blur(16px);border-radius:18px 18px 0 0}
 .module-grid{grid-template-columns:1fr}
 .module-grid a{display:grid;grid-template-columns:30px 1fr;column-gap:12px;padding:14px}
 .module-grid a>span{grid-row:1/3}.module-grid small{grid-column:2}
}
@media(prefers-reduced-motion:no-preference){
 .panel,.box-tile,.auth{animation:glass-in .24s ease-out}
 @keyframes glass-in{from{opacity:.7;transform:translateY(5px)}to{opacity:1;transform:none}}
}
@supports not (backdrop-filter:blur(1px)){
 html body :is(.panel,.auth,.box-tile,.responsible-group,.topbar,.site-navigation,.entry-dialog){background:#e9f3ec}
 html[data-theme=dark] body :is(.panel,.auth,.box-tile,.responsible-group,.topbar,.site-navigation,.entry-dialog){background:#0b2b26}
}
@media print{
 html .has-navigation{padding-left:0!important}
 .site-navigation{display:none!important}
 html body{background:white!important;color:black!important}
 html body :is(.panel,.family-card,.cards article,.responsible-group){backdrop-filter:none;box-shadow:none;background:white!important;color:black!important}
}

/* v9: two navigation rows and a transparent dashboard over sculpted light. */
html,html[data-theme=light]{
 --glass:rgba(245,255,247,.46);--glass-inner:rgba(255,255,255,.21);
 --edge:rgba(255,255,255,.72);--shadow:0 12px 34px #051f2012;
}
html[data-theme=dark]{
 --glass:rgba(21,48,43,.42);--glass-inner:rgba(218,241,222,.07);
 --edge:rgba(218,241,222,.32);--shadow:0 12px 34px #0002;
}
html body{
 background:radial-gradient(ellipse at 14% 14%,#daf1de 0,transparent 42%),
 radial-gradient(ellipse at 90% 20%,#c9d7a8 0,transparent 40%),
 radial-gradient(ellipse at 65% 80%,#69a58e 0,transparent 55%),#8eb69b;
 background-attachment:fixed;isolation:isolate;padding-top:24px;
}
html[data-theme=dark] body{
 background:radial-gradient(ellipse at 12% 5%,#235347 0,transparent 42%),
 radial-gradient(ellipse at 87% 34%,#52613d 0,transparent 44%),
 radial-gradient(ellipse at 38% 85%,#164f49 0,transparent 48%),#051f20;
 background-attachment:fixed;
}
body::before,body::after{
 content:"";position:fixed;pointer-events:none;z-index:-1;
 width:90vw;height:45vh;border-radius:50%;transform:rotate(-28deg);
 border:1px solid #daf1de55;box-shadow:inset 0 22px 42px #daf1de33,0 30px 90px #051f2044;
 background:linear-gradient(155deg,#daf1de66,#8eb69b22 28%,#23534788 58%,#051f2011 75%);
}
body::before{left:-30vw;top:56vh}
body::after{right:-35vw;top:12vh;transform:rotate(-36deg);height:70vh}
.app-shell{
 max-width:1480px;margin:0 auto 24px;width:calc(100% - 48px);
 background:linear-gradient(130deg,#ffffff16,#ffffff04 60%,#daf1de14);
 border:1px solid var(--edge);border-radius:28px;
 box-shadow:0 28px 80px #051f2033;overflow:clip;
}
html body .topbar{
 background:transparent;backdrop-filter:none;box-shadow:none;border:0;
 padding:18px 24px;min-height:88px;gap:12px;
}
html body .topbar .brand{font-size:19px;max-width:34%}
html body .account-actions{gap:6px;flex-wrap:wrap;justify-content:flex-end}
html body .account-actions>a,html body .logout,html body .theme-toggle{
 display:inline-flex;align-items:center;justify-content:center;gap:7px;
 min-height:44px;padding:8px 12px;text-decoration:none;border:1px solid var(--edge);
 background:var(--glass-inner);border-radius:14px;color:var(--ink);font-size:13px;
 box-shadow:inset 0 1px 0 #ffffff22;
}
.profile-avatar{
 display:grid;place-items:center;width:30px;height:30px;border-radius:10px;
 background:linear-gradient(145deg,#daf1de,#8eb69b);color:#051f20;font-weight:700;font-size:17px;
}
html body .site-navigation{
 margin:0 24px 12px;padding:8px 0;background:transparent;border:0;
 box-shadow:none;backdrop-filter:none;border-radius:0;
}
html[data-nav-position=top] .site-navigation{display:flex;gap:14px;align-items:flex-start}
html[data-nav-position=top] .navigation-tools{flex-shrink:0;padding-top:2px}
html[data-nav-position=top] .site-menu{margin:0;flex:1;gap:6px}
html body .site-menu a{
 border:1px solid var(--edge);background:var(--glass-inner);
 border-radius:14px;box-shadow:inset 0 1px 0 #ffffff15;min-height:46px;padding:9px 12px;
}
html body .site-menu [aria-current=page]{
 background:linear-gradient(135deg,#daf1de,#8eb69b);color:#051f20;
 border-color:#daf1de;box-shadow:0 3px 14px #051f2022;
}
.nav-icon{font-size:19px;width:22px}
html body .dashboard{padding:14px 24px 28px;max-width:none}
.page-heading{margin:10px 0 22px}
.page-heading h1{font-size:clamp(25px,2.8vw,36px);font-weight:600}
html body .cards{gap:14px;margin:18px 0}
html body .cards article{
 position:relative;min-height:172px;overflow:hidden;padding:24px;
 border-radius:22px 42px 22px 22px;
 background:linear-gradient(135deg,#daf1de22,transparent 65%),var(--glass);
 border:1px solid var(--edge);box-shadow:inset 0 1px 0 var(--edge),var(--shadow);
 backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
}
html body .cards article::after{
 content:"";position:absolute;right:-26px;bottom:-74px;width:180px;height:160px;
 border:1px solid #8eb69b44;border-radius:50%;transform:rotate(-25deg);
 box-shadow:0 -16px 0 #8eb69b0d,0 -32px 0 #8eb69b09;pointer-events:none;
}
html body .cards .balance{
 background:linear-gradient(125deg,#235347bb,#0b2b2677);
 border-color:#daf1de77;color:#daf1de;
}
.cards .stat-top{position:relative;z-index:1}
html body .stat-icon{border:1px solid var(--edge);background:var(--glass-inner);border-radius:12px;width:40px;height:40px}
html[data-theme=dark] body .green{color:#bce4c8}
html[data-theme=dark] body .orange{color:#efd3ad}
html body .cards strong{font-size:clamp(28px,3vw,42px);position:relative;z-index:1}
html body .cards .balance strong{font-size:clamp(32px,3.4vw,46px)}
html body :is(.panel,.box-tile,.responsible-group){border-radius:20px;background:linear-gradient(130deg,var(--glass-inner),transparent 75%),var(--glass)}
.box-responsible{gap:14px;margin:14px 0 20px}
html body .responsible-group{padding:14px 18px}
.responsible-group ul{display:flex;flex-wrap:wrap;gap:12px 24px}
.responsible-group li strong{font-size:14px}
.responsible-group h2{font-size:13px}
html body .tabs{
 background:var(--glass-inner);padding:6px;border:1px solid var(--edge);
 border-radius:16px;margin-bottom:14px;
}
html body .tabs a{border:1px solid transparent;min-height:44px;padding:8px 16px}
html body .tabs [aria-current=page]{background:var(--glass);border-color:var(--edge);color:var(--ink)}
html body :is(.family-card,.member-card){border-color:var(--edge);background:var(--glass-inner)}
html body .panel-heading{background:var(--glass-inner)}
html body th{background:var(--glass-inner)}
html body .management-menu{font-size:14px}
html body .auth{background:linear-gradient(130deg,var(--glass-inner),transparent),var(--glass);margin:40px auto}
@media(min-width:901px){
 html[data-nav-position=left] .site-navigation{
  background:var(--glass);border:1px solid var(--edge);padding:10px;border-radius:22px;
  margin:0;backdrop-filter:blur(16px);
 }
 html[data-nav-position=left] .app-shell{width:calc(100% - 24px)}
}
@media(max-width:1100px){
 html body .topbar .brand{max-width:none;flex-basis:100%}
 html body .account-actions{flex:1;justify-content:flex-start}
 html[data-nav-position=top] .site-navigation{flex-direction:column;gap:8px}
}
@media(max-width:750px){
 html body{padding-top:8px;background-attachment:scroll}
 .app-shell{width:calc(100% - 16px);border-radius:22px;margin-bottom:88px}
 html body .topbar{padding:14px 12px}
 html body .account-actions{order:0;flex-basis:100%;justify-content:flex-start;gap:5px}
 html body .account-actions>a,html body .logout{font-size:12px;padding:7px 9px}
 html body .theme-toggle{margin:0}
 html body .site-navigation{margin:0 12px 8px}
 html[data-nav-position=top] .site-menu{display:flex;flex-wrap:nowrap;overflow-x:auto;width:100%;padding:3px 1px 9px}
 html[data-nav-position=top] .site-menu a{flex-shrink:0}
 html body .dashboard{padding:8px 12px 20px}
 html body .cards article{padding:18px 14px;min-height:154px;border-radius:18px 32px 18px 18px}
 html body .cards .balance{min-height:170px}
 html body .cards strong{font-size:27px}
 html body .cards .balance strong{font-size:40px}
 html body .cards small{font-size:12px}
 html body .tabs{left:8px;bottom:6px;width:calc(100% - 16px);margin:0;border-radius:18px;height:auto;padding-bottom:calc(6px + env(safe-area-inset-bottom));background:var(--field)}
 html body .tabs a{padding:6px;min-width:0;flex:1;font-size:12px}
 .box-responsible{grid-template-columns:1fr}
 .page-heading .actions{margin-top:16px}
}
@media print{
 body::before,body::after{display:none}
 .app-shell{width:100%!important;margin:0;border:0;box-shadow:none;background:white}
 html body .cards article::after{display:none}
}

/* v9.1: isolated icon bubbles and genuinely transparent cut-outs. */
.stat-card{position:relative;min-width:0;filter:drop-shadow(0 8px 12px #051f2015)}
html body .shaped-cards article{
 height:100%;min-height:166px;padding:22px;border-radius:20px;
 -webkit-mask-image:radial-gradient(circle 47px at 100% 0,transparent 46px,#000 47px);
 mask-image:radial-gradient(circle 47px at 100% 0,transparent 46px,#000 47px);
}
html body .shaped-cards article .stat-top{padding-right:30px}
.card-bubble{
 position:absolute;right:0;top:0;width:35px;height:35px;border-radius:50%;
 display:grid;place-items:center;font-size:21px;line-height:1;color:var(--ink);
 background:var(--glass);border:1px solid var(--edge);
 box-shadow:inset 0 1px 0 var(--edge),0 3px 8px #051f2012;
 backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
}
@media(max-width:750px){
 .shaped-cards .stat-card:first-child{grid-column:1/-1}
 html body .shaped-cards article{padding:20px 14px;min-height:155px}
 html body .shaped-cards .balance{min-height:164px}
 html body .shaped-cards .stat-top{font-size:13px}
}
@media print{
 html body .shaped-cards article{mask-image:none;-webkit-mask-image:none}
}
