:root{
    --bg:#0c0c10;
    --panel:#171720;
    --panel2:#20202b;
    --text:#f3f0e8;
    --muted:#b9b1a0;
    --gold:#d6aa48;
    --gold2:#f0cd74;
    --danger:#b54444;
    --ok:#2f8b57;
    --border:rgba(214,170,72,.25);
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:radial-gradient(circle at top,#24202a 0,#0c0c10 45%,#050507 100%);color:var(--text);min-height:100vh}
a{color:var(--gold2);text-decoration:none} a:hover{text-decoration:underline}
.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;padding:14px 28px;background:rgba(9,9,12,.9);backdrop-filter:blur(8px);border-bottom:1px solid var(--border)}
.brand{display:flex;gap:10px;align-items:center;color:var(--text);font-weight:800;font-size:18px;text-decoration:none}.symbol{color:var(--gold);font-size:26px}.topbar nav{display:flex;gap:14px;flex-wrap:wrap}.topbar nav a{font-size:14px;color:#eee}.topbar .admin-link{background:var(--gold);color:#14100b;padding:6px 10px;border-radius:999px;font-weight:700}
.container{max-width:1180px;margin:0 auto;padding:28px}.card{background:linear-gradient(180deg,rgba(32,32,43,.95),rgba(20,20,28,.96));border:1px solid var(--border);border-radius:18px;padding:22px;box-shadow:0 16px 50px rgba(0,0,0,.24);margin-bottom:20px}.nested{background:rgba(255,255,255,.03);border-radius:14px;padding:16px}.hero{display:flex;justify-content:space-between;align-items:center;gap:20px}.eyebrow{letter-spacing:.16em;text-transform:uppercase;color:var(--gold);font-size:12px;font-weight:700}h1,h2,h3{margin:.2em 0 .5em}p{line-height:1.55}.muted,.hint,small{color:var(--muted)}
.login-card{min-height:70vh;display:grid;grid-template-columns:1.1fr .9fr;gap:26px;align-items:center}.masonic-mark{text-align:center}.big-symbol{font-size:140px;color:var(--gold);line-height:1;text-shadow:0 0 45px rgba(214,170,72,.45)}.form-card{max-width:420px;width:100%;justify-self:center}label{display:flex;flex-direction:column;gap:7px;color:#eee;font-weight:600}input,select,textarea{width:100%;padding:12px 13px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:#0d0d12;color:var(--text);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--gold)}button,.button{display:inline-block;border:0;background:linear-gradient(135deg,var(--gold),var(--gold2));color:#14100b;border-radius:12px;padding:12px 16px;font-weight:800;cursor:pointer}button:hover,.button:hover{filter:brightness(1.08);text-decoration:none}.button.small,button.small{padding:7px 10px;font-size:13px}.danger{background:var(--danger);color:#fff}.stack{display:flex;flex-direction:column;gap:14px}.form-grid{display:flex;flex-direction:column;gap:18px}.form-section{width:100%}.photo-box{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.grid{display:grid;gap:18px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.span2{grid-column:1/-1}.quick-actions{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.action{background:rgba(255,255,255,.06);border:1px solid var(--border);color:var(--text);padding:13px 16px;border-radius:14px;text-decoration:none;font-weight:700}.action.accent{background:var(--gold);color:#14100b}.stat strong{display:block;font-size:36px;color:var(--gold2)}.stat span{color:var(--muted)}
.avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;border:1px solid var(--border);display:inline-flex;align-items:center;justify-content:center}.avatar.xl{width:92px;height:92px;font-size:42px}.placeholder{background:#0e0e13;color:var(--gold)}.person-row,.item-row,.session-row{display:flex;justify-content:space-between;gap:16px;align-items:center;border-bottom:1px solid rgba(255,255,255,.08);padding:13px 0}.person-row{justify-content:flex-start}.list .item-row:last-child,.list .session-row:last-child{border-bottom:0}.position-grid,.degree-grid,.work-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}.position-card,.degree-card{display:block;border:1px solid var(--border);border-radius:16px;padding:16px;background:rgba(255,255,255,.04);color:var(--text);text-decoration:none}.degree-card strong{display:block;margin:8px 0;font-size:18px}.progress-line{height:8px;background:#0e0e13;border-radius:999px;margin:12px 0;overflow:hidden}.progress-line span{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--gold2))}.work-card form{margin-top:14px;display:flex;flex-direction:column;gap:10px}.work-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.badge{display:inline-block;padding:4px 9px;border-radius:999px;background:rgba(255,255,255,.08);font-size:12px;color:var(--muted)}.badge.required{background:rgba(214,170,72,.18);color:var(--gold2)}.badge.optional{background:rgba(80,130,190,.20);color:#c6dcff}.status{font-weight:800;color:var(--gold2)}.feedback{border-left:3px solid var(--gold);padding-left:10px;color:#eee}.degree-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:9px;margin-top:14px}.check-line{display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:500;color:#eee}.check-line input{width:auto}.tabs{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 18px}.tab{border:1px solid var(--border);border-radius:999px;padding:8px 12px;color:#eee}.tab.active{background:var(--gold);color:#14100b;font-weight:800}.inline-form{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.review-form{margin-top:14px}.compact-form{min-width:270px}table{width:100%;border-collapse:collapse;overflow:hidden;border-radius:12px}th,td{text-align:left;padding:12px;border-bottom:1px solid rgba(255,255,255,.08)}th{color:var(--gold2);font-size:13px;text-transform:uppercase;letter-spacing:.05em}.actions{display:flex;gap:10px;flex-wrap:wrap}.messages{margin-bottom:16px}.flash{padding:12px 14px;border-radius:12px;margin-bottom:10px;border:1px solid rgba(255,255,255,.12)}.flash.success{background:rgba(47,139,87,.18)}.flash.error{background:rgba(181,68,68,.18)}
@media(max-width:800px){.topbar{align-items:flex-start;flex-direction:column}.login-card,.grid.two,.grid.three{grid-template-columns:1fr}.container{padding:18px}.hero{align-items:flex-start;flex-direction:column}.session-row,.item-row{align-items:flex-start;flex-direction:column}.big-symbol{font-size:92px}}

/* Melhorias visuais v3 */
body::before{content:"";position:fixed;inset:0;background:url('/static/logo_app.png') center 120px/520px no-repeat;opacity:.055;pointer-events:none;z-index:-1}.topbar{background:linear-gradient(90deg,#07162f,#0b2447,#07162f);box-shadow:0 8px 28px rgba(0,0,0,.22)}.brand img{width:42px;height:42px;border-radius:50%;object-fit:cover;margin-right:10px}.hero-logo{width:150px;height:150px;border-radius:50%;object-fit:cover;box-shadow:0 14px 34px rgba(0,0,0,.25)}.app-hero{background:linear-gradient(135deg,rgba(8,29,61,.96),rgba(12,45,82,.9));color:#fff;overflow:hidden;position:relative}.app-hero:after{content:"";position:absolute;right:-90px;bottom:-120px;width:360px;height:360px;background:url('/static/logo_app.png') center/cover no-repeat;opacity:.13}.contact{display:inline-block;padding:9px 13px;border-radius:999px;background:rgba(255,215,98,.16);border:1px solid rgba(255,215,98,.45)}.quick-actions.icons .action{display:flex;gap:10px;align-items:center;justify-content:center;min-height:62px;font-weight:800}.quick-actions.icons .action span{font-size:24px}.member-card{max-width:720px;margin:20px auto;padding:28px;border-radius:28px;background:linear-gradient(135deg,#061530,#0b2b52);color:#fff;border:4px solid #d8aa35;display:flex;gap:24px;align-items:center;box-shadow:0 22px 45px rgba(0,0,0,.28)}.member-card img{width:150px;height:150px;border-radius:50%;object-fit:cover;border:3px solid #d8aa35}.badge{display:inline-block;padding:6px 10px;border-radius:999px;font-weight:800}.badge.ok{background:#0b7a3b;color:white}.badge.bad{background:#b42318;color:white}.book-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.book-card{border:1px solid #e2e8f0;border-radius:18px;padding:18px;background:#fff}.danger{background:#b42318!important;color:#fff!important}.table-wrap{overflow:auto}@media print{.topbar,.container>section.card button{display:none}.container{max-width:none}.member-card{box-shadow:none}}
.danger-action{background:#7b1111!important;border-color:#ff6b6b!important;color:#fff!important;box-shadow:0 0 0 2px rgba(255,0,0,.18)}
.danger-action small{display:block;font-size:.72rem;color:#ffe1e1;margin-top:4px}.notifications-card{border:1px solid rgba(218,165,32,.35)}
.ready{border-left:4px solid #34c759;padding-left:12px}.degree-date-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.degree-date-line input[type=date]{max-width:180px}.card-photo{width:132px;height:132px;border-radius:16px;object-fit:cover;border:2px solid rgba(218,165,32,.7)}.simple-card{align-items:center}.card-photo.placeholder{display:flex;align-items:center;justify-content:center;font-size:48px;background:rgba(255,255,255,.08)}
.progress-box{margin:18px 0;padding:16px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.04)}
.progress-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.progress-top span{font-weight:900;color:#34c759}
.progress-bar{height:16px;background:#10141a;border-radius:999px;overflow:hidden;border:1px solid rgba(255,255,255,.10)}
.progress-bar span{display:block;height:100%;background:linear-gradient(90deg,#b6862e,#d6aa48,#34c759);border-radius:999px;transition:width .3s ease}
.history-degree{border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:16px;margin:14px 0;background:rgba(255,255,255,.035)}
.history-degree h3{color:var(--gold2);margin-top:0}.history-degree h4{margin-bottom:6px}.history-list{margin-top:6px;padding-left:20px}.history-list li{margin:6px 0}.muted{color:var(--muted)}
@media print{.topbar,button{display:none}.card{box-shadow:none;border:1px solid #ddd}.history-degree{break-inside:avoid}}


/* Ajustes v6 */
.search-form input{max-width:420px}.status-pill{display:inline-block;padding:5px 9px;border-radius:999px;font-weight:800;font-size:12px}.status-ok{background:#167a3d!important;color:#fff!important}.status-pending{background:#1769aa!important;color:#fff!important}.status-bad{background:#b42318!important;color:#fff!important}.status-ok-box{border-color:rgba(22,122,61,.75)!important}.status-pending-box{border-color:rgba(23,105,170,.8)!important}.status-bad-box{border-color:rgba(180,35,24,.85)!important}.status-dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:8px;vertical-align:middle}.dot-green{background:#16a34a}.dot-blue{background:#1d72b8}.dot-red{background:#dc2626}.treasury-stats{margin-top:18px}.treasury-circle{width:220px;height:220px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;margin:auto;background:radial-gradient(circle,#183f2a,#0d2117);border:5px solid #16a34a;box-shadow:0 0 30px rgba(22,163,74,.25)}.treasury-circle strong{font-size:28px;color:#fff}.treasury-circle span{color:#d9f8e5}.danger-circle{background:radial-gradient(circle,#4a1717,#220909);border-color:#dc2626}.danger-circle span{color:#ffe1e1}details summary{cursor:pointer;color:var(--gold2);font-weight:800}.table-wrap{overflow:auto}

/* Ajustes v8 */
.stat-link,.panel-link{display:block;text-decoration:none;color:var(--text)}
.stat-link:hover,.panel-link:hover{transform:translateY(-1px);border-color:rgba(214,170,72,.5)}
.announcements-card{border-color:rgba(214,170,72,.45);background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(214,170,72,.06))}.admin-announce-box{margin-top:14px}.admin-click-stats .stat{text-align:center}.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.doc-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.doc-links a{padding:8px 10px;border-radius:999px;background:rgba(214,170,72,.13);border:1px solid rgba(214,170,72,.35)}
.month-calendar{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin:16px 0}.month-tile{display:block;text-align:center;text-decoration:none;color:var(--text);padding:12px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.045);font-weight:800}.month-tile.active{background:linear-gradient(135deg,var(--gold),var(--gold2));color:#14100b}.treasury-year-nav{display:flex;align-items:center;gap:12px;justify-content:center;flex-wrap:wrap}.active-circle{background:radial-gradient(circle,#102f53,#081827);border-color:#1d72b8}.active-circle span{color:#d8ecff}.payment-months{display:flex;gap:6px;flex-wrap:wrap}.progress-bar.mini{height:10px;margin:8px 0}.candidate-pay-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:18px}.candidate-pay-card{border:1px solid var(--border);border-radius:16px;padding:14px;background:rgba(255,255,255,.04)}.dual-progress{height:16px;background:#10141a;border-radius:999px;overflow:hidden;display:flex;border:1px solid rgba(255,255,255,.12);margin:10px 0}.dual-progress .paid{display:block;background:#16a34a;height:100%}.dual-progress .missing{display:block;background:#b42318;height:100%}.candidate-calendar{display:grid;grid-template-columns:repeat(7,minmax(70px,1fr));gap:8px}.calendar-day{min-height:74px;border:1px solid var(--border);border-radius:12px;padding:8px;background:rgba(255,255,255,.035)}.calendar-day.has-payment{border-color:#16a34a;background:rgba(22,163,74,.14)}.calendar-day small{display:block;margin-top:4px;color:#fff}.candidate-pay-card .progress-top{font-size:12px;margin-top:6px}.card.nested{background:rgba(255,255,255,.035)}
@media(max-width:800px){.candidate-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}.treasury-circle{width:180px;height:180px}.section-title-row{align-items:flex-start}}

/* Ajustes v9 */
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.orange-circle{background:radial-gradient(circle,#6b3a08,#2b1603);border-color:#f59e0b}.orange-circle span{color:#ffe6b8}.orange-circle strong{font-size:24px}.whatsapp-link{color:#d9ffe5;text-decoration:none}.whatsapp-link:hover{text-decoration:underline}.finance-calendar .calendar-day.has-payment{background:rgba(255,255,255,.04);border-color:rgba(214,170,72,.35)}.calendar-day.multi-payment{border-width:2px;box-shadow:inset 0 0 0 2px rgba(255,255,255,.06)}.calendar-entry{display:block;margin-top:6px;border-radius:10px;padding:6px;border:1px solid rgba(255,255,255,.12)}.calendar-entry summary{list-style:none;font-size:12px;line-height:1.25}.calendar-entry summary::-webkit-details-marker{display:none}.calendar-paid{background:rgba(22,163,74,.18);border-color:#16a34a}.calendar-pending{background:rgba(180,35,24,.20);border-color:#dc2626}.calendar-extra{background:rgba(245,158,11,.20);border-color:#f59e0b}.calendar-edit{margin-top:8px;min-width:220px}.calendar-edit input,.calendar-edit select{padding:8px;border-radius:8px}.finance-calendar{grid-template-columns:repeat(7,minmax(120px,1fr))}.candidate-pay-card .dual-progress,.table-wrap .dual-progress{min-width:140px}.status-pill.status-bad{background:#b42318!important}.status-pill.status-ok{background:#167a3d!important}.compact-form{padding-top:8px}
@media(max-width:900px){.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.grid.four{grid-template-columns:1fr}}


/* Ajustes v10 — layout lateral, fundo enviado e calendário financeiro */
body{
    position:relative;
    background:
        radial-gradient(circle at top left,rgba(214,170,72,.10),transparent 30%),
        radial-gradient(circle at bottom right,rgba(5,21,45,.78),transparent 42%),
        linear-gradient(135deg,#07080d,#111723 42%,#050507);
}
body::before{
    content:"";
    position:fixed;
    inset:0;
    background:url('/static/bg_masonic.png') center 90px/520px no-repeat;
    opacity:.115;
    pointer-events:none;
    z-index:-1;
    filter:drop-shadow(0 18px 60px rgba(0,0,0,.55));
}
body.with-sidebar{display:flex;align-items:stretch}
.sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:282px;
    padding:22px 18px;
    background:linear-gradient(180deg,rgba(5,15,32,.98),rgba(7,8,13,.98));
    border-right:1px solid rgba(214,170,72,.28);
    box-shadow:18px 0 50px rgba(0,0,0,.35);
    overflow-y:auto;
    z-index:20;
}
.side-brand{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    color:var(--text);
    text-align:center;
    text-decoration:none;
    padding:8px 8px 18px;
    border-bottom:1px solid rgba(214,170,72,.22);
    margin-bottom:14px;
}
.side-brand img{
    width:92px;
    height:92px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid var(--gold);
    box-shadow:0 14px 30px rgba(0,0,0,.35);
}
.side-brand span{font-weight:900;line-height:1.15;font-size:16px}
.side-brand small{color:var(--gold2);letter-spacing:.08em}
.side-nav{display:flex;flex-direction:column;gap:7px}
.side-nav a{
    display:flex;
    align-items:center;
    gap:10px;
    color:#f4efe3;
    padding:11px 12px;
    border-radius:14px;
    background:rgba(255,255,255,.035);
    border:1px solid transparent;
    font-weight:750;
}
.side-nav a:hover{
    text-decoration:none;
    background:rgba(214,170,72,.11);
    border-color:rgba(214,170,72,.26);
}
.side-nav .admin-link{
    background:linear-gradient(135deg,var(--gold),var(--gold2));
    color:#140f08;
    box-shadow:0 10px 22px rgba(214,170,72,.13);
}
.side-section{
    margin:14px 4px 4px;
    color:var(--gold2);
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.14em;
    font-weight:900;
}
.page-shell{
    min-height:100vh;
    width:100%;
    margin-left:282px;
    display:flex;
    flex-direction:column;
}
.app-header{
    position:sticky;
    top:0;
    z-index:15;
    min-height:76px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:16px 28px;
    background:linear-gradient(90deg,rgba(9,20,42,.95),rgba(13,36,68,.93),rgba(9,20,42,.95));
    border-bottom:1px solid rgba(214,170,72,.24);
    backdrop-filter:blur(10px);
    box-shadow:0 10px 28px rgba(0,0,0,.22);
}
.app-header strong{font-size:17px;color:#fff}
.header-user{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:2px;
    padding:9px 12px;
    border-radius:14px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(214,170,72,.20);
}
.header-user small{color:var(--gold2);font-weight:800}
.page-shell .container{width:100%;flex:1}
.app-footer{
    margin:18px 28px 22px;
    padding:18px 20px;
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:center;
    border:1px solid rgba(214,170,72,.22);
    border-radius:18px;
    background:rgba(8,10,16,.72);
    color:var(--muted);
    box-shadow:0 16px 38px rgba(0,0,0,.18);
}
.app-footer strong{color:#fff}
.app-footer a{font-weight:800}
.public-footer{max-width:1180px;margin:18px auto 24px}
.public-topbar .brand img{width:48px;height:48px;border-radius:50%;object-fit:cover}
.whatsapp-link{
    display:inline-flex;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    padding:10px 14px;
    border-radius:999px;
    background:rgba(37,211,102,.12);
    border:1px solid rgba(37,211,102,.38);
    color:#eaffef;
    font-weight:800;
}
.whatsapp-link em{
    font-style:normal;
    color:#fff;
    background:#25D366;
    padding:5px 9px;
    border-radius:999px;
}
.wa-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    border-radius:50%;
    background:#25D366;
    color:#07110b;
    font-weight:900;
}
.app-hero{
    background:
        linear-gradient(135deg,rgba(6,24,55,.96),rgba(14,38,68,.92)),
        url('/static/bg_masonic.png') right 22px center/210px no-repeat;
}
.app-hero:after{background:url('/static/bg_masonic.png') center/cover no-repeat}
.hero-logo{border:2px solid var(--gold)}
.finance-calendar .calendar-day.has-payment{
    background:rgba(255,255,255,.045);
    border-color:rgba(214,170,72,.32);
}
.calendar-day.multi-payment{
    border-width:2px;
    box-shadow:inset 0 0 0 2px rgba(214,170,72,.12), 0 10px 24px rgba(0,0,0,.18);
}
.calendar-entry{
    display:block;
    margin-top:7px;
    border-radius:12px;
    padding:7px;
    border:1px solid rgba(255,255,255,.12);
    cursor:pointer;
}
.calendar-entry summary{
    list-style:none;
    font-size:12px;
    line-height:1.25;
    cursor:pointer;
}
.calendar-entry summary::-webkit-details-marker{display:none}
.calendar-paid{
    background:rgba(22,163,74,.24)!important;
    border-color:#22c55e!important;
    box-shadow:inset 0 0 0 1px rgba(34,197,94,.15);
}
.calendar-pending{
    background:rgba(245,158,11,.24)!important;
    border-color:#f59e0b!important;
    box-shadow:inset 0 0 0 1px rgba(245,158,11,.16);
}
.calendar-extra{
    background:rgba(245,158,11,.24)!important;
    border-color:#f59e0b!important;
}
.calendar-entry small{color:#fff}
.status-pill.status-bad{
    background:#f59e0b!important;
    color:#161006!important;
}
.status-pill.status-ok{
    background:#167a3d!important;
    color:#fff!important;
}
@media(max-width:980px){
    body.with-sidebar{display:block}
    .sidebar{position:relative;width:auto;inset:auto;border-right:0;border-bottom:1px solid rgba(214,170,72,.24)}
    .side-brand{flex-direction:row;text-align:left;justify-content:center}
    .side-brand img{width:64px;height:64px}
    .side-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
    .side-section{grid-column:1/-1}
    .page-shell{margin-left:0}
    .app-header{position:relative;align-items:flex-start;flex-direction:column}
    .header-user{align-items:flex-start}
    .app-footer{flex-direction:column;align-items:flex-start;margin:16px 18px}
}
@media(max-width:560px){
    .side-nav{grid-template-columns:1fr}
    .app-hero{background:linear-gradient(135deg,rgba(6,24,55,.96),rgba(14,38,68,.92))}
}

/* Ajustes v11 — configurações e status financeiro */
.settings-form .large-textarea{
    min-height:320px;
    width:100%;
    resize:vertical;
    line-height:1.55;
}
.settings-logo-preview{
    display:flex;
    align-items:center;
    gap:16px;
    padding:16px;
    border:1px solid rgba(214,170,72,.28);
    border-radius:18px;
    background:rgba(255,255,255,.04);
}
.settings-logo-preview img{
    width:96px;
    height:96px;
    object-fit:cover;
    border-radius:50%;
    border:2px solid var(--gold);
    box-shadow:0 12px 26px rgba(0,0,0,.28);
}
.settings-logo-preview small{display:block;color:var(--muted);margin-top:4px}
.legal-text{
    white-space:pre-wrap;
    line-height:1.7;
    color:var(--text);
}
.status-pill.status-bad,
.payment-months .status-bad{
    background:#b42318!important;
    color:#fff!important;
}

/* Ajustes v12 — acesso, exclusão de membros e modo dia/noite */
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.theme-toggle{
    border:1px solid rgba(214,170,72,.34);
    background:rgba(255,255,255,.07);
    color:var(--gold2);
    border-radius:999px;
    padding:9px 13px;
    min-width:96px;
    box-shadow:0 10px 22px rgba(0,0,0,.12);
}
.theme-toggle:hover{filter:brightness(1.08);background:rgba(214,170,72,.14)}
.access-alert{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    margin:18px 0 4px;
    padding:16px;
    border-radius:20px;
    border:1px solid rgba(37,211,102,.42);
    background:linear-gradient(135deg,rgba(37,211,102,.13),rgba(214,170,72,.10));
    box-shadow:0 18px 42px rgba(0,0,0,.18);
}
.access-alert strong{color:#fff;line-height:1.35}
.public-access-alert{margin:0 0 18px;align-items:flex-start;flex-direction:column}
.actions form{margin:0}.actions .danger.small{padding:7px 10px;font-size:13px;border-radius:10px}
.membership-only-card .member-card{margin-bottom:0}.membership-only-card{max-width:860px;margin-left:auto;margin-right:auto}
.photo-box label{min-width:min(360px,100%)}

html[data-theme="light"]{
    --bg:#f4efe4;
    --panel:#fffaf1;
    --panel2:#f3ead8;
    --text:#1a1712;
    --muted:#675d4c;
    --gold:#9f7124;
    --gold2:#6f4c16;
    --danger:#a02f2f;
    --ok:#187044;
    --border:rgba(127,88,26,.25);
}
html[data-theme="light"] body{
    background:
        radial-gradient(circle at top left,rgba(159,113,36,.18),transparent 30%),
        radial-gradient(circle at bottom right,rgba(255,255,255,.92),transparent 45%),
        linear-gradient(135deg,#f7f1e6,#ede1cf 52%,#fffaf1);
    color:var(--text);
}
html[data-theme="light"] body::before{opacity:.075;filter:none}
html[data-theme="light"] .card,
html[data-theme="light"] .nested,
html[data-theme="light"] .history-degree,
html[data-theme="light"] .candidate-pay-card,
html[data-theme="light"] .calendar-day,
html[data-theme="light"] .book-card{
    background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,240,226,.96));
    color:var(--text);
    border-color:var(--border);
    box-shadow:0 18px 42px rgba(80,58,24,.12);
}
html[data-theme="light"] .sidebar{
    background:linear-gradient(180deg,rgba(248,240,226,.98),rgba(235,222,201,.98));
    border-right-color:rgba(127,88,26,.24);
}
html[data-theme="light"] .side-nav a{
    color:#1a1712;
    background:rgba(127,88,26,.06);
}
html[data-theme="light"] .side-nav a:hover{background:rgba(159,113,36,.14)}
html[data-theme="light"] .side-brand{color:#1a1712;border-bottom-color:rgba(127,88,26,.22)}
html[data-theme="light"] .app-header,
html[data-theme="light"] .topbar{
    background:linear-gradient(90deg,rgba(244,233,211,.96),rgba(255,250,241,.96),rgba(244,233,211,.96));
    border-bottom-color:rgba(127,88,26,.24);
}
html[data-theme="light"] .app-header strong,
html[data-theme="light"] .app-footer strong,
html[data-theme="light"] .access-alert strong{color:#1a1712}
html[data-theme="light"] .header-user,
html[data-theme="light"] .app-footer{
    background:rgba(255,255,255,.62);
    border-color:rgba(127,88,26,.22);
    color:var(--text);
}
html[data-theme="light"] .app-hero{
    background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(242,227,199,.91)),url('/static/bg_masonic.png') right 22px center/210px no-repeat;
    color:#1a1712;
}
html[data-theme="light"] .app-hero p,
html[data-theme="light"] .muted,
html[data-theme="light"] .hint,
html[data-theme="light"] small{color:var(--muted)}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
    background:#fffdf8;
    color:#1a1712;
    border-color:rgba(127,88,26,.24);
}
html[data-theme="light"] label{color:#2d261a}
html[data-theme="light"] .action,
html[data-theme="light"] .position-card,
html[data-theme="light"] .degree-card,
html[data-theme="light"] .month-tile{
    background:rgba(255,255,255,.68);
    color:#1a1712;
}
html[data-theme="light"] .whatsapp-link{color:#0b4a24;background:rgba(37,211,102,.16)}
html[data-theme="light"] .placeholder{background:#f4ead7;color:#9f7124}
html[data-theme="light"] .member-card{background:linear-gradient(135deg,#fffaf1,#ead7ad);color:#1a1712;border-color:#9f7124}
html[data-theme="light"] th{color:#6f4c16}html[data-theme="light"] td{border-bottom-color:rgba(127,88,26,.12)}
@media(max-width:980px){.header-actions{align-items:flex-start;justify-content:flex-start}.public-topbar{align-items:center;flex-direction:row}}
@media(max-width:560px){.access-alert,.whatsapp-link{width:100%}.whatsapp-link{justify-content:center}.public-topbar{align-items:flex-start;flex-direction:column}.header-actions{width:100%}.theme-toggle{width:100%}}

/* Atualização v13 — graduação e trabalhos bloqueados */
.status-locked,
.status-locked-box {
    border-color: rgba(179, 136, 72, .55) !important;
}
.status-pill.status-locked,
.locked-note {
    background: rgba(179, 136, 72, .16);
    color: var(--text);
    border: 1px solid rgba(179, 136, 72, .35);
}
.locked-work {
    box-shadow: inset 0 0 0 1px rgba(179, 136, 72, .28), 0 18px 38px rgba(0,0,0,.22);
}
.locked-row td {
    background: rgba(179, 136, 72, .06);
}
.locked-note {
    margin-top: .75rem;
    padding: .7rem .8rem;
    border-radius: 14px;
    font-size: .9rem;
}
.graduation-admin-form select {
    min-width: 240px;
}

/* Atualização v14 — anexos múltiplos e tesouraria recolhível */
.attachment-list{
    margin-top:1rem;
    padding:1rem;
    border-radius:16px;
    border:1px solid rgba(179,136,72,.22);
    background:rgba(255,255,255,.04);
}
.attachment-list h3{margin:.1rem 0 .65rem;font-size:1rem;color:var(--gold)}
.attachment-list a{
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    margin:.25rem .35rem .25rem 0;
    padding:.45rem .7rem;
    border-radius:999px;
    background:rgba(179,136,72,.13);
    border:1px solid rgba(179,136,72,.22);
    color:var(--text);
    text-decoration:none;
}
.attachment-list a:hover{transform:translateY(-1px);background:rgba(179,136,72,.2)}
.collapsible-card{padding:0;overflow:hidden}
.collapsible-card > summary{
    cursor:pointer;
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:1.15rem 1.25rem;
    border-bottom:1px solid rgba(179,136,72,.18);
    color:var(--gold);
    font-family:var(--serif);
    font-size:1.35rem;
}
.collapsible-card > summary::-webkit-details-marker{display:none}
.collapsible-card > summary strong{
    font-family:var(--font);
    font-size:.78rem;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:var(--text);
    padding:.4rem .65rem;
    border-radius:999px;
    border:1px solid rgba(179,136,72,.28);
    background:rgba(179,136,72,.10);
}
.collapsible-card[open] > summary strong::before{content:'− ';}
.collapsible-card:not([open]) > summary strong::before{content:'+ ';}
.collapsible-card > *:not(summary){margin-left:1.25rem;margin-right:1.25rem}
.collapsible-card > .table-wrap,
.collapsible-card > .candidate-calendar,
.collapsible-card > form,
.collapsible-card > p,
.collapsible-card > h3{margin-bottom:1.25rem}
.treasury-sort-row{align-items:flex-start;margin-top:1rem}
.button-row{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}
.button.active,.button.small.active{background:linear-gradient(135deg,var(--gold),var(--gold2));color:#17130d;border-color:transparent}
html[data-theme="light"] .attachment-list{background:rgba(255,255,255,.55);border-color:rgba(127,88,26,.2)}
html[data-theme="light"] .attachment-list a{background:rgba(127,88,26,.08);border-color:rgba(127,88,26,.18);color:#1a1712}
html[data-theme="light"] .collapsible-card > summary{border-bottom-color:rgba(127,88,26,.18)}
html[data-theme="light"] .collapsible-card > summary strong{color:#1a1712;background:rgba(127,88,26,.08);border-color:rgba(127,88,26,.22)}
@media(max-width:720px){.collapsible-card > summary{align-items:flex-start;flex-direction:column}.button-row{justify-content:flex-start}.collapsible-card > *:not(summary){margin-left:.9rem;margin-right:.9rem}}

/* Atualização v15 — layout responsivo mobile/tablet, menu compacto e botões alinhados */
.mobile-menu-button,
.mobile-sidebar-backdrop{display:none}

.quick-actions.icons{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    align-items:stretch;
}
.quick-actions.icons .action{
    width:100%;
    min-width:0;
    text-align:center;
    line-height:1.25;
}
.actions a,
.actions button,
.button-row .button,
.inline-form button,
.inline-form .button{
    min-height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
}
.table-wrap{
    -webkit-overflow-scrolling:touch;
    border-radius:14px;
}
.table-wrap table{min-width:720px}
.admin-click-stats .card,
.panel-link,
.stat-link{height:100%}

@media(max-width:1180px){
    .container{padding:24px 22px}
    .page-shell{min-width:0}
    .card{padding:20px}
    .treasury-circle{width:190px;height:190px}
    .finance-calendar{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media(max-width:980px){
    body.with-sidebar{display:block;overflow-x:hidden}
    .mobile-menu-button{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        border:1px solid rgba(214,170,72,.34);
        background:linear-gradient(135deg,var(--gold),var(--gold2));
        color:#14100b;
        border-radius:999px;
        padding:9px 13px;
        min-width:104px;
        box-shadow:0 10px 22px rgba(0,0,0,.16);
        white-space:nowrap;
    }
    .mobile-sidebar-backdrop{
        position:fixed;
        inset:0;
        z-index:24;
        background:rgba(0,0,0,.58);
        backdrop-filter:blur(3px);
    }
    body.sidebar-open .mobile-sidebar-backdrop{display:block}
    .sidebar{
        position:fixed!important;
        inset:0 auto 0 0!important;
        width:min(86vw,340px)!important;
        max-width:340px;
        height:100dvh;
        padding:18px 14px;
        transform:translateX(-110%);
        transition:transform .24s ease, box-shadow .24s ease;
        border-right:1px solid rgba(214,170,72,.28)!important;
        border-bottom:0!important;
        z-index:30;
    }
    body.sidebar-open .sidebar{
        transform:translateX(0);
        box-shadow:22px 0 55px rgba(0,0,0,.42);
    }
    .side-brand{
        flex-direction:row!important;
        justify-content:flex-start!important;
        text-align:left!important;
        gap:12px;
        padding:8px 6px 14px;
    }
    .side-brand img{width:54px!important;height:54px!important;flex:0 0 auto}
    .side-brand span{font-size:14px}
    .side-brand small{font-size:10px}
    .side-nav{
        display:flex!important;
        flex-direction:column!important;
        gap:8px;
    }
    .side-nav a{
        min-height:44px;
        padding:10px 12px;
        border-radius:13px;
        font-size:14px;
    }
    .side-section{margin-top:10px;grid-column:auto!important}
    .page-shell{margin-left:0!important}
    .app-header{
        position:sticky!important;
        top:0;
        flex-direction:row!important;
        align-items:center!important;
        padding:12px 14px;
        min-height:64px;
        gap:12px;
    }
    .app-header > div:first-child{min-width:0;flex:1 1 auto}
    .app-header .eyebrow{
        font-size:10px;
        margin:0 0 3px;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }
    .app-header strong{
        display:block;
        font-size:14px;
        line-height:1.25;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }
    .header-actions{
        width:auto!important;
        flex:0 0 auto;
        align-items:center!important;
        justify-content:flex-end!important;
        gap:8px;
    }
    .header-user{display:none}
    .theme-toggle{min-width:82px;padding:9px 11px;white-space:nowrap}
    .grid.three,
    .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .quick-actions.icons{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
    .quick-actions.icons .action{min-height:68px;padding:12px 10px}
    .treasury-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .treasury-circle{width:min(100%,178px);height:178px}
    .finance-calendar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
    .candidate-calendar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
    .member-card{max-width:100%;gap:18px;padding:22px}
    .app-footer{margin:16px 14px 18px!important}
}

@media(max-width:720px){
    .container{padding:16px 12px}
    .card{padding:16px;border-radius:16px;margin-bottom:14px}
    .nested{padding:13px;border-radius:13px}
    h1{font-size:1.55rem;line-height:1.15}
    h2{font-size:1.25rem;line-height:1.2}
    h3{font-size:1.05rem}
    .hero,
    .section-title-row,
    .item-row,
    .session-row,
    .person-row{align-items:stretch!important;flex-direction:column!important}
    .grid.two,
    .grid.three,
    .grid.four,
    .treasury-stats{grid-template-columns:1fr!important}
    .quick-actions.icons{grid-template-columns:1fr;gap:10px}
    .quick-actions.icons .action{
        min-height:58px;
        justify-content:flex-start;
        text-align:left;
        padding:12px 14px;
    }
    .inline-form,
    .button-row,
    .actions{
        display:grid!important;
        grid-template-columns:1fr;
        gap:8px;
        width:100%;
    }
    .inline-form input,
    .inline-form select,
    .inline-form button,
    .inline-form .button,
    .button-row .button,
    .actions a,
    .actions button,
    .actions form{
        width:100%;
        max-width:none;
    }
    .actions a,
    .actions button,
    .button-row .button{
        border-radius:11px;
        padding:10px 12px;
    }
    .collapsible-card > summary{
        padding:1rem;
        gap:.55rem;
    }
    .collapsible-card > summary span{font-size:1.05rem;line-height:1.2}
    .collapsible-card > summary strong{width:100%;justify-content:center;text-align:center}
    .collapsible-card > *:not(summary){margin-left:1rem!important;margin-right:1rem!important}
    .table-wrap{
        margin-left:-2px;
        margin-right:-2px;
        padding-bottom:4px;
    }
    .table-wrap table{min-width:760px}
    th,td{padding:10px 9px;font-size:13px;vertical-align:top}
    .finance-calendar,
    .candidate-calendar{grid-template-columns:1fr!important}
    .calendar-day{min-height:auto}
    .calendar-edit{min-width:0;width:100%}
    .treasury-circle{width:180px;height:180px;margin:0 auto}
    .month-calendar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .month-tile{padding:10px 8px;font-size:13px}
    .treasury-year-nav .button{flex:1 1 120px}
    .photo-box{align-items:stretch}
    .photo-box img,.avatar.xl{margin:auto}
    .member-card{
        flex-direction:column;
        text-align:center;
        padding:18px;
        border-radius:22px;
    }
    .member-card img{width:118px;height:118px}
    .login-card{min-height:auto;gap:18px}
    .big-symbol{font-size:82px}
    .public-shell{min-width:0}
    .public-topbar{padding:12px 14px!important}
    .public-topbar .brand{font-size:15px;line-height:1.15}
    .public-topbar .brand img{width:42px;height:42px}
}

@media(max-width:430px){
    .app-header{padding:10px 10px;gap:8px}
    .app-header .eyebrow{display:none}
    .app-header strong{font-size:13px;max-width:42vw}
    .mobile-menu-button{min-width:88px;padding:8px 10px;font-size:13px}
    .theme-toggle{min-width:72px;padding:8px 9px;font-size:13px}
    .container{padding:12px 10px}
    .card{padding:14px;border-radius:15px}
    .month-calendar{grid-template-columns:1fr}
    .treasury-circle{width:165px;height:165px}
    .treasury-circle strong{font-size:22px}
    .side-nav a{font-size:13px}
    .sidebar{width:min(90vw,320px)!important}
    .table-wrap table{min-width:720px}
}

html[data-theme="light"] .mobile-menu-button{
    color:#17130d;
    box-shadow:0 10px 22px rgba(80,58,24,.12);
}
html[data-theme="light"] .mobile-sidebar-backdrop{background:rgba(36,25,10,.38)}

/* Atualização v16 — relatórios clicáveis, início moderno, anexos verdes e carteirinha completa */
.treasury-clickable{
    color:var(--text);
    text-decoration:none;
    position:relative;
    transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.treasury-clickable:hover{
    text-decoration:none;
    transform:translateY(-4px) scale(1.015);
    filter:brightness(1.08);
    box-shadow:0 18px 42px rgba(0,0,0,.32),0 0 34px rgba(214,170,72,.18);
}
.treasury-clickable small{
    margin-top:8px;
    color:#fff;
    opacity:.86;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.18);
    padding:5px 9px;
    border-radius:999px;
    font-weight:900;
}
.treasury-report-head h1{margin-top:.15rem}.report-summary-grid{margin-top:18px}.mini-stat{padding:16px;border:1px solid rgba(214,170,72,.24);border-radius:18px;background:rgba(255,255,255,.045)}.mini-stat span{display:block;color:var(--muted);font-weight:800}.mini-stat strong{display:block;color:var(--gold2);font-size:28px;margin-top:4px}.treasury-report-list{display:grid;gap:12px}.treasury-report-row{display:grid;grid-template-columns:1.4fr .55fr .72fr;gap:16px;align-items:center;padding:15px;border:1px solid rgba(214,170,72,.22);border-radius:18px;background:linear-gradient(135deg,rgba(255,255,255,.055),rgba(255,255,255,.025));box-shadow:0 12px 30px rgba(0,0,0,.12)}.report-main-info strong{display:block;font-size:17px;color:#fff}.report-main-info p{margin:.45rem 0 0;color:var(--muted)}.report-source{display:inline-flex;width:max-content;margin-bottom:8px;padding:5px 9px;border-radius:999px;background:rgba(214,170,72,.15);border:1px solid rgba(214,170,72,.32);color:var(--gold2);font-weight:900;font-size:12px}.report-money-info{display:flex;flex-direction:column;align-items:flex-start;gap:7px}.report-money-info strong{font-size:19px;color:#fff}.report-actions{display:flex;flex-direction:column;gap:8px;align-items:stretch}.wa-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 12px;border-radius:999px;background:linear-gradient(135deg,#1fa855,#25d366);color:#07110b!important;font-weight:950;text-decoration:none;box-shadow:0 10px 22px rgba(37,211,102,.16);white-space:nowrap}.wa-button:hover{text-decoration:none;filter:brightness(1.06)}.wa-button.disabled{background:rgba(255,255,255,.07);color:var(--muted)!important;box-shadow:none;border:1px solid rgba(255,255,255,.14)}.button.ghost,.ghost{background:rgba(255,255,255,.07)!important;color:var(--text)!important;border:1px solid rgba(214,170,72,.24)}

.dashboard-welcome{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);gap:24px;align-items:stretch;overflow:hidden;position:relative;background:linear-gradient(135deg,rgba(7,22,48,.98),rgba(12,44,82,.88));border-color:rgba(214,170,72,.36)}.dashboard-welcome:after{content:"";position:absolute;right:-80px;bottom:-110px;width:310px;height:310px;background:url('/static/bg_masonic.png') center/contain no-repeat;opacity:.12;pointer-events:none}.dashboard-welcome-copy{position:relative;z-index:1}.dashboard-welcome-copy h1{font-size:clamp(1.7rem,3vw,3rem);line-height:1.05;margin-bottom:12px}.dashboard-welcome-copy p{max-width:760px;color:#f7f1e6}.welcome-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.dashboard-welcome-panel{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:20px;border:1px solid rgba(255,255,255,.14);border-radius:24px;background:rgba(255,255,255,.07);backdrop-filter:blur(6px)}.welcome-status-card{width:100%;text-align:center;padding:14px;border-radius:18px;background:rgba(0,0,0,.18);border:1px solid rgba(214,170,72,.22)}.welcome-status-card span,.welcome-status-card small{display:block}.welcome-status-card strong{display:block;color:var(--gold2);font-size:22px;margin:5px 0}.dashboard-admin-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 18px}.dash-metric{display:flex;align-items:center;gap:14px;padding:16px;border-radius:18px;background:linear-gradient(135deg,rgba(214,170,72,.13),rgba(255,255,255,.045));border:1px solid rgba(214,170,72,.27);color:var(--text);text-decoration:none}.dash-metric:hover{text-decoration:none;transform:translateY(-2px);border-color:rgba(214,170,72,.48)}.dash-metric span{font-size:28px}.dash-metric strong{font-size:28px;color:var(--gold2);line-height:1}.dash-metric small{display:block}.dashboard-action-grid{margin:0 0 20px;grid-template-columns:repeat(auto-fit,minmax(178px,1fr))!important}.dashboard-action-grid .action{display:flex;flex-direction:column!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px;min-height:128px;text-align:left!important;padding:16px;border-radius:20px;background:linear-gradient(145deg,rgba(255,255,255,.072),rgba(255,255,255,.028));box-shadow:0 12px 28px rgba(0,0,0,.12)}.dashboard-action-grid .action span{font-size:30px}.dashboard-action-grid .action strong{display:block;font-size:16px;color:#fff}.dashboard-action-grid .action small{font-weight:750}.dashboard-action-grid .action.accent strong,.dashboard-action-grid .action.accent small{color:#14100b}.dashboard-main-grid .card,.dashboard-secondary-grid .card{height:100%}

.attachment-upload-grid label.upload-status-field{position:relative;display:flex;min-height:112px;padding:14px;border:1px dashed rgba(214,170,72,.30);border-radius:18px;background:rgba(255,255,255,.035);transition:background .18s ease,border-color .18s ease,box-shadow .18s ease}.upload-status-field input[type=file]{margin-top:auto}.upload-label-text{display:block;padding-right:110px}.upload-ok{position:absolute;right:12px;top:12px;display:none;align-items:center;justify-content:center;padding:6px 9px;border-radius:999px;background:#16a34a;color:#fff;font-size:12px;font-weight:950;box-shadow:0 8px 18px rgba(22,163,74,.18)}.upload-status-field.is-attached{border-style:solid;border-color:rgba(22,163,74,.85)!important;background:linear-gradient(135deg,rgba(22,163,74,.18),rgba(255,255,255,.035));box-shadow:inset 0 0 0 1px rgba(22,163,74,.2)}.upload-status-field.is-attached .upload-ok{display:inline-flex}.attachment-list{margin-top:14px}.attachment-list a{display:inline-flex;align-items:center;gap:7px;margin:5px 7px 5px 0;padding:8px 10px;border-radius:999px;background:rgba(22,163,74,.14);border:1px solid rgba(22,163,74,.38);color:#dfffea}

.enhanced-card{max-width:900px}.card-member-info{min-width:0}.graduation-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.graduation-timeline-item{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid rgba(214,170,72,.22);border-radius:18px;background:rgba(255,255,255,.045)}.degree-badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--gold2));color:#14100b;font-weight:950}.graduation-timeline-item strong{display:block;color:#fff}.graduation-timeline-item small{display:block;margin-top:4px}.graduation-timeline-item p{margin:.45rem 0 0;color:var(--muted)}

.login-wa-button{justify-content:center;text-align:center}.login-wa-button span:not(.wa-icon){font-weight:950}

@media(max-width:980px){.dashboard-welcome{grid-template-columns:1fr}.dashboard-admin-strip{grid-template-columns:1fr}.treasury-report-row{grid-template-columns:1fr}.report-actions{flex-direction:row;flex-wrap:wrap}.report-actions .wa-button,.report-actions .button{flex:1 1 220px}.dashboard-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.dashboard-action-grid .action{min-height:116px}.upload-label-text{padding-right:0}.upload-ok{position:static;width:max-content;margin-bottom:8px}}
@media(max-width:720px){.dashboard-welcome{gap:14px}.dashboard-welcome-panel{padding:14px}.dashboard-action-grid{grid-template-columns:1fr!important}.dashboard-action-grid .action{min-height:86px}.report-actions{flex-direction:column}.treasury-report-row{padding:13px}.mini-stat strong{font-size:22px}.graduation-timeline{grid-template-columns:1fr}.attachment-upload-grid label.upload-status-field{min-height:auto}.welcome-actions .button{width:100%;text-align:center}}

/* Atualização v17 — nomes clicáveis, menu desktop, biblioteca e ajustes de tema */
.person-name-link{
    color:var(--gold2)!important;
    font-weight:950;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:6px;
}
.person-name-link::after{content:'↗';font-size:.72em;opacity:.72}
.person-name-link:hover{text-decoration:underline;filter:brightness(1.08)}
.hero-name{font-size:inherit;color:#fff!important}.hero-name::after{display:none}
.report-person-link{display:flex;font-size:17px;margin-top:4px}
.wa-mini{padding:7px 10px;font-size:12px;box-shadow:none;max-width:max-content}.wa-mini:hover{text-decoration:none}

.desktop-header-nav{display:none;align-items:center;gap:7px;flex:1 1 auto;justify-content:center;min-width:0;overflow-x:auto;padding:2px 4px;scrollbar-width:thin}
.desktop-header-nav a{white-space:nowrap;padding:8px 10px;border-radius:999px;color:#f7f1e6;text-decoration:none;border:1px solid rgba(214,170,72,.16);background:rgba(255,255,255,.045);font-weight:850;font-size:13px}
.desktop-header-nav a:hover{background:rgba(214,170,72,.14);text-decoration:none}.desktop-header-nav .admin-link{background:linear-gradient(135deg,var(--gold),var(--gold2));color:#140f08}
.header-user{text-decoration:none;color:var(--text)}.header-user:hover{text-decoration:none;border-color:rgba(214,170,72,.42)}
@media(min-width:981px){
    body.desktop-header-mode .sidebar{display:none!important}
    body.desktop-header-mode .page-shell{margin-left:0!important}
    body.desktop-header-mode .desktop-header-nav{display:flex}
    body.desktop-header-mode .app-header{gap:12px;padding-left:20px;padding-right:20px}
    body.desktop-header-mode .app-header > div:first-child{flex:0 0 auto;max-width:250px}
}

.user-settings-card{max-width:900px;margin-left:auto;margin-right:auto}.menu-layout-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}.menu-layout-card{cursor:pointer;display:flex;flex-direction:column;gap:8px;padding:18px;border-radius:18px;border:1px solid rgba(214,170,72,.28);background:rgba(255,255,255,.045);transition:transform .18s ease,border-color .18s ease,background .18s ease}.menu-layout-card:hover{transform:translateY(-2px);border-color:rgba(214,170,72,.5)}.menu-layout-card input{width:auto}.menu-layout-card span{font-weight:950;font-size:18px;color:var(--gold2)}

.dashboard-main-grid,.dashboard-secondary-grid{align-items:stretch;gap:18px}.dashboard-color-card{position:relative;overflow:hidden;min-height:210px}.dashboard-color-card::before{content:"";position:absolute;inset:auto -60px -90px auto;width:210px;height:210px;border-radius:50%;opacity:.18;pointer-events:none}.dashboard-color-card > *{position:relative;z-index:1}.card-comunicados{background:linear-gradient(145deg,rgba(37,65,115,.95),rgba(20,20,30,.95));border-color:rgba(95,145,255,.32)}.card-comunicados::before{background:#5f91ff}.card-notificacoes{background:linear-gradient(145deg,rgba(80,54,105,.95),rgba(20,20,30,.95));border-color:rgba(191,128,255,.30)}.card-notificacoes::before{background:#bf80ff}.card-aniversariantes{background:linear-gradient(145deg,rgba(99,65,31,.95),rgba(20,20,30,.95));border-color:rgba(240,180,80,.34)}.card-aniversariantes::before{background:#f0b450}.card-sessoes{background:linear-gradient(145deg,rgba(38,87,70,.95),rgba(20,20,30,.95));border-color:rgba(74,222,128,.26)}.card-sessoes::before{background:#4ade80}.dashboard-color-card h2{color:#fff}.dashboard-color-card strong{color:#fff}.dashboard-color-card .item-row,.dashboard-color-card .person-row{border-bottom-color:rgba(255,255,255,.13)}

html[data-theme="dark"] .dashboard-action-grid .action.accent strong,
html[data-theme="dark"] .dashboard-action-grid .action.accent small,
html[data-theme="dark"] .dashboard-action-grid .action.accent{color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.35)}
html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3,
html[data-theme="light"] .card h1,html[data-theme="light"] .card h2,html[data-theme="light"] .card h3,
html[data-theme="light"] .dashboard-action-grid .action strong,
html[data-theme="light"] .dashboard-welcome-copy h1,
html[data-theme="light"] .dashboard-welcome-copy h1 a,
html[data-theme="light"] .report-main-info strong,
html[data-theme="light"] .report-money-info strong,
html[data-theme="light"] .graduation-timeline-item strong,
html[data-theme="light"] .library-book-card h2,
html[data-theme="light"] .header-user span{color:#1a1712!important;text-shadow:none!important}
html[data-theme="light"] .dashboard-color-card h2,
html[data-theme="light"] .dashboard-color-card strong{color:#1a1712!important}
html[data-theme="light"] .dashboard-color-card{box-shadow:0 18px 42px rgba(80,58,24,.13)}
html[data-theme="light"] .card-comunicados{background:linear-gradient(145deg,#eef4ff,#fffaf1);border-color:rgba(79,120,210,.32)}
html[data-theme="light"] .card-notificacoes{background:linear-gradient(145deg,#f5efff,#fffaf1);border-color:rgba(151,89,210,.30)}
html[data-theme="light"] .card-aniversariantes{background:linear-gradient(145deg,#fff3df,#fffaf1);border-color:rgba(190,125,31,.32)}
html[data-theme="light"] .card-sessoes{background:linear-gradient(145deg,#edfff5,#fffaf1);border-color:rgba(31,135,75,.26)}
html[data-theme="light"] .desktop-header-nav a{color:#1a1712;background:rgba(255,255,255,.62);border-color:rgba(127,88,26,.18)}
html[data-theme="light"] .desktop-header-nav .admin-link{color:#17130d;background:linear-gradient(135deg,var(--gold),#d8b867)}

.compact-year-nav{flex-wrap:nowrap!important;gap:8px}.compact-year-nav .button{padding:7px 10px!important;font-size:12px!important;border-radius:999px;min-height:32px}.compact-year-nav strong{padding:5px 12px;border-radius:999px;border:1px solid rgba(214,170,72,.28);background:rgba(255,255,255,.05)}
.treasury-month-calendar{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:6px}.treasury-month-calendar .month-tile{padding:8px 4px!important;font-size:12px;border-radius:11px;min-width:0}.payment-months{flex-wrap:nowrap!important;gap:4px}.payment-months .status-pill{font-size:11px;padding:4px 6px;white-space:nowrap}

.library-hero{background:linear-gradient(135deg,rgba(7,22,48,.98),rgba(40,29,18,.94));border-color:rgba(214,170,72,.34)}.library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:20px;margin-bottom:24px}.library-book-card{display:flex;flex-direction:column;border:1px solid rgba(214,170,72,.28);border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.025));box-shadow:0 18px 42px rgba(0,0,0,.18);overflow:hidden;min-height:100%}.book-cover-link{display:block;padding:16px 16px 0;text-decoration:none}.book-cover-img,.book-cover-placeholder{width:100%;aspect-ratio:3/4;border-radius:16px;object-fit:cover;border:1px solid rgba(214,170,72,.28);box-shadow:0 12px 26px rgba(0,0,0,.18)}.book-cover-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;padding:16px;background:linear-gradient(145deg,rgba(214,170,72,.22),rgba(10,20,38,.85));color:#fff}.book-cover-placeholder span{font-size:42px}.book-info{padding:14px 16px 18px;display:flex;flex-direction:column;gap:8px;flex:1}.book-info h2{font-size:17px;margin:0}.book-info .button{margin-top:auto;align-self:flex-start}.library-admin-list{display:grid;gap:12px}.library-admin-row{display:grid;grid-template-columns:64px 1fr auto;gap:14px;align-items:center;padding:12px;border:1px solid rgba(214,170,72,.22);border-radius:18px;background:rgba(255,255,255,.04)}.book-cover-thumb{width:64px;height:86px;border-radius:10px;object-fit:cover;border:1px solid rgba(214,170,72,.28);display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.06)}
html[data-theme="light"] .library-book-card,html[data-theme="light"] .library-admin-row{background:linear-gradient(180deg,#fffdf8,#f5ead7);box-shadow:0 18px 42px rgba(80,58,24,.12)}
html[data-theme="light"] .book-cover-placeholder{background:linear-gradient(145deg,#b88932,#f4dfb1);color:#1a1712}

@media(max-width:1180px){.treasury-month-calendar{grid-template-columns:repeat(6,minmax(0,1fr))!important}.payment-months{flex-wrap:wrap!important}}
@media(max-width:720px){.menu-layout-options{grid-template-columns:1fr}.treasury-month-calendar{grid-template-columns:repeat(3,minmax(0,1fr))!important}.compact-year-nav{justify-content:space-between}.compact-year-nav .button{flex:0 0 auto!important}.library-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:14px}.library-admin-row{grid-template-columns:54px 1fr}.library-admin-row form{grid-column:1/-1}.book-cover-thumb{width:54px;height:72px}}
@media(max-width:430px){.treasury-month-calendar{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
html[data-theme="light"] .dashboard-welcome-copy p{color:#3d3427!important}
html[data-theme="light"] .dashboard-action-grid .action small,
html[data-theme="light"] .dash-metric small,
html[data-theme="light"] .welcome-status-card small{color:#5e5344!important}


/* Atualização v19 — login institucional, novo nome, background e cards maçônicos */
body{
    background:
        linear-gradient(180deg,rgba(3,5,9,.76),rgba(4,5,8,.88)),
        url('/static/bg_masonic_sp_login.png') center center/cover fixed no-repeat!important;
}
body::before{display:none!important}
html[data-theme="light"] body{
    background:
        linear-gradient(180deg,rgba(255,250,241,.78),rgba(246,236,218,.88)),
        url('/static/bg_masonic_sp_login.png') center center/cover fixed no-repeat!important;
}
.brand{align-items:center}.brand small{display:block;font-size:11px;color:var(--gold2);line-height:1.15;font-weight:700;letter-spacing:0;text-transform:none}.brand span{display:block;line-height:1.1}
.side-section-top{margin-top:4px}.side-nav .side-section + .admin-link{margin-top:2px}
.public-shell .container{max-width:1280px}.public-topbar{background:linear-gradient(90deg,rgba(5,6,9,.88),rgba(20,15,9,.76),rgba(5,6,9,.88));border-bottom-color:rgba(214,170,72,.32)}
.login-redesign{min-height:calc(100vh - 180px);display:grid;grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);gap:28px;align-items:stretch;padding:18px 0 26px}.login-about-panel,.login-access-card{position:relative;overflow:hidden;border:1px solid rgba(214,170,72,.28);border-radius:28px;background:linear-gradient(145deg,rgba(8,10,16,.82),rgba(20,15,8,.72));box-shadow:0 28px 80px rgba(0,0,0,.34);backdrop-filter:blur(8px)}.login-about-panel{padding:32px 34px}.login-about-panel::after{content:"G";position:absolute;right:30px;bottom:-38px;font-size:190px;font-family:Georgia,serif;color:rgba(214,170,72,.055);font-weight:900;line-height:1;pointer-events:none}.login-about-symbol{width:72px;height:72px;display:flex;align-items:center;justify-content:center;border-radius:24px;background:radial-gradient(circle,rgba(240,205,116,.28),rgba(214,170,72,.10));border:1px solid rgba(214,170,72,.45);color:var(--gold2);font-size:42px;box-shadow:0 18px 46px rgba(0,0,0,.24);margin-bottom:16px}.login-about-panel h1{font-size:clamp(2rem,4vw,4.1rem);line-height:1;margin:.12em 0 .35em;color:#fff;text-shadow:0 4px 20px rgba(0,0,0,.45)}.login-about-panel h2{color:var(--gold2);font-size:1.45rem}.login-about-panel p{color:#efe7d6;max-width:960px}.login-access-card{align-self:center;padding:26px!important;margin:0!important;max-width:none;width:100%}.login-card-head{display:flex;align-items:center;gap:14px;margin-bottom:16px}.login-card-head img{width:64px;height:64px;border-radius:50%;object-fit:cover;border:2px solid var(--gold);box-shadow:0 10px 28px rgba(0,0,0,.25)}.login-card-head h2{margin:2px 0 0;color:#fff}.login-access-card label{margin-top:12px}.login-access-card button[type=submit]{width:100%;margin-top:16px}.login-wa-button{width:100%;border-radius:16px;justify-content:center;text-align:center;padding:12px 14px}.login-wa-button span:not(.wa-icon){font-weight:950}.login-wa-button em{display:none!important}.login-access-card .access-alert{border-color:rgba(37,211,102,.34);background:linear-gradient(135deg,rgba(37,211,102,.12),rgba(214,170,72,.08))}
.person-name-link{font-weight:500!important}.person-name-link::after{font-weight:400}.hero-name{font-weight:700!important}.dashboard-masonic-card{position:relative;overflow:hidden;min-height:230px;background:linear-gradient(145deg,rgba(12,13,18,.92),rgba(35,25,12,.78))!important;border-color:rgba(214,170,72,.32)!important;box-shadow:0 22px 58px rgba(0,0,0,.28)}.dashboard-masonic-card::before{content:"";position:absolute;inset:1px;border-radius:17px;background:radial-gradient(circle at top right,rgba(214,170,72,.18),transparent 40%),radial-gradient(circle at bottom left,rgba(255,255,255,.06),transparent 36%);pointer-events:none}.dashboard-masonic-card::after{position:absolute;right:20px;bottom:-34px;font-size:142px;line-height:1;color:rgba(214,170,72,.075);font-family:Georgia,serif;font-weight:900;pointer-events:none}.card-comunicados::after{content:"☿"}.card-notificacoes::after{content:"☉"}.card-aniversariantes::after{content:"✦"}.card-sessoes::after{content:"△"}.dashboard-masonic-card > *{position:relative;z-index:1}.masonic-card-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}.masonic-card-head h2{margin:0;color:#fff!important;font-size:1.55rem}.masonic-card-head .eyebrow{margin:0 0 3px}.masonic-card-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:16px;background:linear-gradient(135deg,rgba(214,170,72,.24),rgba(240,205,116,.10));border:1px solid rgba(214,170,72,.38);color:var(--gold2);font-size:26px;box-shadow:0 12px 26px rgba(0,0,0,.20)}.masonic-list-row{border-bottom-color:rgba(214,170,72,.16)!important}.dashboard-masonic-card strong{color:#fff!important}.dashboard-masonic-card span{color:#efe7d6}.dashboard-masonic-card small{color:#cdbf9d!important}.admin-announce-box summary{color:var(--gold2)!important}.dashboard-action-grid .action strong{font-weight:800}.side-brand small{max-width:210px;text-transform:none;letter-spacing:0;line-height:1.25}
html[data-theme="light"] .public-topbar{background:linear-gradient(90deg,rgba(255,250,241,.92),rgba(244,226,190,.86),rgba(255,250,241,.92))}html[data-theme="light"] .login-about-panel,html[data-theme="light"] .login-access-card{background:linear-gradient(145deg,rgba(255,253,248,.88),rgba(246,232,204,.80));box-shadow:0 28px 70px rgba(80,58,24,.16)}html[data-theme="light"] .login-about-panel h1,html[data-theme="light"] .login-card-head h2{color:#1a1712!important;text-shadow:none!important}html[data-theme="light"] .login-about-panel h2{color:#6f4c16!important}html[data-theme="light"] .login-about-panel p{color:#3d3427!important}html[data-theme="light"] .dashboard-masonic-card{background:linear-gradient(145deg,rgba(255,253,248,.94),rgba(241,225,194,.88))!important;border-color:rgba(127,88,26,.25)!important;box-shadow:0 22px 48px rgba(80,58,24,.13)}html[data-theme="light"] .dashboard-masonic-card::before{background:radial-gradient(circle at top right,rgba(159,113,36,.16),transparent 40%),radial-gradient(circle at bottom left,rgba(255,255,255,.76),transparent 36%)}html[data-theme="light"] .dashboard-masonic-card::after{color:rgba(127,88,26,.095)}html[data-theme="light"] .masonic-card-head h2,html[data-theme="light"] .dashboard-masonic-card strong{color:#1a1712!important}html[data-theme="light"] .dashboard-masonic-card span{color:#3d3427}html[data-theme="light"] .dashboard-masonic-card small{color:#675d4c!important}html[data-theme="light"] .masonic-card-icon{color:#6f4c16;background:linear-gradient(135deg,rgba(159,113,36,.16),rgba(255,255,255,.56));border-color:rgba(127,88,26,.26)}html[data-theme="dark"] .app-header strong{color:#fff!important}
@media(max-width:980px){.login-redesign{grid-template-columns:1fr}.login-about-panel{padding:24px}.login-access-card{align-self:stretch}.login-about-panel p{font-size:.95rem}.brand small{font-size:10px}}
@media(max-width:560px){.login-redesign{padding-top:0;gap:18px}.login-about-panel,.login-access-card{border-radius:22px;padding:20px!important}.login-about-symbol{width:58px;height:58px;font-size:32px}.login-card-head{align-items:flex-start}.login-card-head img{width:54px;height:54px}.login-about-panel p:nth-of-type(n+4){display:none}}

/* V20 - multi-lojas, painel master e financeiro do sistema */
.login-access-card input[name="lodge_code"]{
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    border-color: rgba(212,175,55,.55);
}
.master-panel .section-header{
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:center;
    flex-wrap:wrap;
}
.button.small, .button.small:visited{
    padding:8px 12px;
    font-size:.86rem;
    border-radius:999px;
}
.status-pill{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:6px 10px;
    font-weight:700;
    font-size:.82rem;
    border:1px solid rgba(212,175,55,.30);
    background:rgba(212,175,55,.10);
}
.status-pill.ok{color:#75d69b;border-color:rgba(117,214,155,.55);background:rgba(117,214,155,.10)}
.status-pill.bad{color:#ff9c9c;border-color:rgba(255,156,156,.55);background:rgba(255,156,156,.10)}
.whatsapp-link.compact{padding:7px 10px;font-size:.85rem;border-radius:999px;white-space:nowrap;}
.system-financial-card{overflow:hidden;}
.finance-status-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin:18px 0;
}
.finance-status-box{
    border:1px solid rgba(212,175,55,.28);
    border-radius:20px;
    padding:18px;
    background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(212,175,55,.06));
}
.finance-status-box span{display:block;color:var(--muted);font-size:.84rem;margin-bottom:8px;}
.finance-status-box strong{display:block;font-size:1.35rem;color:var(--text);}
.finance-status-box small{color:var(--muted);}
.finance-status-box.ok{border-color:rgba(117,214,155,.48);background:linear-gradient(135deg,rgba(117,214,155,.15),rgba(255,255,255,.04));}
.finance-status-box.bad{border-color:rgba(255,156,156,.48);background:linear-gradient(135deg,rgba(255,156,156,.15),rgba(255,255,255,.04));}
.access-alert.danger{border-color:rgba(255,156,156,.55);background:rgba(255,156,156,.10)}
@media (max-width: 780px){.finance-status-grid{grid-template-columns:1fr}.master-panel .section-header{display:block}.master-panel .button{margin-top:12px}}

/* V21 - Asaas e mensalidades automáticas */
.status-pill.warn{color:#f5c96b;border-color:rgba(245,201,107,.55);background:rgba(245,201,107,.10)}
.table-actions{white-space:nowrap;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.table-actions form{margin:0}.button.ghost{background:transparent;border:1px solid rgba(212,175,55,.34);color:var(--text)}.button.secondary{background:linear-gradient(135deg,rgba(212,175,55,.20),rgba(255,255,255,.06));border:1px solid rgba(212,175,55,.35);color:var(--text)}.button-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.settings-panel{border:1px solid rgba(212,175,55,.22);border-radius:22px;padding:16px;background:linear-gradient(135deg,rgba(212,175,55,.08),rgba(255,255,255,.03));margin:10px 0}.checkline{display:flex!important;gap:10px;align-items:center;font-weight:700}.checkline input{width:auto!important}.finance-status-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:980px){.finance-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.finance-status-grid{grid-template-columns:1fr}.button-row{display:grid}.table-actions{display:grid}}

/* v22 - home comercial e painel master */
.login-product-home{grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr)}
.product-landing-panel{padding:34px!important}
.product-landing-panel h1{max-width:980px;margin-bottom:10px!important}
.impact-banner{display:inline-flex;align-items:center;gap:10px;padding:12px 18px;margin:6px 0 22px;border-radius:999px;background:linear-gradient(135deg,rgba(214,170,72,.25),rgba(255,255,255,.08));border:1px solid rgba(214,170,72,.38);color:#fff4cf;font-weight:900;letter-spacing:.01em;box-shadow:0 14px 34px rgba(0,0,0,.20)}
.product-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0 22px}.product-feature-card{min-height:142px;padding:18px;border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.10),rgba(214,170,72,.07));border:1px solid rgba(214,170,72,.28);box-shadow:0 18px 44px rgba(0,0,0,.18);display:flex;flex-direction:column;gap:8px}.product-feature-card span{font-size:30px}.product-feature-card strong{font-size:1.03rem;color:#fff;font-weight:900}.product-feature-card small{color:#eadfcb;line-height:1.35}.institutional-text{margin:22px 0 18px;padding:22px;border-radius:24px;background:linear-gradient(135deg,rgba(0,0,0,.16),rgba(255,255,255,.06));border:1px solid rgba(255,255,255,.12)}.institutional-text h2{margin-top:0!important;color:var(--gold2)!important}.institutional-text p{margin:.72em 0!important}.login-stats-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.login-stats-strip div{padding:16px;border-radius:20px;text-align:center;background:linear-gradient(145deg,rgba(214,170,72,.20),rgba(255,255,255,.06));border:1px solid rgba(214,170,72,.27)}.login-stats-strip span{display:block;font-size:26px}.login-stats-strip strong{display:block;color:#fff;font-size:1.25rem}.login-stats-strip small{display:block;color:#e8ddca}.resource-footer-card{padding:20px;border-radius:24px;background:linear-gradient(145deg,rgba(255,255,255,.10),rgba(0,0,0,.12));border:1px solid rgba(214,170,72,.22)}.resource-footer-card h3{margin-top:0;color:#fff}.resource-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px}.resource-list span{color:#f1e6d4}.master-admin-box{border-color:rgba(40,167,69,.32)!important;background:linear-gradient(135deg,rgba(40,167,69,.10),rgba(214,170,72,.07))!important}
html[data-theme="light"] .impact-banner{color:#4d3510;background:linear-gradient(135deg,rgba(159,113,36,.20),rgba(255,255,255,.72));border-color:rgba(127,88,26,.28)}html[data-theme="light"] .product-feature-card,html[data-theme="light"] .institutional-text,html[data-theme="light"] .login-stats-strip div,html[data-theme="light"] .resource-footer-card{background:linear-gradient(145deg,rgba(255,253,248,.92),rgba(244,226,190,.72));border-color:rgba(127,88,26,.22);box-shadow:0 16px 36px rgba(80,58,24,.10)}html[data-theme="light"] .product-feature-card strong,html[data-theme="light"] .login-stats-strip strong,html[data-theme="light"] .resource-footer-card h3{color:#1a1712!important}html[data-theme="light"] .product-feature-card small,html[data-theme="light"] .login-stats-strip small,html[data-theme="light"] .resource-list span{color:#3d3427!important}
@media(max-width:1100px){.product-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.login-stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.product-feature-grid,.login-stats-strip,.resource-list{grid-template-columns:1fr}.product-landing-panel{padding:20px!important}.institutional-text p:nth-of-type(n+3){display:none}.product-feature-card{min-height:auto}}


/* v23 - home limpa e ajuste 100% desktop */
html, body{
    width:100%;
    max-width:100%;
    overflow-x:hidden!important;
}
.public-body,
.public-shell{
    width:100%;
    min-width:0!important;
    overflow-x:hidden!important;
}
.public-body .container{
    width:100%;
    max-width:1180px;
    padding-left:18px;
    padding-right:18px;
}
.login-product-home{
    width:100%;
    max-width:1180px;
    margin:0 auto;
    grid-template-columns:minmax(0,1fr) minmax(340px,410px)!important;
    align-items:start;
}
.product-landing-panel{
    min-width:0;
    padding:32px!important;
}
.product-landing-panel .impact-banner{
    margin-bottom:18px;
}
.login-stats-strip{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin:18px 0;
}
.login-stats-strip div{
    padding:13px 10px;
}
.resource-footer-card{
    padding:18px;
    margin-top:14px;
}
.resource-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px 14px;
}
.login-access-card{
    width:100%;
    max-width:410px;
    min-width:0;
}
.public-footer{
    width:calc(100% - 36px);
    max-width:1180px;
    margin-left:auto!important;
    margin-right:auto!important;
}
.public-topbar{
    max-width:100%;
    overflow:hidden;
}
.public-topbar .brand{
    min-width:0;
}
.public-topbar .brand span,
.public-topbar .brand small{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
}
@media(max-width:980px){
    .login-product-home{
        grid-template-columns:1fr!important;
        max-width:760px;
    }
    .login-access-card{
        max-width:100%;
    }
}
@media(max-width:720px){
    .public-body .container{padding-left:12px;padding-right:12px;}
    .product-landing-panel{padding:22px!important;}
    .login-stats-strip{grid-template-columns:repeat(2,minmax(0,1fr));}
    .resource-list{grid-template-columns:1fr;}
    .public-footer{width:calc(100% - 24px);}
}
@media(max-width:430px){
    .login-stats-strip{grid-template-columns:1fr;}
}

/* v24 - home/login centralizados e tema Nuvens */
.public-body{
    min-height:100vh;
    overflow-x:hidden!important;
}
.public-shell{
    min-height:100vh;
    display:flex;
    flex-direction:column;
}
.public-shell > .container{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    max-width:1280px;
    margin:0 auto;
    padding:24px 18px!important;
}
.login-redesign.login-product-home{
    width:min(100%,1160px);
    max-width:1160px;
    min-height:auto;
    margin:0 auto!important;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(330px,400px)!important;
    align-items:center!important;
    justify-content:center;
    gap:26px;
}
.login-product-home .product-landing-panel,
.login-product-home .login-access-card{
    align-self:center;
}
.login-product-home .product-landing-panel{
    text-align:center;
    padding:28px!important;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}
.login-product-home .login-about-symbol{
    margin-left:auto;
    margin-right:auto;
}
.login-product-home .impact-banner{
    margin-left:auto;
    margin-right:auto;
    justify-content:center;
    text-align:center;
}
.login-product-home .login-stats-strip,
.login-product-home .resource-footer-card{
    width:100%;
    max-width:760px;
}
.login-product-home .resource-footer-card{
    text-align:left;
}
.login-product-home .resource-footer-card h3{
    text-align:center;
}
.login-product-home .login-access-card{
    margin:0 auto!important;
}
.public-footer{
    flex:0 0 auto;
    margin-top:10px!important;
    margin-bottom:16px!important;
}
.theme-toggle{
    min-width:112px;
}
@media(max-width:980px){
    .public-shell > .container{
        align-items:flex-start;
        padding-top:18px!important;
    }
    .login-redesign.login-product-home{
        width:min(100%,760px);
        grid-template-columns:1fr!important;
    }
    .login-product-home .product-landing-panel{
        padding:22px!important;
    }
}
@media(max-width:620px){
    .public-shell > .container{padding:14px 12px!important;}
    .login-product-home .product-landing-panel,
    .login-product-home .login-access-card{
        border-radius:20px;
    }
    .login-product-home .resource-footer-card{padding:16px;}
}

html[data-theme="clouds"]{
    --bg:#07142d;
    --panel:#0b1f45;
    --panel2:#12315f;
    --text:#f7fbff;
    --muted:#c8d7ee;
    --gold:#f0c94b;
    --gold2:#ffe182;
    --danger:#d44848;
    --ok:#2ca46b;
    --border:rgba(240,201,75,.34);
}
html[data-theme="clouds"] body{
    color:var(--text);
    background:
        radial-gradient(ellipse at 15% 12%,rgba(255,255,255,.36),transparent 24%),
        radial-gradient(ellipse at 78% 16%,rgba(255,255,255,.30),transparent 22%),
        radial-gradient(ellipse at 35% 84%,rgba(255,255,255,.18),transparent 30%),
        linear-gradient(135deg,#06142d 0%,#0b2a5c 48%,#102f6b 100%);
}
html[data-theme="clouds"] body::before{
    background:
        radial-gradient(ellipse at 18% 24%,rgba(255,255,255,.20),transparent 16%),
        radial-gradient(ellipse at 76% 40%,rgba(255,255,255,.16),transparent 18%),
        url('/static/bg_masonic.png') center 90px/520px no-repeat;
    opacity:.18;
    filter:none;
}
html[data-theme="clouds"] .topbar,
html[data-theme="clouds"] .public-topbar,
html[data-theme="clouds"] .app-header{
    background:linear-gradient(90deg,rgba(5,19,45,.94),rgba(9,48,105,.92),rgba(5,19,45,.94));
    border-color:rgba(240,201,75,.35);
    box-shadow:0 12px 32px rgba(0,0,0,.18);
}
html[data-theme="clouds"] .sidebar{
    background:linear-gradient(180deg,rgba(5,19,45,.98),rgba(7,34,76,.98));
    border-right-color:rgba(240,201,75,.35);
}
html[data-theme="clouds"] .card,
html[data-theme="clouds"] .nested,
html[data-theme="clouds"] .login-about-panel,
html[data-theme="clouds"] .login-access-card,
html[data-theme="clouds"] .resource-footer-card,
html[data-theme="clouds"] .login-stats-strip div,
html[data-theme="clouds"] .finance-status-box,
html[data-theme="clouds"] .candidate-pay-card,
html[data-theme="clouds"] .history-degree,
html[data-theme="clouds"] .calendar-day,
html[data-theme="clouds"] .book-card,
html[data-theme="clouds"] .library-book-card,
html[data-theme="clouds"] .library-admin-row{
    background:linear-gradient(145deg,rgba(11,31,69,.90),rgba(19,57,112,.76));
    border-color:rgba(240,201,75,.32);
    color:var(--text);
    box-shadow:0 20px 48px rgba(0,0,0,.18);
}
html[data-theme="clouds"] .login-about-panel,
html[data-theme="clouds"] .login-access-card{
    backdrop-filter:blur(10px);
}
html[data-theme="clouds"] h1,
html[data-theme="clouds"] h2,
html[data-theme="clouds"] h3,
html[data-theme="clouds"] .card h1,
html[data-theme="clouds"] .card h2,
html[data-theme="clouds"] .card h3,
html[data-theme="clouds"] .login-card-head h2,
html[data-theme="clouds"] .resource-footer-card h3,
html[data-theme="clouds"] .report-main-info strong,
html[data-theme="clouds"] .report-money-info strong,
html[data-theme="clouds"] .header-user span{
    color:#fff!important;
    text-shadow:0 1px 2px rgba(0,0,0,.28);
}
html[data-theme="clouds"] .eyebrow,
html[data-theme="clouds"] a,
html[data-theme="clouds"] .side-section,
html[data-theme="clouds"] th{
    color:var(--gold2);
}
html[data-theme="clouds"] .muted,
html[data-theme="clouds"] .hint,
html[data-theme="clouds"] small,
html[data-theme="clouds"] .resource-list span,
html[data-theme="clouds"] .login-stats-strip small{
    color:var(--muted)!important;
}
html[data-theme="clouds"] input,
html[data-theme="clouds"] select,
html[data-theme="clouds"] textarea{
    background:#061a3a;
    color:#fff;
    border-color:rgba(240,201,75,.32);
}
html[data-theme="clouds"] label{color:#eef6ff;}
html[data-theme="clouds"] button,
html[data-theme="clouds"] .button,
html[data-theme="clouds"] .topbar .admin-link,
html[data-theme="clouds"] .side-nav .admin-link,
html[data-theme="clouds"] .action.accent,
html[data-theme="clouds"] .mobile-menu-button{
    background:linear-gradient(135deg,#f0c94b,#ffe182);
    color:#06142d!important;
}
html[data-theme="clouds"] .theme-toggle,
html[data-theme="clouds"] .action,
html[data-theme="clouds"] .desktop-header-nav a,
html[data-theme="clouds"] .side-nav a,
html[data-theme="clouds"] .position-card,
html[data-theme="clouds"] .degree-card,
html[data-theme="clouds"] .month-tile{
    background:rgba(255,255,255,.09);
    border-color:rgba(240,201,75,.26);
    color:#fff;
}
html[data-theme="clouds"] .impact-banner{
    color:#06142d;
    background:linear-gradient(135deg,#f0c94b,#ffe182);
    border-color:rgba(255,225,130,.8);
}
html[data-theme="clouds"] .access-alert{
    background:linear-gradient(135deg,rgba(37,211,102,.16),rgba(240,201,75,.16));
    border-color:rgba(240,201,75,.38);
}
html[data-theme="clouds"] .app-footer,
html[data-theme="clouds"] .public-footer{
    background:rgba(5,19,45,.78);
    color:var(--muted);
    border-color:rgba(240,201,75,.30);
}
html[data-theme="clouds"] .member-card{
    background:linear-gradient(135deg,#06142d,#0b3a7a);
    border-color:#f0c94b;
}
html[data-theme="clouds"] .placeholder,
html[data-theme="clouds"] .book-cover-placeholder{
    background:linear-gradient(145deg,#0b2a5c,#f0c94b);
    color:#06142d;
}


/* v25 - correção definitiva da home/login desktop, botão de tema visível e layout 100% centralizado */
html, body{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
}
.public-body{
    min-height:100vh!important;
    display:block!important;
    overflow-x:hidden!important;
}
.public-shell{
    min-height:100vh!important;
    width:100%!important;
    max-width:100vw!important;
    margin:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow-x:hidden!important;
}
.public-topbar{
    position:fixed!important;
    top:14px!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
    width:min(1120px,calc(100vw - 32px))!important;
    max-width:calc(100vw - 32px)!important;
    z-index:9999!important;
    border-radius:22px!important;
    padding:10px 14px!important;
    backdrop-filter:blur(12px)!important;
}
.public-topbar .brand img{width:36px!important;height:36px!important;}
.public-topbar .brand span{font-size:15px!important;white-space:nowrap;}
.public-topbar .brand small{font-size:10px!important;white-space:nowrap;}
.public-body .theme-toggle{
    display:inline-flex!important;
    visibility:visible!important;
    opacity:1!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:126px!important;
    padding:10px 14px!important;
    border-radius:999px!important;
    border:1px solid rgba(214,170,72,.45)!important;
    box-shadow:0 12px 30px rgba(0,0,0,.18)!important;
    z-index:10000!important;
    white-space:nowrap!important;
}
.public-shell > .container{
    flex:1 0 auto!important;
    width:100%!important;
    max-width:100vw!important;
    margin:0 auto!important;
    padding:92px 18px 26px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
}
.login-redesign.login-product-home{
    width:min(1080px,calc(100vw - 36px))!important;
    max-width:min(1080px,calc(100vw - 36px))!important;
    margin:0 auto!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,630px) minmax(320px,380px)!important;
    gap:24px!important;
    align-items:center!important;
    justify-content:center!important;
}
.login-product-home .product-landing-panel,
.login-product-home .login-access-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    align-self:center!important;
}
.login-product-home .product-landing-panel{
    padding:26px!important;
    text-align:center!important;
}
.login-product-home .product-landing-panel h1{
    font-size:clamp(2.15rem,4.6vw,3.75rem)!important;
    line-height:.98!important;
    max-width:620px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}
.login-product-home .eyebrow{
    max-width:620px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}
.login-product-home .login-stats-strip{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    max-width:620px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}
.login-product-home .login-stats-strip div{
    min-width:0!important;
    padding:12px 8px!important;
}
.login-product-home .resource-footer-card{
    max-width:620px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    max-height:230px!important;
    overflow:auto!important;
}
.login-product-home .resource-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.login-product-home .login-access-card{
    max-width:380px!important;
    padding:22px!important;
}
.public-footer{
    flex:0 0 auto!important;
    width:min(1120px,calc(100vw - 32px))!important;
    max-width:calc(100vw - 32px)!important;
    margin:0 auto 16px!important;
    padding:18px 20px!important;
    border-radius:18px!important;
}
.messages{
    position:fixed!important;
    left:50%!important;
    top:88px!important;
    transform:translateX(-50%)!important;
    width:min(420px,calc(100vw - 32px))!important;
    z-index:10001!important;
    margin:0!important;
}
.flash{box-shadow:0 14px 36px rgba(0,0,0,.18)!important;}
@media(max-width:1060px){
    .login-redesign.login-product-home{
        width:min(760px,calc(100vw - 28px))!important;
        max-width:min(760px,calc(100vw - 28px))!important;
        grid-template-columns:1fr!important;
    }
    .login-product-home .login-access-card{max-width:520px!important;margin:0 auto!important;}
    .public-shell > .container{align-items:flex-start!important;}
}
@media(max-width:640px){
    .public-topbar{
        position:relative!important;
        top:auto!important;
        left:auto!important;
        transform:none!important;
        width:calc(100vw - 20px)!important;
        margin:10px auto 0!important;
        flex-wrap:wrap!important;
        justify-content:center!important;
    }
    .public-shell > .container{padding:14px 10px 20px!important;}
    .login-redesign.login-product-home{width:100%!important;max-width:100%!important;gap:16px!important;}
    .login-product-home .product-landing-panel{padding:20px!important;}
    .login-product-home .login-stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    .login-product-home .resource-list{grid-template-columns:1fr!important;}
    .login-product-home .resource-footer-card{max-height:none!important;}
    .public-footer{width:calc(100vw - 20px)!important;display:block!important;}
    .messages{position:static!important;transform:none!important;width:100%!important;margin-bottom:12px!important;}
}
@media(max-width:420px){
    .login-product-home .login-stats-strip{grid-template-columns:1fr!important;}
    .public-body .theme-toggle{width:100%!important;}
}

/* v26 - Home/login proporcional, responsiva e sem travamento de rolagem */
html, body{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
}
body.public-body{
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
}
.public-shell{
    min-height:100vh!important;
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
}
.public-topbar{
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    width:min(1180px,calc(100% - 32px))!important;
    max-width:1180px!important;
    margin:14px auto 0!important;
    border-radius:22px!important;
    padding:10px 14px!important;
    z-index:50!important;
}
.public-topbar .brand{max-width:calc(100% - 150px)!important;}
.public-topbar .brand img{width:36px!important;height:36px!important;flex:0 0 auto!important;}
.public-topbar .brand span{font-size:15px!important;white-space:nowrap!important;}
.public-topbar .brand small{font-size:10px!important;white-space:nowrap!important;}
.public-body .theme-toggle{
    display:inline-flex!important;
    visibility:visible!important;
    opacity:1!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:126px!important;
    padding:10px 14px!important;
    border-radius:999px!important;
    z-index:60!important;
    white-space:nowrap!important;
}
.public-shell > .container{
    flex:1 0 auto!important;
    width:100%!important;
    max-width:1280px!important;
    margin:0 auto!important;
    padding:28px 24px 24px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
}
.login-redesign.login-product-home{
    width:100%!important;
    max-width:1120px!important;
    margin:0 auto!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,580px) minmax(360px,410px)!important;
    gap:28px!important;
    align-items:center!important;
    justify-content:center!important;
    transform:translateX(18px);
}
.login-product-home .product-landing-panel,
.login-product-home .login-access-card{
    width:100%!important;
    min-width:0!important;
    align-self:center!important;
    border-radius:24px!important;
    box-shadow:0 20px 56px rgba(0,0,0,.18)!important;
}
.login-product-home .product-landing-panel{
    max-width:580px!important;
    padding:24px 26px!important;
    min-height:0!important;
    text-align:center!important;
    justify-self:end!important;
}
.login-product-home .login-about-symbol{
    width:44px!important;
    height:44px!important;
    min-height:44px!important;
    line-height:44px!important;
    font-size:24px!important;
    margin:0 auto 10px!important;
}
.login-product-home .product-landing-panel h1{
    font-size:clamp(2.15rem,3.8vw,3.25rem)!important;
    line-height:1.02!important;
    letter-spacing:-.045em!important;
    max-width:520px!important;
    margin:8px auto 14px!important;
}
.login-product-home .eyebrow{
    max-width:520px!important;
    margin:0 auto 6px!important;
    font-size:11px!important;
    line-height:1.45!important;
    letter-spacing:.18em!important;
}
.login-product-home .impact-banner{
    padding:10px 18px!important;
    margin:8px auto 18px!important;
    font-size:14px!important;
    border-radius:999px!important;
}
.login-product-home .login-stats-strip{
    width:100%!important;
    max-width:520px!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px!important;
    margin:0 auto 16px!important;
}
.login-product-home .login-stats-strip div{
    min-width:0!important;
    padding:11px 8px!important;
    border-radius:16px!important;
}
.login-product-home .login-stats-strip span{
    font-size:18px!important;
    line-height:1!important;
}
.login-product-home .login-stats-strip strong{
    font-size:17px!important;
    line-height:1.15!important;
}
.login-product-home .login-stats-strip small{
    font-size:11px!important;
    line-height:1.15!important;
}
.login-product-home .resource-footer-card{
    width:100%!important;
    max-width:520px!important;
    margin:0 auto!important;
    padding:18px 20px!important;
    max-height:none!important;
    overflow:visible!important;
    border-radius:20px!important;
}
.login-product-home .resource-footer-card h3{
    margin:0 0 10px!important;
    font-size:16px!important;
}
.login-product-home .resource-list{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px 16px!important;
}
.login-product-home .resource-list span{
    font-size:13px!important;
    line-height:1.25!important;
}
.login-product-home .login-access-card{
    max-width:410px!important;
    padding:22px!important;
    justify-self:start!important;
}
.login-card-head{
    align-items:center!important;
    gap:14px!important;
    margin-bottom:14px!important;
}
.login-card-head img{
    width:62px!important;
    height:62px!important;
    flex:0 0 62px!important;
}
.login-card-head h2{
    font-size:23px!important;
    margin:2px 0 0!important;
}
.login-access-card label{margin-top:12px!important;}
.login-access-card input{padding:12px 13px!important;}
.login-access-card button[type="submit"]{
    width:100%!important;
    margin-top:14px!important;
    padding:13px 16px!important;
}
.public-access-alert{
    padding:14px 16px!important;
    border-radius:18px!important;
    margin:10px 0 18px!important;
}
.login-wa-button{width:100%!important;justify-content:center!important;margin-top:10px!important;}
.messages{
    position:fixed!important;
    right:22px!important;
    left:auto!important;
    top:88px!important;
    transform:none!important;
    width:min(360px,calc(100vw - 44px))!important;
    z-index:10001!important;
    margin:0!important;
}
.messages .flash{
    margin:0 0 10px!important;
    padding:12px 14px!important;
    border-radius:16px!important;
    box-shadow:0 16px 42px rgba(0,0,0,.20)!important;
    backdrop-filter:blur(10px)!important;
}
.messages .flash.success,
.messages .flash.info,
.messages .flash.message{
    background:rgba(15,35,62,.86)!important;
    border:1px solid rgba(214,170,72,.34)!important;
    color:#fff!important;
}
.messages .flash.error,
.messages .flash.danger{
    background:rgba(150,48,48,.88)!important;
    border:1px solid rgba(255,255,255,.18)!important;
    color:#fff!important;
}
.public-footer{
    flex:0 0 auto!important;
    width:min(1180px,calc(100% - 32px))!important;
    max-width:1180px!important;
    margin:0 auto 18px!important;
    padding:16px 20px!important;
    border-radius:18px!important;
}
.public-footer *{max-width:100%!important;}

@media(max-width:1180px){
    .login-redesign.login-product-home{
        max-width:1040px!important;
        grid-template-columns:minmax(0,540px) minmax(340px,390px)!important;
        gap:22px!important;
        transform:none!important;
    }
    .login-product-home .product-landing-panel{max-width:540px!important;}
}
@media(max-width:980px){
    .public-topbar{width:calc(100% - 24px)!important;}
    .public-topbar .brand{max-width:100%!important;}
    .public-shell > .container{
        padding:22px 14px 24px!important;
        align-items:flex-start!important;
    }
    .login-redesign.login-product-home{
        width:100%!important;
        max-width:720px!important;
        grid-template-columns:1fr!important;
        gap:18px!important;
    }
    .login-product-home .product-landing-panel,
    .login-product-home .login-access-card{
        max-width:100%!important;
        justify-self:center!important;
    }
    .login-product-home .login-access-card{max-width:430px!important;}
    .messages{
        position:static!important;
        width:100%!important;
        max-width:720px!important;
        margin:0 auto 14px!important;
        transform:none!important;
    }
}
@media(max-width:680px){
    .public-topbar{
        flex-wrap:wrap!important;
        justify-content:center!important;
        gap:10px!important;
        margin-top:10px!important;
    }
    .public-topbar .brand{
        width:100%!important;
        justify-content:center!important;
        text-align:center!important;
    }
    .public-topbar .brand span,
    .public-topbar .brand small{white-space:normal!important;}
    .public-body .theme-toggle{min-width:180px!important;}
    .login-product-home .product-landing-panel{padding:20px!important;}
    .login-product-home .product-landing-panel h1{
        font-size:clamp(2rem,11vw,2.8rem)!important;
    }
    .login-product-home .login-stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    .login-product-home .resource-list{grid-template-columns:1fr!important;}
    .login-product-home .login-access-card{padding:20px!important;}
    .public-footer{width:calc(100% - 20px)!important;display:block!important;text-align:left!important;}
}
@media(max-width:420px){
    .public-shell > .container{padding:16px 10px 20px!important;}
    .login-product-home .login-stats-strip{grid-template-columns:1fr!important;}
    .public-body .theme-toggle{width:100%!important;}
    .login-card-head img{width:54px!important;height:54px!important;flex-basis:54px!important;}
}

/* v27 — correção mensalidade BRL, 7 temas institucionais e login mais limpo */
html{
    transition:background-color .28s ease, color .28s ease;
}
html[data-theme="classic"]{
    --bg:#efe2ca;
    --panel:#fff7e7;
    --panel2:#f7ead4;
    --text:#24180d;
    --muted:#6d5b42;
    --gold:#a87313;
    --gold2:#d6aa48;
    --danger:#9c3f35;
    --ok:#277746;
    --border:rgba(168,115,19,.28);
    --theme-bg:linear-gradient(135deg,rgba(242,229,204,.95),rgba(255,248,231,.92)),url('/static/bg_masonic_sp_login.png') center/cover fixed no-repeat;
    --theme-panel:linear-gradient(145deg,rgba(255,250,236,.96),rgba(247,232,201,.93));
    --theme-panel-strong:linear-gradient(145deg,#fff9ea,#f3dfb8);
    --theme-header:linear-gradient(90deg,rgba(59,39,15,.96),rgba(154,105,27,.92));
    --theme-sidebar:linear-gradient(180deg,rgba(48,32,16,.98),rgba(16,12,8,.98));
    --theme-button:linear-gradient(135deg,#9a6618,#d6aa48);
    --theme-shadow:0 22px 58px rgba(78,50,12,.20);
    --theme-mark:rgba(168,115,19,.12);
}
html[data-theme="royal"]{
    --bg:#081a33;
    --panel:#10294b;
    --panel2:#153762;
    --text:#f8fbff;
    --muted:#c8d5e8;
    --gold:#d7b15b;
    --gold2:#f1d487;
    --danger:#c75d55;
    --ok:#50b87b;
    --border:rgba(215,177,91,.34);
    --theme-bg:radial-gradient(circle at top,rgba(38,87,143,.42),transparent 35%),linear-gradient(135deg,#06172f,#0d2b51 52%,#08101f);
    --theme-panel:linear-gradient(145deg,rgba(15,42,76,.95),rgba(7,22,43,.94));
    --theme-panel-strong:linear-gradient(145deg,#123968,#08203f);
    --theme-header:linear-gradient(90deg,#06172f,#0f3b70,#06172f);
    --theme-sidebar:linear-gradient(180deg,#06172f,#08101f);
    --theme-button:linear-gradient(135deg,#0b3a72,#d7b15b);
    --theme-shadow:0 22px 58px rgba(0,13,34,.34);
    --theme-mark:rgba(215,177,91,.10);
}
html[data-theme="obsidian"]{
    --bg:#07080b;
    --panel:#14161d;
    --panel2:#1e222c;
    --text:#f4efe3;
    --muted:#bdb4a5;
    --gold:#c3913a;
    --gold2:#f0cd74;
    --danger:#b94c4c;
    --ok:#43a96c;
    --border:rgba(195,145,58,.32);
    --theme-bg:radial-gradient(circle at 50% 0,rgba(195,145,58,.16),transparent 32%),linear-gradient(135deg,#020304,#141821 50%,#060607);
    --theme-panel:linear-gradient(145deg,rgba(26,28,36,.96),rgba(9,10,15,.95));
    --theme-panel-strong:linear-gradient(145deg,#1d2029,#0a0b10);
    --theme-header:linear-gradient(90deg,#050608,#171b23,#050608);
    --theme-sidebar:linear-gradient(180deg,#090a0e,#030304);
    --theme-button:linear-gradient(135deg,#171717,#c3913a);
    --theme-shadow:0 24px 65px rgba(0,0,0,.42);
    --theme-mark:rgba(240,205,116,.09);
}
html[data-theme="parchment"]{
    --bg:#ead6af;
    --panel:#fff4d8;
    --panel2:#ecd3a5;
    --text:#2d1c0d;
    --muted:#715737;
    --gold:#a4661c;
    --gold2:#cf9b42;
    --danger:#984738;
    --ok:#4c7a42;
    --border:rgba(124,76,24,.30);
    --theme-bg:radial-gradient(circle at top,rgba(255,247,224,.82),transparent 36%),repeating-linear-gradient(45deg,rgba(124,76,24,.035) 0 2px,transparent 2px 12px),linear-gradient(135deg,#e7d0a5,#fbefd2 55%,#d9bd89);
    --theme-panel:linear-gradient(145deg,rgba(255,245,218,.97),rgba(232,205,157,.94));
    --theme-panel-strong:linear-gradient(145deg,#fff2cf,#dfbc7b);
    --theme-header:linear-gradient(90deg,#573315,#9f671f,#573315);
    --theme-sidebar:linear-gradient(180deg,#5a3819,#1c130a);
    --theme-button:linear-gradient(135deg,#8d581e,#d3a147);
    --theme-shadow:0 22px 58px rgba(83,48,14,.24);
    --theme-mark:rgba(124,76,24,.12);
}
html[data-theme="emerald"]{
    --bg:#06251d;
    --panel:#0e382c;
    --panel2:#164b3c;
    --text:#f3fff9;
    --muted:#c1ded3;
    --gold:#d2ad57;
    --gold2:#f0d681;
    --danger:#c95f52;
    --ok:#58c785;
    --border:rgba(210,173,87,.34);
    --theme-bg:radial-gradient(circle at top,rgba(45,128,91,.34),transparent 34%),linear-gradient(135deg,#031b15,#0d3d30 52%,#06120f);
    --theme-panel:linear-gradient(145deg,rgba(15,60,47,.96),rgba(5,28,22,.95));
    --theme-panel-strong:linear-gradient(145deg,#145342,#06261e);
    --theme-header:linear-gradient(90deg,#05251d,#0d5a44,#05251d);
    --theme-sidebar:linear-gradient(180deg,#05251d,#03110e);
    --theme-button:linear-gradient(135deg,#0d5a44,#d2ad57);
    --theme-shadow:0 22px 58px rgba(0,36,27,.35);
    --theme-mark:rgba(210,173,87,.10);
}
html[data-theme="wine"]{
    --bg:#2a0711;
    --panel:#451020;
    --panel2:#5d182b;
    --text:#fff7ef;
    --muted:#e3c7bd;
    --gold:#d7aa57;
    --gold2:#f0d280;
    --danger:#d85f66;
    --ok:#69bd7a;
    --border:rgba(215,170,87,.34);
    --theme-bg:radial-gradient(circle at top,rgba(110,22,45,.42),transparent 35%),linear-gradient(135deg,#19040a,#4b1022 52%,#140308);
    --theme-panel:linear-gradient(145deg,rgba(73,16,34,.96),rgba(31,5,13,.95));
    --theme-panel-strong:linear-gradient(145deg,#5d182b,#250710);
    --theme-header:linear-gradient(90deg,#210711,#65172d,#210711);
    --theme-sidebar:linear-gradient(180deg,#2a0711,#120307);
    --theme-button:linear-gradient(135deg,#65172d,#d7aa57);
    --theme-shadow:0 22px 58px rgba(45,0,16,.38);
    --theme-mark:rgba(240,210,128,.10);
}
html[data-theme="silver"]{
    --bg:#dbe3ea;
    --panel:#f7fafc;
    --panel2:#e9eef3;
    --text:#17202a;
    --muted:#526070;
    --gold:#8d9ca8;
    --gold2:#2c5a83;
    --danger:#a94442;
    --ok:#2f7d58;
    --border:rgba(44,90,131,.24);
    --theme-bg:radial-gradient(circle at top,rgba(255,255,255,.8),transparent 38%),linear-gradient(135deg,#d8e1ea,#f8fafc 54%,#c2ced9);
    --theme-panel:linear-gradient(145deg,rgba(255,255,255,.97),rgba(229,236,243,.94));
    --theme-panel-strong:linear-gradient(145deg,#ffffff,#d9e3ed);
    --theme-header:linear-gradient(90deg,#263747,#49657e,#263747);
    --theme-sidebar:linear-gradient(180deg,#263747,#131b24);
    --theme-button:linear-gradient(135deg,#2c5a83,#aebbc7);
    --theme-shadow:0 22px 58px rgba(52,72,88,.22);
    --theme-mark:rgba(44,90,131,.10);
}
html[data-theme] body{
    background:var(--theme-bg)!important;
    color:var(--text)!important;
    transition:background .28s ease,color .28s ease;
}
html[data-theme] body::before{
    background:url('/static/bg_masonic.png') center 110px/540px no-repeat!important;
    opacity:.075!important;
    filter:none!important;
}
html[data-theme] body.public-body::before{
    background:url('/static/bg_masonic_sp_login.png') center/cover fixed no-repeat!important;
    opacity:.13!important;
}
html[data-theme] .card,
html[data-theme] .login-access-card,
html[data-theme] .product-landing-panel,
html[data-theme] .resource-footer-card,
html[data-theme] .stat,
html[data-theme] .candidate-pay-card,
html[data-theme] .position-card,
html[data-theme] .degree-card,
html[data-theme] .book-card,
html[data-theme] .settings-panel,
html[data-theme] .nested,
html[data-theme] .calendar-day,
html[data-theme] .month-tile,
html[data-theme] table{
    background:var(--theme-panel)!important;
    color:var(--text)!important;
    border-color:var(--border)!important;
    box-shadow:var(--theme-shadow)!important;
}
html[data-theme] .topbar,
html[data-theme] .app-header,
html[data-theme] .public-topbar{
    background:var(--theme-header)!important;
    border-color:var(--border)!important;
    color:#fff!important;
}
html[data-theme] .sidebar{background:var(--theme-sidebar)!important;border-color:var(--border)!important;}
html[data-theme] button,
html[data-theme] .button,
html[data-theme] .action.accent,
html[data-theme] .side-nav .admin-link,
html[data-theme] .topbar .admin-link,
html[data-theme] .month-tile.active,
html[data-theme] .login-access-card button[type="submit"]{
    background:var(--theme-button)!important;
    color:#fff!important;
    border-color:var(--border)!important;
}
html[data-theme="classic"] button,
html[data-theme="classic"] .button,
html[data-theme="classic"] .action.accent,
html[data-theme="classic"] .side-nav .admin-link,
html[data-theme="classic"] .topbar .admin-link,
html[data-theme="classic"] .login-access-card button[type="submit"],
html[data-theme="parchment"] button,
html[data-theme="parchment"] .button,
html[data-theme="parchment"] .action.accent,
html[data-theme="parchment"] .side-nav .admin-link,
html[data-theme="parchment"] .topbar .admin-link,
html[data-theme="parchment"] .login-access-card button[type="submit"]{color:#211508!important;}
html[data-theme] input,
html[data-theme] select,
html[data-theme] textarea{
    background:rgba(255,255,255,.78)!important;
    color:var(--text)!important;
    border-color:var(--border)!important;
}
html[data-theme="royal"] input,
html[data-theme="royal"] select,
html[data-theme="royal"] textarea,
html[data-theme="obsidian"] input,
html[data-theme="obsidian"] select,
html[data-theme="obsidian"] textarea,
html[data-theme="emerald"] input,
html[data-theme="emerald"] select,
html[data-theme="emerald"] textarea,
html[data-theme="wine"] input,
html[data-theme="wine"] select,
html[data-theme="wine"] textarea{
    background:rgba(0,0,0,.25)!important;
    color:var(--text)!important;
}
html[data-theme] label,
html[data-theme] h1,
html[data-theme] h2,
html[data-theme] h3,
html[data-theme] p,
html[data-theme] td{color:var(--text)!important;}
html[data-theme] .hint,
html[data-theme] small,
html[data-theme] .muted{color:var(--muted)!important;}
html[data-theme] .eyebrow,
html[data-theme] th,
html[data-theme] a{color:var(--gold2)!important;}
html[data-theme] .impact-banner{
    background:var(--theme-panel-strong)!important;
    border-color:var(--border)!important;
    color:var(--text)!important;
}
html[data-theme] .app-footer,
html[data-theme] .public-footer{
    background:var(--theme-panel)!important;
    color:var(--text)!important;
    border-color:var(--border)!important;
    box-shadow:var(--theme-shadow)!important;
}
.theme-selector{
    width:auto!important;
    min-width:190px!important;
    max-width:240px!important;
    padding:10px 38px 10px 13px!important;
    border-radius:999px!important;
    border:1px solid var(--border)!important;
    background:var(--theme-panel-strong,var(--panel2))!important;
    color:var(--text)!important;
    font-weight:800!important;
    cursor:pointer!important;
    outline:none!important;
    box-shadow:0 10px 28px rgba(0,0,0,.12)!important;
}
.public-body .theme-selector{display:inline-block!important;visibility:visible!important;opacity:1!important;z-index:60!important;}
.footer-support-link{display:inline-flex;align-items:center;gap:5px;font-weight:800;white-space:nowrap;}
.login-clean-hint{
    margin:4px 0 12px!important;
    padding:10px 12px!important;
    border-radius:14px!important;
    background:rgba(255,255,255,.08)!important;
    border:1px solid var(--border)!important;
    font-size:13px!important;
}
.login-product-home .login-access-card{padding:24px!important;}
.public-access-alert,.login-wa-button{display:none!important;}
.messages{
    position:fixed!important;
    right:22px!important;
    top:84px!important;
    left:auto!important;
    width:min(360px,calc(100vw - 44px))!important;
    z-index:99999!important;
}
.messages .flash{
    border-radius:16px!important;
    padding:12px 14px!important;
    box-shadow:0 16px 42px rgba(0,0,0,.22)!important;
    backdrop-filter:blur(10px)!important;
}
/* Melhor proporção da home/login */
.public-shell > .container{max-width:1240px!important;padding:24px 20px!important;}
.login-redesign.login-product-home{
    max-width:1080px!important;
    grid-template-columns:minmax(0,560px) minmax(340px,400px)!important;
    gap:24px!important;
    transform:none!important;
}
.login-product-home .product-landing-panel{max-width:560px!important;padding:22px 24px!important;}
.login-product-home .product-landing-panel h1{font-size:clamp(2rem,3.35vw,3rem)!important;}
.login-product-home .login-access-card{max-width:400px!important;}
@media(max-width:980px){
    .theme-selector{min-width:170px!important;max-width:100%!important;}
    .login-redesign.login-product-home{grid-template-columns:1fr!important;max-width:720px!important;}
    .login-product-home .login-access-card{max-width:430px!important;}
    .messages{position:static!important;width:100%!important;margin:0 auto 12px!important;}
}
@media(max-width:680px){
    .theme-selector{width:100%!important;}
    .login-product-home .product-landing-panel h1{font-size:clamp(1.85rem,10vw,2.55rem)!important;}
}


/* v28 — temas com backgrounds exclusivos, contraste forte e home/login proporcional */
html, body{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden!important;
}
html{
    --app-bg-image:url('/static/backgrounds/classico-maconico.webp');
    --bg-overlay:rgba(255,248,232,.62);
    --text-primary:#21170c;
    --text-secondary:#5d4b32;
    --text-muted:#6d5b42;
    --text-on-card:#21170c;
    --text-on-button:#1d1409;
    --text-on-primary:#ffffff;
    --card-bg:rgba(255,249,235,.88);
    --card-bg-strong:rgba(255,246,226,.96);
    --card-border:rgba(162,111,28,.28);
    --button-bg:linear-gradient(135deg,#9d681a,#d6aa48);
    --button-text:#1d1409;
    --navbar-bg:rgba(49,34,16,.86);
    --navbar-text:#fff7e8;
    --sidebar-bg:linear-gradient(180deg,rgba(50,34,17,.96),rgba(16,12,8,.97));
    --sidebar-text:#fff1d7;
    --alert-bg:rgba(255,241,206,.94);
    --alert-text:#2b1c0c;
    --decor-accent:#d6aa48;
    --shadow-soft:0 22px 58px rgba(58,37,8,.18);
}
html[data-theme="classic"]{
    --app-bg-image:url('/static/backgrounds/classico-maconico.webp');
    --bg-overlay:rgba(255,248,232,.58);
    --text-primary:#21170c; --text-secondary:#5f4a2e; --text-muted:#735d3e; --text-on-card:#21170c;
    --card-bg:rgba(255,249,235,.88); --card-bg-strong:rgba(255,246,226,.96); --card-border:rgba(162,111,28,.30);
    --button-bg:linear-gradient(135deg,#9d681a,#d6aa48); --button-text:#1d1409;
    --navbar-bg:rgba(55,37,16,.88); --navbar-text:#fff7e8;
    --sidebar-bg:linear-gradient(180deg,rgba(54,37,18,.97),rgba(17,12,8,.98)); --sidebar-text:#fff1d7;
    --alert-bg:rgba(255,241,206,.94); --alert-text:#2b1c0c; --decor-accent:#d6aa48;
}
html[data-theme="royal"]{
    --app-bg-image:url('/static/backgrounds/azul-real.webp');
    --bg-overlay:rgba(5,20,48,.52);
    --text-primary:#f8fbff; --text-secondary:#d5e2f2; --text-muted:#c3d0e3; --text-on-card:#f8fbff;
    --card-bg:rgba(8,30,64,.84); --card-bg-strong:rgba(11,41,84,.94); --card-border:rgba(215,177,91,.35);
    --button-bg:linear-gradient(135deg,#0d3f7c,#d7b15b); --button-text:#ffffff;
    --navbar-bg:rgba(6,22,49,.90); --navbar-text:#ffffff;
    --sidebar-bg:linear-gradient(180deg,rgba(6,22,49,.98),rgba(5,12,25,.98)); --sidebar-text:#eaf3ff;
    --alert-bg:rgba(12,43,84,.94); --alert-text:#ffffff; --decor-accent:#f1d487;
}
html[data-theme="obsidian"]{
    --app-bg-image:url('/static/backgrounds/noite-obsidiana.webp');
    --bg-overlay:rgba(0,0,0,.46);
    --text-primary:#f4efe3; --text-secondary:#ddd2bf; --text-muted:#c5bba9; --text-on-card:#f4efe3;
    --card-bg:rgba(16,18,24,.84); --card-bg-strong:rgba(22,24,32,.94); --card-border:rgba(195,145,58,.34);
    --button-bg:linear-gradient(135deg,#171717,#c3913a); --button-text:#ffffff;
    --navbar-bg:rgba(4,5,8,.90); --navbar-text:#ffffff;
    --sidebar-bg:linear-gradient(180deg,rgba(8,9,13,.98),rgba(2,2,3,.98)); --sidebar-text:#f5eddc;
    --alert-bg:rgba(31,28,22,.94); --alert-text:#fff3d8; --decor-accent:#f0cd74;
}
html[data-theme="parchment"]{
    --app-bg-image:url('/static/backgrounds/pergaminho-imperial.webp');
    --bg-overlay:rgba(255,236,192,.50);
    --text-primary:#2e1d0d; --text-secondary:#664928; --text-muted:#75583a; --text-on-card:#2e1d0d;
    --card-bg:rgba(255,241,208,.86); --card-bg-strong:rgba(255,235,191,.96); --card-border:rgba(133,83,25,.30);
    --button-bg:linear-gradient(135deg,#8d581e,#d3a147); --button-text:#241506;
    --navbar-bg:rgba(88,53,20,.88); --navbar-text:#fff5df;
    --sidebar-bg:linear-gradient(180deg,rgba(91,56,23,.97),rgba(28,19,10,.98)); --sidebar-text:#fff0d2;
    --alert-bg:rgba(255,236,191,.94); --alert-text:#2e1d0d; --decor-accent:#cf9b42;
}
html[data-theme="emerald"]{
    --app-bg-image:url('/static/backgrounds/verde-esmeralda.webp');
    --bg-overlay:rgba(4,30,24,.40);
    --text-primary:#f3fff9; --text-secondary:#d4eee3; --text-muted:#c1ded3; --text-on-card:#f3fff9;
    --card-bg:rgba(9,51,40,.82); --card-bg-strong:rgba(14,64,50,.94); --card-border:rgba(210,173,87,.34);
    --button-bg:linear-gradient(135deg,#0d5a44,#d2ad57); --button-text:#ffffff;
    --navbar-bg:rgba(5,36,28,.90); --navbar-text:#ffffff;
    --sidebar-bg:linear-gradient(180deg,rgba(5,36,28,.98),rgba(3,17,14,.98)); --sidebar-text:#edfff7;
    --alert-bg:rgba(10,55,43,.94); --alert-text:#f8fff9; --decor-accent:#f0d681;
}
html[data-theme="wine"]{
    --app-bg-image:url('/static/backgrounds/vinho-nobre.webp');
    --bg-overlay:rgba(44,5,15,.36);
    --text-primary:#fff7ef; --text-secondary:#f1d9cf; --text-muted:#e3c7bd; --text-on-card:#fff7ef;
    --card-bg:rgba(71,13,30,.82); --card-bg-strong:rgba(85,18,39,.94); --card-border:rgba(215,170,87,.35);
    --button-bg:linear-gradient(135deg,#68172e,#d7aa57); --button-text:#ffffff;
    --navbar-bg:rgba(34,6,15,.90); --navbar-text:#fff4eb;
    --sidebar-bg:linear-gradient(180deg,rgba(42,7,17,.98),rgba(18,3,7,.98)); --sidebar-text:#fff1e8;
    --alert-bg:rgba(85,18,39,.94); --alert-text:#fff7ef; --decor-accent:#f0d280;
}
html[data-theme="silver"]{
    --app-bg-image:url('/static/backgrounds/prata-celestial.webp');
    --bg-overlay:rgba(241,246,250,.42);
    --text-primary:#17202a; --text-secondary:#425061; --text-muted:#566677; --text-on-card:#17202a;
    --card-bg:rgba(255,255,255,.80); --card-bg-strong:rgba(250,253,255,.94); --card-border:rgba(44,90,131,.24);
    --button-bg:linear-gradient(135deg,#2c5a83,#aebbc7); --button-text:#ffffff;
    --navbar-bg:rgba(38,55,71,.88); --navbar-text:#ffffff;
    --sidebar-bg:linear-gradient(180deg,rgba(38,55,71,.97),rgba(19,27,36,.98)); --sidebar-text:#f3f7fa;
    --alert-bg:rgba(248,252,255,.94); --alert-text:#17202a; --decor-accent:#2c5a83;
}
html[data-theme] body{
    min-height:100vh!important;
    color:var(--text-primary)!important;
    background-color:var(--bg)!important;
    background-image:var(--app-bg-image)!important;
    background-size:cover!important;
    background-position:center!important;
    background-repeat:no-repeat!important;
    background-attachment:fixed!important;
    transition:background-image .35s ease, background-color .35s ease, color .25s ease!important;
}
html[data-theme] body::before{
    content:""!important;
    position:fixed!important;
    inset:0!important;
    background:var(--bg-overlay)!important;
    opacity:1!important;
    pointer-events:none!important;
    z-index:-1!important;
    filter:none!important;
}
html[data-theme] body::after{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:-1;
    background:radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--decor-accent) 16%, transparent), transparent 28%), radial-gradient(circle at 82% 82%, rgba(255,255,255,.08), transparent 30%);
}
html[data-theme] .page-shell,
html[data-theme] .public-shell{background:transparent!important;}
html[data-theme] .container{max-width:1280px;}
html[data-theme] .card,
html[data-theme] .login-access-card,
html[data-theme] .product-landing-panel,
html[data-theme] .resource-footer-card,
html[data-theme] .nested,
html[data-theme] .stat,
html[data-theme] .dashboard-action-grid .action,
html[data-theme] .action,
html[data-theme] .candidate-pay-card,
html[data-theme] .position-card,
html[data-theme] .degree-card,
html[data-theme] .book-card,
html[data-theme] .settings-panel,
html[data-theme] .calendar-day,
html[data-theme] .month-tile,
html[data-theme] .history-degree,
html[data-theme] table{
    background:var(--card-bg)!important;
    color:var(--text-on-card)!important;
    border-color:var(--card-border)!important;
    box-shadow:var(--shadow-soft)!important;
    backdrop-filter:blur(14px)!important;
}
html[data-theme] .app-header,
html[data-theme] .topbar,
html[data-theme] .public-topbar{
    background:var(--navbar-bg)!important;
    color:var(--navbar-text)!important;
    border-color:var(--card-border)!important;
    backdrop-filter:blur(14px)!important;
}
html[data-theme] .sidebar{
    background:var(--sidebar-bg)!important;
    color:var(--sidebar-text)!important;
    border-color:var(--card-border)!important;
}
html[data-theme] .side-brand,
html[data-theme] .side-nav a,
html[data-theme] .desktop-header-nav a,
html[data-theme] .header-user,
html[data-theme] .brand,
html[data-theme] .brand span,
html[data-theme] .brand small{
    color:inherit!important;
}
html[data-theme] h1,
html[data-theme] h2,
html[data-theme] h3,
html[data-theme] h4,
html[data-theme] p,
html[data-theme] li,
html[data-theme] label,
html[data-theme] td,
html[data-theme] .card strong,
html[data-theme] .action strong,
html[data-theme] .login-stats-strip strong,
html[data-theme] .resource-list span,
html[data-theme] .person-name-link{
    color:var(--text-primary)!important;
    opacity:1!important;
}
html[data-theme="royal"] h1, html[data-theme="royal"] h2, html[data-theme="royal"] h3, html[data-theme="royal"] p, html[data-theme="royal"] label, html[data-theme="royal"] td, html[data-theme="royal"] .card strong, html[data-theme="royal"] .action strong, html[data-theme="royal"] .resource-list span,
html[data-theme="obsidian"] h1, html[data-theme="obsidian"] h2, html[data-theme="obsidian"] h3, html[data-theme="obsidian"] p, html[data-theme="obsidian"] label, html[data-theme="obsidian"] td, html[data-theme="obsidian"] .card strong, html[data-theme="obsidian"] .action strong, html[data-theme="obsidian"] .resource-list span,
html[data-theme="emerald"] h1, html[data-theme="emerald"] h2, html[data-theme="emerald"] h3, html[data-theme="emerald"] p, html[data-theme="emerald"] label, html[data-theme="emerald"] td, html[data-theme="emerald"] .card strong, html[data-theme="emerald"] .action strong, html[data-theme="emerald"] .resource-list span,
html[data-theme="wine"] h1, html[data-theme="wine"] h2, html[data-theme="wine"] h3, html[data-theme="wine"] p, html[data-theme="wine"] label, html[data-theme="wine"] td, html[data-theme="wine"] .card strong, html[data-theme="wine"] .action strong, html[data-theme="wine"] .resource-list span{
    color:var(--text-primary)!important;
}
html[data-theme] small,
html[data-theme] .hint,
html[data-theme] .muted,
html[data-theme] .action small,
html[data-theme] .login-stats-strip small{color:var(--text-muted)!important;opacity:1!important;}
html[data-theme="royal"] small, html[data-theme="royal"] .hint, html[data-theme="royal"] .muted, html[data-theme="royal"] .action small, html[data-theme="royal"] .login-stats-strip small,
html[data-theme="obsidian"] small, html[data-theme="obsidian"] .hint, html[data-theme="obsidian"] .muted, html[data-theme="obsidian"] .action small, html[data-theme="obsidian"] .login-stats-strip small,
html[data-theme="emerald"] small, html[data-theme="emerald"] .hint, html[data-theme="emerald"] .muted, html[data-theme="emerald"] .action small, html[data-theme="emerald"] .login-stats-strip small,
html[data-theme="wine"] small, html[data-theme="wine"] .hint, html[data-theme="wine"] .muted, html[data-theme="wine"] .action small, html[data-theme="wine"] .login-stats-strip small{color:var(--text-secondary)!important;}
html[data-theme] a,
html[data-theme] .eyebrow,
html[data-theme] th{color:var(--decor-accent)!important;}
html[data-theme] button,
html[data-theme] .button,
html[data-theme] .action.accent,
html[data-theme] .side-nav .admin-link,
html[data-theme] .topbar .admin-link,
html[data-theme] .mobile-menu-button,
html[data-theme] .login-access-card button[type="submit"]{
    background:var(--button-bg)!important;
    color:var(--button-text)!important;
    border:1px solid color-mix(in srgb, var(--decor-accent) 40%, transparent)!important;
    box-shadow:0 12px 28px rgba(0,0,0,.18)!important;
}
html[data-theme="classic"] button, html[data-theme="classic"] .button, html[data-theme="classic"] .action.accent, html[data-theme="classic"] .login-access-card button[type="submit"],
html[data-theme="parchment"] button, html[data-theme="parchment"] .button, html[data-theme="parchment"] .action.accent, html[data-theme="parchment"] .login-access-card button[type="submit"]{color:#1d1409!important;}
html[data-theme] input,
html[data-theme] select,
html[data-theme] textarea{
    background:var(--card-bg-strong)!important;
    color:var(--text-primary)!important;
    border:1px solid var(--card-border)!important;
    box-shadow:none!important;
}
html[data-theme="royal"] input, html[data-theme="royal"] select, html[data-theme="royal"] textarea,
html[data-theme="obsidian"] input, html[data-theme="obsidian"] select, html[data-theme="obsidian"] textarea,
html[data-theme="emerald"] input, html[data-theme="emerald"] select, html[data-theme="emerald"] textarea,
html[data-theme="wine"] input, html[data-theme="wine"] select, html[data-theme="wine"] textarea{
    background:rgba(255,255,255,.10)!important;
    color:#fff!important;
}
html[data-theme] input::placeholder{color:color-mix(in srgb, var(--text-muted) 82%, transparent)!important;}
html[data-theme] .theme-selector{
    background:var(--card-bg-strong)!important;
    color:var(--text-primary)!important;
    border-color:var(--card-border)!important;
    font-weight:800!important;
}
html[data-theme="royal"] .theme-selector,
html[data-theme="obsidian"] .theme-selector,
html[data-theme="emerald"] .theme-selector,
html[data-theme="wine"] .theme-selector{color:#fff!important;background:rgba(0,0,0,.28)!important;}
html[data-theme] .flash,
html[data-theme] .access-alert{
    background:var(--alert-bg)!important;
    color:var(--alert-text)!important;
    border:1px solid var(--card-border)!important;
    border-radius:16px!important;
}
html[data-theme] .flash.error,
html[data-theme] .access-alert.danger{background:rgba(180,68,68,.92)!important;color:#fff!important;}
html[data-theme] .flash.success{background:rgba(47,139,87,.90)!important;color:#fff!important;}
html[data-theme] .app-footer,
html[data-theme] .public-footer{
    background:var(--card-bg)!important;
    color:var(--text-primary)!important;
    border:1px solid var(--card-border)!important;
    box-shadow:var(--shadow-soft)!important;
    backdrop-filter:blur(14px)!important;
}
/* Home/login limpos, centralizados e sem overflow */
body.public-body{
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
}
.public-shell{
    min-height:100vh!important;
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
}
.public-topbar{
    width:min(1180px, calc(100% - 32px))!important;
    margin:14px auto 0!important;
    padding:10px 14px!important;
    border-radius:22px!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    z-index:50!important;
}
.public-topbar .brand{min-width:0!important;max-width:calc(100% - 220px)!important;}
.public-topbar .brand img{width:38px!important;height:38px!important;}
.public-topbar .brand span{font-size:15px!important;white-space:nowrap!important;}
.public-topbar .brand small{font-size:10px!important;white-space:nowrap!important;}
.public-shell > .container{
    flex:1 0 auto!important;
    width:100%!important;
    max-width:1280px!important;
    margin:0 auto!important;
    padding:26px 22px 24px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
}
.login-redesign.login-product-home{
    width:100%!important;
    max-width:1120px!important;
    margin:0 auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,560px) minmax(360px,405px)!important;
    gap:28px!important;
    align-items:center!important;
    justify-content:center!important;
    transform:translateX(10px)!important;
}
.login-product-home .product-landing-panel{
    justify-self:end!important;
    max-width:560px!important;
    padding:22px 24px!important;
    border-radius:26px!important;
    text-align:center!important;
}
.login-product-home .login-access-card{
    justify-self:start!important;
    max-width:405px!important;
    padding:24px!important;
    border-radius:26px!important;
}
.login-product-home .login-about-symbol{width:42px!important;height:42px!important;min-height:42px!important;line-height:42px!important;font-size:23px!important;margin:0 auto 8px!important;color:var(--decor-accent)!important;}
.login-product-home .product-landing-panel h1{
    font-size:clamp(2rem,3.2vw,2.95rem)!important;
    line-height:1.02!important;
    letter-spacing:-.045em!important;
    margin:8px auto 12px!important;
    max-width:500px!important;
}
.login-product-home .eyebrow{font-size:10.5px!important;letter-spacing:.18em!important;line-height:1.45!important;max-width:500px!important;margin:0 auto 6px!important;}
.login-product-home .impact-banner{display:inline-flex!important;padding:9px 16px!important;margin:6px auto 16px!important;border-radius:999px!important;font-size:13.5px!important;background:var(--card-bg-strong)!important;border:1px solid var(--card-border)!important;color:var(--text-primary)!important;}
.login-product-home .login-stats-strip{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;max-width:505px!important;margin:0 auto 15px!important;}
.login-product-home .login-stats-strip div{padding:10px 7px!important;border-radius:15px!important;background:var(--card-bg-strong)!important;border:1px solid var(--card-border)!important;min-width:0!important;}
.login-product-home .login-stats-strip span{font-size:17px!important;display:block!important;line-height:1!important;margin-bottom:5px!important;}
.login-product-home .login-stats-strip strong{font-size:16px!important;line-height:1.05!important;display:block!important;}
.login-product-home .login-stats-strip small{font-size:11px!important;line-height:1.15!important;display:block!important;margin-top:3px!important;}
.login-product-home .resource-footer-card{max-width:505px!important;margin:0 auto!important;padding:16px!important;border-radius:18px!important;max-height:none!important;overflow:visible!important;}
.login-product-home .resource-footer-card h3{font-size:17px!important;margin:0 0 10px!important;}
.login-product-home .resource-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px 16px!important;text-align:left!important;}
.login-product-home .resource-list span{font-size:13px!important;line-height:1.25!important;}
.login-card-head{gap:12px!important;margin-bottom:12px!important;}
.login-card-head img{width:56px!important;height:56px!important;flex:0 0 56px!important;}
.login-access-card h2{font-size:1.35rem!important;margin:.15em 0 .2em!important;}
.login-clean-hint{font-size:12.5px!important;margin:0 0 12px!important;padding:9px 11px!important;background:var(--card-bg-strong)!important;color:var(--text-secondary)!important;border:1px solid var(--card-border)!important;border-radius:14px!important;}
.login-access-card label{margin-top:8px!important;font-size:13.5px!important;}
.login-access-card input{padding:11px 12px!important;border-radius:13px!important;}
.login-access-card button[type="submit"]{width:100%!important;margin-top:10px!important;padding:12px 14px!important;border-radius:13px!important;}
.public-access-alert,.login-wa-button{display:none!important;}
.footer-support-link{display:inline-flex!important;align-items:center!important;gap:6px!important;padding:5px 9px!important;border:1px solid var(--card-border)!important;border-radius:999px!important;background:var(--card-bg-strong)!important;text-decoration:none!important;}
.public-footer{width:min(1180px, calc(100% - 32px))!important;max-width:1180px!important;margin:0 auto 16px!important;padding:16px 18px!important;border-radius:18px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;}
.messages{position:fixed!important;right:22px!important;top:84px!important;left:auto!important;transform:none!important;width:min(360px,calc(100vw - 44px))!important;margin:0!important;z-index:99999!important;}
.messages .flash{border-radius:16px!important;padding:12px 14px!important;margin:0 0 10px!important;box-shadow:0 16px 42px rgba(0,0,0,.22)!important;}
@media(max-width:1100px){
    .login-redesign.login-product-home{grid-template-columns:1fr!important;max-width:760px!important;transform:none!important;}
    .login-product-home .product-landing-panel,.login-product-home .login-access-card{justify-self:center!important;}
    .login-product-home .login-access-card{max-width:430px!important;}
    .public-shell > .container{align-items:flex-start!important;}
}
@media(max-width:760px){
    html[data-theme] body{background-attachment:scroll!important;}
    .public-topbar{width:calc(100% - 20px)!important;flex-wrap:wrap!important;justify-content:center!important;gap:10px!important;margin-top:10px!important;}
    .public-topbar .brand{width:100%!important;max-width:100%!important;justify-content:center!important;text-align:center!important;}
    .public-topbar .brand span,.public-topbar .brand small{white-space:normal!important;}
    .theme-selector{width:100%!important;max-width:320px!important;}
    .public-shell > .container{padding:16px 10px 20px!important;}
    .login-redesign.login-product-home{gap:16px!important;max-width:100%!important;}
    .login-product-home .product-landing-panel{padding:20px 16px!important;}
    .login-product-home .product-landing-panel h1{font-size:clamp(1.8rem,10vw,2.55rem)!important;}
    .login-product-home .login-stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    .login-product-home .resource-list{grid-template-columns:1fr!important;}
    .login-product-home .login-access-card{padding:20px 16px!important;max-width:100%!important;}
    .public-footer{width:calc(100% - 20px)!important;display:block!important;text-align:left!important;}
    .messages{position:static!important;width:100%!important;margin:0 auto 12px!important;}
}
@media(max-width:420px){
    .login-product-home .login-stats-strip{grid-template-columns:1fr!important;}
    .login-product-home .resource-footer-card{padding:14px!important;}
}

/* v29 — 11 temas, backgrounds exclusivos, contraste premium e refinamento geral */
html[data-theme]{
    --text-primary:var(--text);
    --text-secondary:var(--muted);
    --text-muted:var(--muted);
    --text-on-card:var(--text);
    --text-on-button:#ffffff;
    --text-on-primary:#ffffff;
    --card-bg:var(--theme-panel);
    --card-bg-soft:var(--theme-panel-strong);
    --card-border:var(--border);
    --button-bg:var(--theme-button);
    --button-text:#ffffff;
    --button-border:var(--border);
    --section-title:var(--text);
    --section-subtitle:var(--gold2);
    --navbar-text:#ffffff;
    --sidebar-text:#ffffff;
    --alert-text:var(--text);
    --badge-text:var(--text);
    --bg-overlay:rgba(0,0,0,.02);
    --app-bg-image:url('/static/backgrounds/classico-maconico.webp');
    background-color:var(--bg)!important;
}
html[data-theme="classic"]{
    --app-bg-image:url('/static/backgrounds/classico-maconico.webp');
    --bg-overlay:rgba(255,248,230,.50);
    --button-text:#1f1609;
    --text-on-button:#1f1609;
}
html[data-theme="royal"]{
    --app-bg-image:url('/static/backgrounds/azul-real.webp');
    --bg-overlay:rgba(5,18,43,.42);
}
html[data-theme="obsidian"]{
    --app-bg-image:url('/static/backgrounds/noite-obsidiana.webp');
    --bg-overlay:rgba(0,0,0,.36);
}
html[data-theme="parchment"]{
    --app-bg-image:url('/static/backgrounds/pergaminho-imperial.webp');
    --bg-overlay:rgba(255,240,205,.46);
    --button-text:#281908;
    --text-on-button:#281908;
}
html[data-theme="emerald"]{
    --app-bg-image:url('/static/backgrounds/verde-esmeralda.webp');
    --bg-overlay:rgba(3,29,22,.35);
}
html[data-theme="wine"]{
    --app-bg-image:url('/static/backgrounds/vinho-nobre.webp');
    --bg-overlay:rgba(42,4,16,.34);
}
html[data-theme="silver"]{
    --app-bg-image:url('/static/backgrounds/prata-celestial.webp');
    --bg-overlay:rgba(244,249,253,.45);
    --button-text:#0e2235;
    --text-on-button:#0e2235;
}
html[data-theme="sand"]{
    --bg:#f1e4cb;--panel:#fff9ec;--panel2:#f7ecd6;--text:#24190e;--muted:#6b5c45;--gold:#b5862f;--gold2:#8d6019;--danger:#9b4438;--ok:#387a4b;--border:rgba(181,134,47,.28);
    --theme-bg:linear-gradient(135deg,rgba(255,250,238,.78),rgba(241,228,203,.72)),url('/static/backgrounds/areia-suave.webp') center/cover fixed no-repeat;
    --theme-panel:linear-gradient(145deg,rgba(255,252,243,.96),rgba(246,235,214,.94));
    --theme-panel-strong:linear-gradient(145deg,#fffdf5,#f1e1c2);
    --theme-header:linear-gradient(90deg,#684518,#b9852e,#684518);
    --theme-sidebar:linear-gradient(180deg,#684518,#25180a);
    --theme-button:linear-gradient(135deg,#a9721e,#e0bd68);
    --theme-shadow:0 22px 55px rgba(101,70,22,.18);
    --app-bg-image:url('/static/backgrounds/areia-suave.webp');--bg-overlay:rgba(255,248,233,.50);--button-text:#201306;--text-on-button:#201306;
}
html[data-theme="mist"]{
    --bg:#e8f0f7;--panel:#fbfdff;--panel2:#e6eef7;--text:#172536;--muted:#516475;--gold:#5f86a8;--gold2:#1f5f99;--danger:#9c4d4a;--ok:#2d765a;--border:rgba(65,111,150,.24);
    --theme-bg:linear-gradient(135deg,rgba(247,252,255,.74),rgba(225,237,248,.76)),url('/static/backgrounds/azul-nevoa.webp') center/cover fixed no-repeat;
    --theme-panel:linear-gradient(145deg,rgba(255,255,255,.96),rgba(230,239,248,.94));
    --theme-panel-strong:linear-gradient(145deg,#ffffff,#dceaf5);
    --theme-header:linear-gradient(90deg,#24435e,#5f8bb1,#24435e);
    --theme-sidebar:linear-gradient(180deg,#24435e,#172636);
    --theme-button:linear-gradient(135deg,#2c668f,#96b8d4);
    --theme-shadow:0 22px 55px rgba(55,89,118,.18);
    --app-bg-image:url('/static/backgrounds/azul-nevoa.webp');--bg-overlay:rgba(246,251,255,.48);--button-text:#0f2638;--text-on-button:#0f2638;
}
html[data-theme="sage"]{
    --bg:#e4eadc;--panel:#fbfcf4;--panel2:#e8eddc;--text:#1d271d;--muted:#596650;--gold:#8c9e68;--gold2:#4f7c3d;--danger:#954c43;--ok:#316f44;--border:rgba(92,121,72,.25);
    --theme-bg:linear-gradient(135deg,rgba(252,252,242,.74),rgba(218,230,207,.74)),url('/static/backgrounds/verde-salvia.webp') center/cover fixed no-repeat;
    --theme-panel:linear-gradient(145deg,rgba(255,255,247,.96),rgba(228,237,218,.94));
    --theme-panel-strong:linear-gradient(145deg,#fffff7,#dce8cd);
    --theme-header:linear-gradient(90deg,#334d32,#7e9560,#334d32);
    --theme-sidebar:linear-gradient(180deg,#334d32,#172515);
    --theme-button:linear-gradient(135deg,#4f7742,#c2b05b);
    --theme-shadow:0 22px 55px rgba(48,74,41,.17);
    --app-bg-image:url('/static/backgrounds/verde-salvia.webp');--bg-overlay:rgba(250,250,235,.45);--button-text:#10200e;--text-on-button:#10200e;
}
html[data-theme="rose"]{
    --bg:#f3e1da;--panel:#fff8f2;--panel2:#f3ded4;--text:#2a1713;--muted:#755c55;--gold:#b98262;--gold2:#8f563c;--danger:#964444;--ok:#3f7754;--border:rgba(185,130,98,.26);
    --theme-bg:linear-gradient(135deg,rgba(255,248,241,.78),rgba(241,218,209,.73)),url('/static/backgrounds/rose-champagne.webp') center/cover fixed no-repeat;
    --theme-panel:linear-gradient(145deg,rgba(255,250,246,.96),rgba(242,222,212,.94));
    --theme-panel-strong:linear-gradient(145deg,#fffdf9,#efd5c9);
    --theme-header:linear-gradient(90deg,#6b3429,#b87d5b,#6b3429);
    --theme-sidebar:linear-gradient(180deg,#6b3429,#24110d);
    --theme-button:linear-gradient(135deg,#9f5f42,#ddb482);
    --theme-shadow:0 22px 55px rgba(107,52,41,.18);
    --app-bg-image:url('/static/backgrounds/rose-champagne.webp');--bg-overlay:rgba(255,247,239,.48);--button-text:#21100b;--text-on-button:#21100b;
}
html[data-theme] body{
    background-image:linear-gradient(0deg,var(--bg-overlay),var(--bg-overlay)),var(--app-bg-image)!important;
    background-size:cover!important;background-position:center!important;background-attachment:fixed!important;background-repeat:no-repeat!important;
    color:var(--text-primary)!important;overflow-x:hidden!important;min-height:100vh!important;
}
html[data-theme] body::before{background:none!important;opacity:0!important;display:none!important;}
html[data-theme] .container{max-width:1240px!important;width:100%!important;}
html[data-theme] h1,html[data-theme] h2,html[data-theme] h3,html[data-theme] h4{color:var(--section-title)!important;letter-spacing:-.02em;}
html[data-theme] p,html[data-theme] span,html[data-theme] td,html[data-theme] li,html[data-theme] label{color:var(--text-primary)!important;}
html[data-theme] .muted,html[data-theme] .hint,html[data-theme] small{color:var(--text-muted)!important;opacity:1!important;}
html[data-theme] .eyebrow,html[data-theme] th{color:var(--section-subtitle)!important;font-weight:900!important;letter-spacing:.13em;}
html[data-theme] .card,html[data-theme] .nested,html[data-theme] .dashboard-masonic-card,html[data-theme] .login-access-card,html[data-theme] .product-landing-panel,html[data-theme] .resource-footer-card,html[data-theme] .stat,html[data-theme] .dash-metric,html[data-theme] .action,html[data-theme] .treasury-circle,html[data-theme] .candidate-pay-card,html[data-theme] .book-card,html[data-theme] .degree-card,html[data-theme] .position-card,html[data-theme] .settings-panel,html[data-theme] .member-card,html[data-theme] table{
    background:var(--card-bg)!important;color:var(--text-on-card)!important;border:1px solid var(--card-border)!important;box-shadow:var(--theme-shadow)!important;backdrop-filter:blur(12px);
}
html[data-theme] .card{padding:clamp(20px,2vw,30px)!important;border-radius:22px!important;}
html[data-theme] button,html[data-theme] .button,html[data-theme] .action.accent,html[data-theme] .side-nav .admin-link,html[data-theme] .topbar .admin-link,html[data-theme] .login-access-card button[type="submit"]{
    background:var(--button-bg)!important;color:var(--button-text)!important;border:1px solid var(--button-border)!important;border-radius:14px!important;box-shadow:0 12px 26px rgba(0,0,0,.16)!important;text-shadow:none!important;
}
html[data-theme] input,html[data-theme] select,html[data-theme] textarea{
    background:rgba(255,255,255,.86)!important;color:#17202a!important;border:1px solid var(--card-border)!important;border-radius:13px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.4)!important;
}
html[data-theme="royal"] input,html[data-theme="obsidian"] input,html[data-theme="emerald"] input,html[data-theme="wine"] input,html[data-theme="royal"] select,html[data-theme="obsidian"] select,html[data-theme="emerald"] select,html[data-theme="wine"] select,html[data-theme="royal"] textarea,html[data-theme="obsidian"] textarea,html[data-theme="emerald"] textarea,html[data-theme="wine"] textarea{background:rgba(255,255,255,.10)!important;color:var(--text-primary)!important;}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--text-muted)!important;opacity:.9!important;}
html[data-theme] .topbar,html[data-theme] .app-header,html[data-theme] .public-topbar{background:var(--theme-header)!important;color:var(--navbar-text)!important;border-bottom:1px solid var(--card-border)!important;}
html[data-theme] .sidebar{background:var(--theme-sidebar)!important;color:var(--sidebar-text)!important;}
html[data-theme] .side-nav a{color:var(--sidebar-text)!important;background:rgba(255,255,255,.06)!important;}
html[data-theme] .theme-selector{background:var(--card-bg-soft)!important;color:var(--text-primary)!important;border:1px solid var(--card-border)!important;}
html[data-theme] .app-footer,html[data-theme] .public-footer{background:var(--card-bg)!important;color:var(--text-primary)!important;border-color:var(--card-border)!important;}
/* Home/login refinado */
.login-product-home{max-width:1220px!important;margin:0 auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(360px,410px)!important;gap:clamp(24px,3vw,42px)!important;align-items:center!important;min-height:calc(100vh - 182px)!important;padding:clamp(20px,3vh,44px) 0!important;}
.login-product-home .product-landing-panel{max-width:690px!important;justify-self:end!important;padding:clamp(26px,3vw,42px)!important;min-height:auto!important;}
.login-product-home .product-landing-panel h1{font-size:clamp(2.35rem,4.3vw,4.15rem)!important;line-height:.96!important;margin:.18em 0 .24em!important;}
.login-product-home .impact-banner{display:inline-flex!important;padding:11px 20px!important;border-radius:999px!important;font-weight:900!important;margin:4px 0 22px!important;}
.login-product-home .login-stats-strip{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:14px 0 20px!important;}
.login-product-home .login-stats-strip>div{padding:14px 10px!important;min-height:104px!important;border-radius:18px!important;}
.login-product-home .resource-footer-card{padding:20px!important;border-radius:18px!important;}
.login-product-home .resource-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px 18px!important;}
.login-product-home .login-access-card{width:100%!important;max-width:410px!important;justify-self:start!important;padding:28px!important;border-radius:24px!important;}
.login-card-head{gap:14px!important;margin-bottom:14px!important;}
.login-card-head h2{font-size:1.55rem!important;margin:2px 0!important;}
.login-clean-hint{margin:0 0 16px!important;color:var(--text-primary)!important;}
.public-access-alert,.login-wa-button{display:none!important;}
.footer-support-link{padding:7px 10px;border-radius:999px;background:rgba(37,211,102,.12);border:1px solid rgba(37,211,102,.25);}
.messages{position:fixed!important;right:22px!important;top:86px!important;width:min(360px,calc(100vw - 44px))!important;z-index:100000!important;margin:0!important;}
.messages .flash{border-radius:16px!important;padding:13px 15px!important;border:1px solid var(--card-border)!important;background:var(--card-bg)!important;color:var(--alert-text)!important;}
.messages .flash.error{background:linear-gradient(145deg,rgba(180,35,24,.18),var(--card-bg))!important;}
.messages .flash.success{background:linear-gradient(145deg,rgba(47,139,87,.18),var(--card-bg))!important;}
/* Dashboard e cards */
.dashboard-admin-strip{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important;margin:22px 0 24px!important;}
.dash-metric{min-height:128px!important;padding:22px 24px!important;border-radius:22px!important;display:flex!important;align-items:center!important;gap:18px!important;text-decoration:none!important;}
.dash-metric span{font-size:2rem!important;flex:0 0 auto!important;}
.dash-metric strong{font-size:2.35rem!important;line-height:1!important;color:var(--section-subtitle)!important;}
.dash-metric small{display:block!important;font-weight:800!important;font-size:.95rem!important;color:var(--text-primary)!important;}
.dashboard-action-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(215px,1fr))!important;gap:18px!important;}
.dashboard-action-grid .action{min-height:112px!important;padding:20px!important;border-radius:20px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;}
.dashboard-action-grid .action span{font-size:2rem!important;}
.dashboard-action-grid .action strong{display:block!important;color:var(--text-primary)!important;font-size:1.06rem!important;}
.dashboard-action-grid .action small{display:block!important;margin-top:2px!important;}
.dashboard-main-grid,.dashboard-secondary-grid{gap:24px!important;margin-top:24px!important;}
.dashboard-masonic-card{min-height:260px!important;padding:28px!important;}
.masonic-card-head{display:flex!important;align-items:center!important;gap:16px!important;margin-bottom:20px!important;}
.masonic-card-icon{width:46px!important;height:46px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:50%!important;background:var(--card-bg-soft)!important;color:var(--section-subtitle)!important;font-size:1.35rem!important;border:1px solid var(--card-border)!important;}
.masonic-card-head h2{font-size:1.65rem!important;margin:0!important;}
.masonic-list-row{padding:15px 0!important;gap:15px!important;border-color:var(--card-border)!important;}
.masonic-list-row strong,.person-name-link{font-weight:500!important;color:var(--text-primary)!important;}
.masonic-list-row span{color:var(--text-primary)!important;line-height:1.45!important;}
/* Tesouraria refinada */
.treasury-summary,.treasury-circles{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important;align-items:stretch!important;}
.treasury-circle{width:auto!important;height:auto!important;min-height:190px!important;border-radius:28px!important;padding:24px 18px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;text-align:center!important;}
.treasury-circle strong{font-size:clamp(1.65rem,2.4vw,2.45rem)!important;line-height:1.05!important;color:#fff!important;text-shadow:0 1px 8px rgba(0,0,0,.32)!important;}
.treasury-circle span,.treasury-circle small{color:#fff!important;opacity:1!important;font-weight:800!important;}
.treasury-circle .button,.treasury-circle button{margin-top:12px!important;padding:8px 12px!important;font-size:.85rem!important;}
.month-calendar{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:8px!important;}
.month-tile{padding:10px 8px!important;font-size:.9rem!important;}
.treasury-year-nav{gap:8px!important;}
.treasury-year-nav .button,.treasury-year-nav button{padding:8px 12px!important;font-size:.9rem!important;}
/* Carteirinha */
.member-card{background:linear-gradient(135deg,rgba(3,18,44,.98),rgba(9,50,88,.96))!important;color:#fff!important;border-color:#d8aa35!important;padding:30px!important;}
.member-card *{color:#fff!important;opacity:1!important;}
.member-card h1,.member-card h2,.member-card strong{color:#f6d37a!important;}
.member-card small,.member-card .muted{color:#e8eef8!important;}
/* tabelas e badges */
table th{color:var(--section-subtitle)!important;background:rgba(0,0,0,.04)!important;}
table td{color:var(--text-primary)!important;}
.badge,.status-pill{color:var(--badge-text)!important;border:1px solid var(--card-border)!important;}
@media(max-width:1100px){
    .login-product-home{grid-template-columns:1fr!important;max-width:820px!important;}
    .login-product-home .product-landing-panel,.login-product-home .login-access-card{justify-self:center!important;max-width:720px!important;}
    .dashboard-admin-strip,.treasury-summary,.treasury-circles{grid-template-columns:1fr 1fr!important;}
    .month-calendar{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
}
@media(max-width:720px){
    html[data-theme] body{background-attachment:scroll!important;}
    .container{padding:18px 14px!important;}
    .login-product-home{min-height:auto!important;padding:18px 0 28px!important;gap:18px!important;}
    .login-product-home .product-landing-panel,.login-product-home .login-access-card{max-width:100%!important;padding:22px!important;}
    .login-product-home .product-landing-panel h1{font-size:clamp(2rem,11vw,3.05rem)!important;}
    .login-product-home .login-stats-strip{grid-template-columns:1fr 1fr!important;}
    .login-product-home .resource-list{grid-template-columns:1fr!important;}
    .dashboard-admin-strip,.dashboard-main-grid,.dashboard-secondary-grid,.treasury-summary,.treasury-circles{grid-template-columns:1fr!important;}
    .dash-metric{min-height:108px!important;}
    .month-calendar{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
    .messages{right:12px!important;top:74px!important;width:calc(100vw - 24px)!important;}
    .public-footer,.app-footer{margin:12px!important;display:block!important;text-align:left!important;}
}

/* v30 — acabamento final: menu, seletor de tema e tesouraria circular preservada */
html[data-theme]{
    --sidebar-section-text:#fff4d8;
    --sidebar-section-bg:rgba(255,255,255,.075);
    --sidebar-section-border:rgba(255,255,255,.18);
    --select-bg:#fff8ea;
    --select-text:#22170b;
    --select-border:rgba(178,123,35,.48);
    --select-hover:#f2dfb6;
    --select-focus:rgba(214,170,72,.30);
}
html[data-theme="classic"],html[data-theme="parchment"],html[data-theme="sand"],html[data-theme="mist"],html[data-theme="sage"],html[data-theme="rose"],html[data-theme="silver"]{
    --select-bg:rgba(255,252,244,.98);
    --select-text:#19140d;
    --select-border:rgba(135,91,24,.46);
    --select-hover:#ead39d;
}
html[data-theme="royal"],html[data-theme="obsidian"],html[data-theme="emerald"],html[data-theme="wine"]{
    --select-bg:rgba(14,17,22,.98);
    --select-text:#fff8ea;
    --select-border:rgba(231,190,94,.55);
    --select-hover:rgba(214,170,72,.28);
}
html[data-theme="silver"],html[data-theme="mist"]{
    --sidebar-section-text:#f8fbff;
    --sidebar-section-bg:rgba(255,255,255,.09);
    --sidebar-section-border:rgba(255,255,255,.22);
}
html[data-theme="sand"],html[data-theme="sage"],html[data-theme="rose"]{
    --sidebar-section-text:#fff7e8;
    --sidebar-section-bg:rgba(255,255,255,.10);
    --sidebar-section-border:rgba(255,255,255,.22);
}

/* Títulos e seções do menu lateral sempre nítidos */
html[data-theme] .sidebar .side-brand,
html[data-theme] .sidebar .side-brand span,
html[data-theme] .sidebar .side-brand small{
    color:var(--sidebar-text)!important;
    opacity:1!important;
    text-shadow:0 1px 2px rgba(0,0,0,.38)!important;
}
html[data-theme] .sidebar .side-brand span{
    font-weight:900!important;
    letter-spacing:.01em!important;
}
html[data-theme] .sidebar .side-brand small{
    color:color-mix(in srgb, var(--sidebar-text) 86%, var(--decor-accent) 14%)!important;
    font-weight:650!important;
}
html[data-theme] .side-section,
html[data-theme] .side-section-top{
    display:block!important;
    margin:16px 10px 8px!important;
    padding:8px 10px!important;
    border-radius:12px!important;
    background:var(--sidebar-section-bg)!important;
    border:1px solid var(--sidebar-section-border)!important;
    color:var(--sidebar-section-text)!important;
    font-size:12px!important;
    font-weight:950!important;
    letter-spacing:.12em!important;
    text-transform:uppercase!important;
    line-height:1.15!important;
    opacity:1!important;
    text-shadow:0 1px 2px rgba(0,0,0,.38)!important;
}
html[data-theme] .side-nav a{
    color:color-mix(in srgb, var(--sidebar-text) 94%, #ffffff 6%)!important;
    opacity:1!important;
}
html[data-theme] .side-nav a span{filter:none!important;opacity:1!important;}
html[data-theme] .side-nav a:hover{
    color:#fff!important;
    background:rgba(255,255,255,.115)!important;
    border-color:rgba(255,255,255,.18)!important;
}
html[data-theme] .side-nav a.admin-link{
    color:var(--button-text)!important;
    text-shadow:none!important;
}

/* Seletor de temas: campo fechado e dropdown legíveis em todos os temas */
html[data-theme] .theme-selector,
html[data-theme] select.theme-selector,
html[data-theme] .topbar .theme-selector,
html[data-theme] .app-header .theme-selector,
html[data-theme] .public-topbar .theme-selector{
    appearance:auto!important;
    -webkit-appearance:auto!important;
    background:var(--select-bg)!important;
    color:var(--select-text)!important;
    border:1.5px solid var(--select-border)!important;
    box-shadow:0 10px 26px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.35)!important;
    opacity:1!important;
    text-shadow:none!important;
    font-weight:900!important;
}
html[data-theme] .theme-selector:hover{
    filter:brightness(1.03)!important;
    border-color:color-mix(in srgb, var(--decor-accent) 75%, var(--select-border) 25%)!important;
}
html[data-theme] .theme-selector:focus{
    outline:3px solid var(--select-focus)!important;
    outline-offset:2px!important;
    border-color:var(--decor-accent)!important;
}
html[data-theme] .theme-selector option,
html[data-theme] select option{
    background:var(--select-bg)!important;
    color:var(--select-text)!important;
    font-weight:800!important;
}
html[data-theme] .theme-selector option:checked{
    background:var(--decor-accent)!important;
    color:#111!important;
}
html[data-theme="royal"] .theme-selector option:checked,
html[data-theme="obsidian"] .theme-selector option:checked,
html[data-theme="emerald"] .theme-selector option:checked,
html[data-theme="wine"] .theme-selector option:checked{
    color:#101014!important;
}

/* Tesouraria: manter círculos coloridos originais e corrigir somente legibilidade interna */
html[data-theme] .treasury-stats{
    align-items:center!important;
}
html[data-theme] .treasury-circle,
html[data-theme] a.treasury-circle,
html[data-theme] .treasury-clickable{
    width:220px!important;
    height:220px!important;
    aspect-ratio:1/1!important;
    border-radius:50%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    text-align:center!important;
    margin:auto!important;
    padding:22px!important;
    text-decoration:none!important;
    background:radial-gradient(circle at 35% 28%,#2a8750 0%,#145a34 42%,#092315 100%)!important;
    border:5px solid #19b765!important;
    box-shadow:0 18px 48px rgba(0,0,0,.24), inset 0 0 28px rgba(255,255,255,.10), 0 0 0 1px rgba(255,255,255,.08)!important;
    color:#fff!important;
    overflow:hidden!important;
    position:relative!important;
}
html[data-theme] .treasury-circle::before{
    content:""!important;
    position:absolute!important;
    inset:14px!important;
    border-radius:50%!important;
    border:1px solid rgba(255,255,255,.24)!important;
    pointer-events:none!important;
}
html[data-theme] .treasury-circle strong,
html[data-theme] .treasury-circle span,
html[data-theme] .treasury-circle small{
    position:relative!important;
    z-index:1!important;
    color:#fff!important;
    opacity:1!important;
    text-shadow:0 2px 5px rgba(0,0,0,.55)!important;
}
html[data-theme] .treasury-circle strong{
    max-width:100%!important;
    overflow-wrap:anywhere!important;
    font-size:clamp(1.55rem,2vw,1.95rem)!important;
    line-height:1.08!important;
    font-weight:950!important;
    letter-spacing:-.025em!important;
}
html[data-theme] .treasury-circle span{
    display:block!important;
    max-width:150px!important;
    font-size:1rem!important;
    line-height:1.15!important;
    font-weight:850!important;
}
html[data-theme] .treasury-circle small{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin-top:4px!important;
    padding:7px 12px!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.18)!important;
    border:1px solid rgba(255,255,255,.34)!important;
    color:#fff!important;
    font-size:.78rem!important;
    font-weight:900!important;
    backdrop-filter:blur(6px)!important;
}
html[data-theme] .treasury-circle:hover{
    transform:translateY(-3px)!important;
    filter:saturate(1.06) brightness(1.03)!important;
}
html[data-theme] .treasury-circle.orange-circle,
html[data-theme] a.treasury-circle.orange-circle{
    background:radial-gradient(circle at 35% 28%,#f2b84f 0%,#b46810 44%,#3c1b04 100%)!important;
    border-color:#f59e0b!important;
}
html[data-theme] .treasury-circle.danger-circle,
html[data-theme] a.treasury-circle.danger-circle{
    background:radial-gradient(circle at 35% 28%,#e95656 0%,#9d1d23 44%,#33080b 100%)!important;
    border-color:#dc2626!important;
}
html[data-theme] .treasury-circle.active-circle,
html[data-theme] a.treasury-circle.active-circle{
    background:radial-gradient(circle at 35% 28%,#4f9be6 0%,#1e5f9d 45%,#08213c 100%)!important;
    border-color:#1d72b8!important;
}

/* Responsividade dos círculos sem perder o formato */
@media(max-width:980px){
    html[data-theme] .treasury-circle,html[data-theme] a.treasury-circle{width:190px!important;height:190px!important;padding:20px!important;}
    html[data-theme] .treasury-circle strong{font-size:clamp(1.35rem,4vw,1.75rem)!important;}
}
@media(max-width:560px){
    html[data-theme] .treasury-stats{grid-template-columns:1fr!important;}
    html[data-theme] .treasury-circle,html[data-theme] a.treasury-circle{width:min(78vw,220px)!important;height:min(78vw,220px)!important;}
    html[data-theme] .theme-selector{width:100%!important;max-width:100%!important;}
}

/* v31 — ajustes finos: tesouraria mais clean, WhatsApp só ícone e importação Excel */
html[data-theme] .treasury-circle strong{
    font-size:clamp(1.35rem,1.75vw,1.7rem)!important;
    font-weight:720!important;
    letter-spacing:-.015em!important;
    line-height:1.08!important;
}
html[data-theme] .treasury-circle span{
    font-size:.88rem!important;
    font-weight:620!important;
    line-height:1.18!important;
    max-width:142px!important;
}
html[data-theme] .treasury-circle small,
html[data-theme] .treasury-clickable small{
    font-size:.72rem!important;
    font-weight:650!important;
    padding:6px 10px!important;
    letter-spacing:.01em!important;
    opacity:.96!important;
}
html[data-theme] .treasury-circle{
    gap:7px!important;
}
.wa-button.wa-icon-only,
.whatsapp-link.wa-icon-only{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    padding:0!important;
    border-radius:50%!important;
    gap:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:18px!important;
    line-height:1!important;
    text-indent:0!important;
    white-space:nowrap!important;
}
.wa-button.wa-mini.wa-icon-only{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    font-size:16px!important;
}
.report-actions .wa-button.wa-icon-only{align-self:flex-start!important;}
.import-form{max-width:520px;margin-top:18px}.clean-list{margin:0;padding-left:1.1rem;line-height:1.85}.clean-list li{margin:.15rem 0;color:var(--text-primary)}
@media(max-width:560px){html[data-theme] .treasury-circle strong{font-size:1.3rem!important}.wa-button.wa-icon-only{width:36px!important;height:36px!important}}

/* v33 — Tesouraria: tipografia ainda mais clean nos círculos */
html[data-theme] .treasury-circle strong,
html[data-theme] a.treasury-circle strong{
    font-size:clamp(1.12rem,1.45vw,1.48rem)!important;
    font-weight:500!important;
    letter-spacing:-.01em!important;
    line-height:1.06!important;
    margin:0!important;
}
html[data-theme] .treasury-circle span,
html[data-theme] a.treasury-circle span{
    font-size:.78rem!important;
    font-weight:400!important;
    line-height:1.16!important;
    max-width:136px!important;
    opacity:.96!important;
    margin:0!important;
}
html[data-theme] .treasury-circle small,
html[data-theme] .treasury-clickable small,
html[data-theme] a.treasury-circle small{
    font-size:.66rem!important;
    font-weight:400!important;
    padding:5px 9px!important;
    letter-spacing:.005em!important;
    line-height:1.05!important;
    opacity:.94!important;
}
html[data-theme] .treasury-circle,
html[data-theme] a.treasury-circle{
    gap:5px!important;
}
@media(max-width:980px){
    html[data-theme] .treasury-circle strong,
    html[data-theme] a.treasury-circle strong{font-size:clamp(1.05rem,3.3vw,1.35rem)!important;}
    html[data-theme] .treasury-circle span,
    html[data-theme] a.treasury-circle span{font-size:.74rem!important;}
}
@media(max-width:560px){
    html[data-theme] .treasury-circle strong,
    html[data-theme] a.treasury-circle strong{font-size:1.12rem!important;}
    html[data-theme] .treasury-circle span,
    html[data-theme] a.treasury-circle span{font-size:.72rem!important;}
    html[data-theme] .treasury-circle small,
    html[data-theme] .treasury-clickable small,
    html[data-theme] a.treasury-circle small{font-size:.64rem!important;}
}

/* v36 - Visualizador de fichas cadastradas anexadas */
.file-preview-panel{
  margin:14px 0 16px;
  padding:14px;
  border:1px solid var(--card-border, rgba(214,170,72,.28));
  border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.10),rgba(255,255,255,.035));
  box-shadow:0 12px 28px rgba(0,0,0,.12);
  overflow:hidden;
}
.file-preview-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.file-preview-header strong{display:block;color:var(--text-primary);font-weight:700;font-size:1rem;line-height:1.2}
.file-preview-header small{display:block;margin-top:4px;line-height:1.35}
.file-preview-body{
  min-height:360px;
  max-height:620px;
  border:1px solid rgba(214,170,72,.22);
  border-radius:14px;
  background:rgba(8,12,20,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.file-preview-frame{width:100%;height:620px;border:0;background:#fff;border-radius:14px}
.file-preview-image{display:block;max-width:100%;max-height:620px;object-fit:contain;border-radius:12px;background:rgba(255,255,255,.08)}
.file-preview-empty{padding:24px;text-align:center;color:var(--text-secondary)}
.attachment-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.attachment-preview-link.is-selected{background:rgba(214,170,72,.26)!important;border-color:rgba(214,170,72,.72)!important;color:var(--text-primary)!important;box-shadow:0 8px 20px rgba(0,0,0,.12)}
.button.small,.button.secondary.small{padding:7px 10px;font-size:.82rem;border-radius:999px;white-space:nowrap}
@media(max-width:760px){
  .file-preview-header{align-items:flex-start;flex-direction:column}
  .file-preview-body{min-height:280px;max-height:420px}
  .file-preview-frame{height:420px}
  .file-preview-image{max-height:420px}
}

/* v38 - carrossel compacto para fichas, PDFs e fotos do membro */
.attachment-thumb-carousel{
  display:flex;
  gap:10px;
  margin:12px 0 14px;
  padding:4px 2px 12px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}
.attachment-thumb-carousel::-webkit-scrollbar{height:8px}
.attachment-thumb-carousel::-webkit-scrollbar-thumb{background:rgba(214,170,72,.50);border-radius:999px}
.attachment-thumb-card{
  display:flex!important;
  flex:0 0 92px;
  width:92px;
  min-height:106px;
  padding:7px!important;
  flex-direction:column;
  gap:6px;
  align-items:center;
  justify-content:flex-start;
  border-radius:14px!important;
  border:1px solid var(--card-border)!important;
  background:var(--card-bg-soft, rgba(255,255,255,.08))!important;
  color:var(--text-primary)!important;
  text-decoration:none!important;
  box-shadow:0 8px 18px rgba(0,0,0,.10);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  scroll-snap-align:start;
}
.attachment-thumb-card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 22px rgba(0,0,0,.15);
  border-color:rgba(214,170,72,.72)!important;
}
.attachment-thumb-card.is-selected{
  background:rgba(214,170,72,.22)!important;
  border-color:rgba(214,170,72,.88)!important;
  box-shadow:0 12px 24px rgba(0,0,0,.18);
}
.attachment-thumb-media{
  width:58px;
  height:58px;
  border-radius:12px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(145deg,rgba(255,255,255,.28),rgba(10,20,38,.12));
  border:1px solid rgba(214,170,72,.30);
}
.attachment-thumb-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.attachment-thumb-pdf,
.attachment-thumb-file{
  width:58px;
  height:58px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
  font-size:.72rem;
  letter-spacing:.06em;
  color:#fff;
  background:linear-gradient(145deg,#a31322,#e25a5f);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.20);
}
.attachment-thumb-file{background:linear-gradient(145deg,#243044,#607089)}
.attachment-thumb-title{
  display:block;
  width:100%;
  color:var(--text-primary)!important;
  font-size:.64rem;
  line-height:1.12;
  font-weight:500;
  text-align:center;
  word-break:break-word;
  max-height:2.25em;
  overflow:hidden;
}
.file-preview-body.mini-preview{
  min-height:0;
  max-height:none;
  padding:10px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.compact-preview-shell{
  width:min(100%, 520px);
  height:240px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--card-border);
  border-radius:16px;
  overflow:hidden;
  background:rgba(0,0,0,.08);
}
.file-preview-body.mini-preview .file-preview-frame{
  width:100%;
  height:240px;
  max-height:240px;
  border:0;
  background:#fff;
}
.file-preview-body.mini-preview .file-preview-image{
  max-width:100%;
  max-height:240px;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
  margin:auto;
}
@media(max-width:720px){
  .attachment-thumb-carousel{gap:8px;padding-bottom:10px}
  .attachment-thumb-card{flex-basis:84px;width:84px;min-height:98px;padding:6px!important}
  .attachment-thumb-media,.attachment-thumb-pdf,.attachment-thumb-file{width:52px;height:52px}
  .compact-preview-shell{height:210px}
  .file-preview-body.mini-preview .file-preview-frame{height:210px;max-height:210px}
  .file-preview-body.mini-preview .file-preview-image{max-height:210px}
}


/* v41 - visualizador compacto definitivo de fichas anexadas */
.file-preview-panel{
  width:100%;
  max-width:100%;
  overflow:hidden;
}
.file-preview-header{
  gap:10px;
  align-items:center;
}
.attachment-thumb-carousel{
  display:flex;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:10px 4px 12px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  max-width:100%;
}
.attachment-thumb-card{
  flex:0 0 auto!important;
  width:105px!important;
  height:120px!important;
  min-height:120px!important;
  max-height:120px!important;
  padding:7px!important;
  border-radius:14px!important;
  overflow:hidden!important;
  scroll-snap-align:start;
  justify-content:flex-start!important;
}
.attachment-thumb-media,
.attachment-thumb-pdf,
.attachment-thumb-file{
  width:100%!important;
  height:74px!important;
  min-height:74px!important;
  max-height:74px!important;
  border-radius:11px!important;
}
.attachment-thumb-media img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}
.attachment-thumb-title{
  font-size:.61rem!important;
  line-height:1.08!important;
  font-weight:500!important;
  max-height:2.2em!important;
  overflow:hidden!important;
}
.thumb-fallback-image{
  color:#fff!important;
  font-weight:700!important;
  font-size:.74rem!important;
  letter-spacing:.06em!important;
  background:linear-gradient(145deg,#26435c,#6f8799)!important;
}
.file-preview-body.mini-preview{
  width:100%;
  max-width:100%;
  min-height:72px!important;
  max-height:70vh!important;
  overflow:auto!important;
  padding:12px!important;
  border-radius:16px!important;
}
.compact-preview-shell{
  width:100%!important;
  max-width:760px!important;
  height:auto!important;
  max-height:70vh!important;
  margin:0 auto;
  overflow:auto!important;
  border-radius:16px!important;
}
.file-preview-body.mini-preview .file-preview-image{
  max-width:100%!important;
  max-height:68vh!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain!important;
  display:block!important;
  margin:0 auto!important;
}
.file-preview-body.mini-preview .file-preview-frame{
  width:100%!important;
  height:68vh!important;
  max-height:68vh!important;
  min-height:360px!important;
  border:none!important;
  border-radius:12px!important;
}
@media(max-width:720px){
  .attachment-thumb-card{width:92px!important;height:108px!important;min-height:108px!important;max-height:108px!important;padding:6px!important}
  .attachment-thumb-media,.attachment-thumb-pdf,.attachment-thumb-file{height:64px!important;min-height:64px!important;max-height:64px!important}
  .file-preview-body.mini-preview .file-preview-frame{min-height:280px!important;height:58vh!important}
}

/* v42 — Home/Painel ADM organizado, seções minimizáveis e Tesouraria translúcida */
html,body{overflow-x:hidden!important;}
.container{max-width:1280px!important;box-sizing:border-box!important;}
.card,.dashboard-section,.dashboard-masonic-card{box-sizing:border-box!important;max-width:100%!important;}
.admin-home-hero{margin-bottom:28px!important;}
.admin-home-hero .quick-actions{gap:18px!important;}
.dashboard-stats-grid,.admin-click-stats{margin:28px 0 32px!important;gap:22px!important;position:relative!important;z-index:1!important;clear:both!important;}
.admin-click-stats .stat,.dashboard-stats-grid .stat{min-height:132px!important;padding:24px 20px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:8px!important;border-radius:22px!important;}
.admin-click-stats .stat strong{font-size:clamp(2rem,4vw,3rem)!important;line-height:1!important;color:var(--section-subtitle,var(--gold2))!important;font-weight:760!important;}
.admin-click-stats .stat span{font-size:.98rem!important;font-weight:620!important;color:var(--text-primary)!important;}
.dashboard-section-grid{gap:28px!important;margin-top:30px!important;margin-bottom:30px!important;align-items:stretch!important;}
.dashboard-section,.dashboard-masonic-card{margin-top:28px!important;margin-bottom:0!important;padding:24px!important;border-radius:22px!important;position:relative!important;overflow:hidden!important;clear:both!important;background:var(--card-bg)!important;border:1px solid var(--card-border)!important;box-shadow:0 14px 34px rgba(0,0,0,.13)!important;}
.dashboard-main-grid,.dashboard-secondary-grid{display:grid!important;gap:28px!important;margin-top:30px!important;margin-bottom:0!important;align-items:stretch!important;position:relative!important;z-index:1!important;clear:both!important;}
.dashboard-admin-strip{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:22px!important;margin:28px 0 32px!important;position:relative!important;z-index:1!important;clear:both!important;}
.dash-metric{min-height:118px!important;padding:22px!important;border-radius:22px!important;align-items:center!important;justify-content:flex-start!important;box-sizing:border-box!important;}
.dash-metric strong{font-size:clamp(1.8rem,3vw,2.5rem)!important;font-weight:760!important;}
.dash-metric small{color:var(--text-primary)!important;font-weight:650!important;line-height:1.25!important;}
.dashboard-action-grid{margin:0 0 32px!important;gap:20px!important;position:relative!important;z-index:1!important;clear:both!important;}
.masonic-card-head,.section-header,.auto-section-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:18px!important;position:relative!important;z-index:2!important;}
.masonic-card-head > div,.section-header > h1,.section-header > h2,.section-header > h3,.auto-section-header > h1,.auto-section-header > h2,.auto-section-header > h3{min-width:0!important;}
.section-minimize-btn{flex:0 0 auto!important;width:36px!important;height:34px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border:1px solid rgba(214,170,72,.28)!important;border-radius:12px!important;background:rgba(255,255,255,.14)!important;color:var(--text-primary)!important;font-size:1.2rem!important;line-height:1!important;font-weight:700!important;cursor:pointer!important;box-shadow:0 8px 18px rgba(0,0,0,.08)!important;transition:transform .18s ease, background .18s ease, border-color .18s ease!important;}
.section-minimize-btn:hover{transform:translateY(-1px)!important;background:rgba(214,170,72,.18)!important;border-color:rgba(214,170,72,.48)!important;}
.section-content{display:block!important;transition:opacity .2s ease, max-height .24s ease!important;}
.is-collapsed > .section-content{display:none!important;}
.dashboard-masonic-card.is-collapsed{min-height:auto!important;}
.dashboard-masonic-card .list,.dashboard-section .list{margin-top:10px!important;}
.masonic-list-row,.item-row,.person-row{padding:14px 0!important;line-height:1.45!important;}
.dashboard-masonic-card .eyebrow{letter-spacing:.08em!important;color:var(--section-subtitle)!important;font-weight:700!important;opacity:1!important;}
.dashboard-masonic-card h2,.dashboard-section h2{color:var(--text-primary)!important;font-weight:760!important;}
.dashboard-masonic-card .muted,.dashboard-section .muted{color:var(--text-secondary)!important;opacity:1!important;}
.collapsible-card{margin-top:28px!important;border-radius:22px!important;box-shadow:0 14px 34px rgba(0,0,0,.12)!important;}
.collapsible-card > summary{padding:18px 22px!important;gap:14px!important;}
.collapsible-card > summary span{font-weight:760!important;color:var(--text-primary)!important;}
.collapsible-card > summary strong{font-weight:640!important;font-size:.82rem!important;}

/* Tesouraria: preservar círculos, suavizar saturação e manter legibilidade */
html[data-theme] .treasury-stats{gap:22px!important;margin-top:22px!important;margin-bottom:8px!important;align-items:center!important;}
html[data-theme] .treasury-circle,
html[data-theme] a.treasury-circle,
html[data-theme] .treasury-clickable{
    width:220px!important;
    height:220px!important;
    min-height:unset!important;
    border-radius:50%!important;
    padding:24px!important;
    gap:6px!important;
    border-width:3px!important;
    backdrop-filter:blur(10px) saturate(.95)!important;
    -webkit-backdrop-filter:blur(10px) saturate(.95)!important;
    box-shadow:0 16px 34px rgba(0,0,0,.18), inset 0 1px 22px rgba(255,255,255,.12), inset 0 -18px 35px rgba(0,0,0,.12)!important;
    transition:transform .18s ease, box-shadow .18s ease, filter .18s ease!important;
}
html[data-theme] .treasury-circle,
html[data-theme] a.treasury-circle{background:radial-gradient(circle at 34% 26%,rgba(69,195,123,.86) 0%,rgba(31,128,75,.76) 46%,rgba(13,55,34,.70) 100%)!important;border-color:rgba(52,211,153,.58)!important;}
html[data-theme] .treasury-circle.orange-circle,
html[data-theme] a.treasury-circle.orange-circle{background:radial-gradient(circle at 34% 26%,rgba(245,190,92,.86) 0%,rgba(202,123,31,.74) 48%,rgba(88,45,9,.68) 100%)!important;border-color:rgba(251,191,36,.55)!important;}
html[data-theme] .treasury-circle.danger-circle,
html[data-theme] a.treasury-circle.danger-circle{background:radial-gradient(circle at 34% 26%,rgba(238,107,107,.84) 0%,rgba(180,48,54,.74) 48%,rgba(92,18,22,.68) 100%)!important;border-color:rgba(248,113,113,.56)!important;}
html[data-theme] .treasury-circle.active-circle,
html[data-theme] a.treasury-circle.active-circle{background:radial-gradient(circle at 34% 26%,rgba(93,164,232,.86) 0%,rgba(47,111,178,.74) 48%,rgba(18,52,93,.70) 100%)!important;border-color:rgba(96,165,250,.56)!important;}
html[data-theme] .treasury-circle::before{inset:12px!important;border:1px solid rgba(255,255,255,.20)!important;box-shadow:inset 0 0 18px rgba(255,255,255,.07)!important;}
html[data-theme] .treasury-circle:hover{transform:translateY(-2px)!important;filter:saturate(.98) brightness(1.03)!important;box-shadow:0 20px 40px rgba(0,0,0,.20), inset 0 1px 22px rgba(255,255,255,.14)!important;}
html[data-theme] .treasury-circle strong,
html[data-theme] a.treasury-circle strong{font-size:clamp(1.08rem,1.42vw,1.42rem)!important;font-weight:500!important;letter-spacing:-.01em!important;color:#fff!important;text-shadow:0 1px 5px rgba(0,0,0,.42)!important;}
html[data-theme] .treasury-circle span,
html[data-theme] a.treasury-circle span{font-size:.78rem!important;font-weight:420!important;line-height:1.18!important;color:rgba(255,255,255,.96)!important;text-shadow:0 1px 4px rgba(0,0,0,.38)!important;}
html[data-theme] .treasury-circle small,
html[data-theme] .treasury-clickable small,
html[data-theme] a.treasury-circle small{font-size:.65rem!important;font-weight:430!important;padding:5px 9px!important;background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.24)!important;color:#fff!important;text-shadow:0 1px 3px rgba(0,0,0,.35)!important;}

@media(max-width:1100px){
    .dashboard-admin-strip,.dashboard-stats-grid,.admin-click-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    .dashboard-main-grid,.dashboard-secondary-grid,.dashboard-section-grid{grid-template-columns:1fr!important;gap:24px!important;}
}
@media(max-width:720px){
    .container{padding-left:14px!important;padding-right:14px!important;}
    .dashboard-admin-strip,.dashboard-stats-grid,.admin-click-stats{grid-template-columns:1fr!important;gap:16px!important;margin:22px 0 26px!important;}
    .dashboard-section,.dashboard-masonic-card{padding:18px!important;margin-top:22px!important;border-radius:18px!important;}
    .masonic-card-head,.section-header,.auto-section-header{align-items:flex-start!important;gap:12px!important;}
    .section-minimize-btn{width:34px!important;height:32px!important;}
    .treasury-stats{grid-template-columns:1fr!important;gap:18px!important;}
    html[data-theme] .treasury-circle,html[data-theme] a.treasury-circle{width:min(72vw,190px)!important;height:min(72vw,190px)!important;padding:20px!important;}
    html[data-theme] .treasury-circle strong,html[data-theme] a.treasury-circle strong{font-size:1.08rem!important;}
}
