/* Um novo olhar — shared visual language for the resident application. */
:root{--bg:#f2f4f7;--text-1:#101d2e;--text-2:#42566d;--text-3:#718194;--navy-3:#236b9d;--radius:16px;--radius-lg:22px;--shadow-sm:0 2px 10px #0f1b2d05;--shadow-md:0 8px 28px #0f1b2d0b;--border:#dce4ed}
.app-header{padding:16px max(20px,calc((100vw - 1080px)/2)) 21px;padding-top:calc(14px + env(safe-area-inset-top));box-shadow:none;background:linear-gradient(110deg,#0f1b2d,#1a2d4a)}
.app-header::after{left:max(20px,calc((100vw - 1080px)/2));width:64px;height:2px;bottom:9px}.app-header .brand .title{font-size:16px;letter-spacing:.2px}.app-header .brand .subtitle{font-size:9px;letter-spacing:1.8px;margin-top:5px}.app-header .user-chip{background:#ffffff0b;border:1px solid #ffffff12;font-size:11px}.app-header .logout{min-width:28px;min-height:28px}
.app-main{width:100%;max-width:1080px;padding:8px 24px calc(105px + env(safe-area-inset-bottom));margin:auto}
.page-intro{max-width:1080px;margin:0 auto;padding:35px 24px 24px}.page-intro[hidden]{display:none}.page-intro>p{font-size:10px;letter-spacing:2px;text-transform:uppercase;color:#337baa;font-weight:800;margin-bottom:9px}.page-intro h1{font-size:clamp(28px,4vw,40px);letter-spacing:-1.2px;line-height:1.12;font-weight:900;margin-bottom:10px}.page-intro>span{font-size:13px;color:var(--text-2);line-height:1.6}.page-intro::after{content:'';display:block;width:46px;height:3px;background:#4a9fe5;margin-top:19px;border-radius:3px}
.card,.nf-item,.notif-card,.admin-card,.cam-card{border:1px solid #dce4ed;background:#fff;border-radius:16px;box-shadow:var(--shadow-sm)}
.card{padding:20px;margin-bottom:14px}.card:hover{box-shadow:var(--shadow-sm)}.card-title{font-size:16px;font-weight:800;letter-spacing:-.2px}.card-sub{font-size:12px;line-height:1.65}.section-title{font-size:11px;letter-spacing:1.6px;margin-top:24px;margin-bottom:14px}.section-title::after{height:1px;background:#cddce8}.section-toggle{border-radius:10px}
.btn-primary{background:#102039;border-radius:10px;min-height:44px;box-shadow:none}.btn-secondary{border-radius:10px;min-height:42px;border-color:#cad7e3}.btn-small{border-radius:9px;background:#183b58;min-height:36px}.filter-chip,.cam-scope-btn{border-radius:9px}.filter-chip.active,.cam-scope-btn.active{background:#183b58;color:white}
.modal{border-radius:20px;border:1px solid #dde6ef;box-shadow:0 22px 80px #0f1b2d30}.modal h3{font-size:22px;letter-spacing:-.6px}.modal h3::after{height:3px;width:44px}.modal label{font-size:11px;letter-spacing:.6px}.modal input:not([type=checkbox]):not([type=radio]):not([type=range]),.modal textarea,.modal select,.comment-input,.mural-titulo-input{border-radius:10px;border:1px solid #ccd9e5;background:#f8fafc}.modal input:focus,.modal textarea:focus,.modal select:focus,.comment-input:focus{border-color:#4a9fe5;box-shadow:0 0 0 3px #4a9fe518}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #4a9fe5!important;outline-offset:3px}
.nf-summary{background:linear-gradient(115deg,#101e32,#203d59);border-radius:20px;padding:24px;box-shadow:none}.nf-summary .total{letter-spacing:-1px}.nf-item{padding:16px}.nf-item-nome{font-weight:800}.nf-item-val{color:#153754}.mural-thread.card{border-left:3px solid #7fb5df}.mural-msg .txt{line-height:1.75}.vote-opt-btn{border-radius:10px;min-height:44px}.vote-opt-btn.selected{border-color:#4a9fe5;background:#edf6fc}.notif-card{padding:18px}.notif-confirmed{background:#f4f9f6}.cam-container{padding:0}.cam-grid{gap:16px}.cam-card{overflow:hidden}.badge{border-radius:6px;letter-spacing:.2px}.login-card{border-radius:24px;box-shadow:0 22px 80px #06132630}.role-select-btn{box-shadow:none;border:1px solid #e5ebf2;border-radius:16px}
/* The welcome screen and permanent home share the same quiet composition. */
body[data-page=home] .app-main{max-width:640px;padding-top:8px}
.home-hub{padding:10px 0 20px;text-align:center;display:flex;flex-direction:column;align-items:center}
.home-perspective{width:clamp(200px,58vw,300px);height:clamp(140px,39vw,205px);position:relative;overflow:hidden;margin:0 auto 15px;isolation:isolate;mix-blend-mode:multiply}
.home-perspective img{width:100%;height:100%;object-fit:contain;display:block;animation:perspective-reveal 1.6s cubic-bezier(.2,.7,.2,1) both,perspective-breathe 9s 1.6s ease-in-out infinite}
.perspective-light{position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 40%,#ffffffa0 50%,transparent 60%);transform:translateX(-120%);animation:perspective-sweep 7s 1.2s ease-in-out infinite}
.home-hub>p.home-greeting{font-size:12px;color:#718194;text-transform:uppercase;letter-spacing:1.8px;margin:0}.home-name{font-size:34px;line-height:1.15;font-weight:900;letter-spacing:-1px;margin:7px 0 0;color:#101d2e}.home-accent{width:48px;height:3px;background:#69a6d6;border-radius:3px;margin:17px 0 12px}.home-hub>p.home-role{font-size:10px;letter-spacing:2px;text-transform:uppercase;color:#718194;margin:0}
.home-grid,.welcome-menu{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%;max-width:440px;margin:25px auto 0;padding-bottom:0}
.home-tile,.welcome-menu-btn{min-width:0;min-height:83px;border:0;border-radius:14px;padding:13px 4px 11px;gap:8px;background:#e8ebf0;box-shadow:none;color:#142236;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:background .2s,transform .2s}
.home-tile svg,.welcome-menu-ico svg{width:26px;height:26px}.home-tile>span:first-child{line-height:0}.home-tile-label,.welcome-menu-label{font-size:11px;font-weight:700;line-height:1.25;letter-spacing:0;overflow-wrap:normal}.home-tile:hover,.welcome-menu-btn:hover{background:#dee8f1;box-shadow:none;transform:translateY(-2px)}.home-tile:active,.welcome-menu-btn:active{transform:scale(.97)}
.welcome-screen{padding:24px 16px;align-items:safe center}.welcome-content{width:100%;max-width:440px;margin:auto}.welcome-name{font-size:34px;letter-spacing:-1px}.welcome-greeting{font-size:12px;letter-spacing:1.8px}.welcome-role{font-size:10px}.welcome-menu{animation-delay:.5s}.welcome-content .home-perspective{flex-shrink:0}
@keyframes perspective-reveal{from{opacity:0;clip-path:inset(0 50% 0 50%);transform:translateY(8px)}to{opacity:1;clip-path:inset(0);transform:translateY(0)}}
@keyframes perspective-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.025)}}
@keyframes perspective-sweep{0%,40%{transform:translateX(-120%)}70%,100%{transform:translateX(120%)}}
@media(min-width:800px){.home-hub{padding-top:20px}.home-grid{gap:12px}.home-tile{min-height:92px}.app-main .card{padding:24px}.page-intro{padding-top:42px}}
@media(max-width:480px){.app-main{padding-left:16px;padding-right:16px}.page-intro{padding:26px 18px 16px}.app-header{padding-left:16px;padding-right:16px}.app-header::after{left:16px}.app-header .brand .title{font-size:14px}.app-header .brand .subtitle{font-size:8px}.app-header .user-chip{font-size:10px;padding:4px 7px;gap:4px}.home-grid,.welcome-menu{gap:8px}.home-tile,.welcome-menu-btn{min-height:78px;padding:11px 2px}.home-tile-label,.welcome-menu-label{font-size:10px}.home-perspective{margin-bottom:10px}.card{padding:17px}.home-name{font-size:32px}}
@media(prefers-reduced-motion:reduce){.home-perspective img,.perspective-light,.welcome-content,.welcome-menu,.welcome-name,.welcome-greeting,.welcome-role,.welcome-line{animation:none!important;opacity:1;transform:none}.home-tile,.welcome-menu-btn{transition:none}.perspective-light{display:none}}
.agua-header{background:linear-gradient(115deg,#102039,#245b78);border-radius:20px;padding:22px}.central-tabs{background:#e8edf3;padding:5px;border-radius:12px;gap:5px}.central-tab{border-radius:9px;min-height:42px}.central-tab.active{background:#15334f;color:#fff;box-shadow:0 2px 8px #0f1b2d0b}.nf-summary .period-help{text-transform:none;letter-spacing:0;font-size:12px;font-weight:400;line-height:1.6}

.menu-toggle{left:max(18px,env(safe-area-inset-left));right:auto}.menu-toggle[hidden]{display:none!important}.welcome-mark{flex-shrink:0}
.welcome-mark{width:82px;height:82px;border:1px solid #77b8eb;background:linear-gradient(140deg,#236b9d,#123251);color:#fff;box-shadow:0 10px 30px #236b9d25;font-size:30px}.welcome-screen{background:radial-gradient(ellipse at 50% 20%,#e2edf7 0,transparent 55%),#f2f4f7}.welcome-content{padding:18px 0}.welcome-line{background:#60a5da}.welcome-menu-btn{border:1px solid #dce5ee;background:#ffffffa8}
.tab-bar.quick-menu{bottom:calc(14px + env(safe-area-inset-bottom))}
#nf-period{width:112px;max-width:100%;min-height:42px;padding:8px;border:1px solid #ffffff40;border-radius:10px;background:#e8eef4;color:#142236;font:inherit;text-transform:capitalize}.nf-period-year{margin-left:10px;font-size:12px;color:#bed1e2}.nf-summary .nf-actions{display:flex;gap:10px}.nf-summary .nf-actions>button{flex:1;width:auto}
.agua-actions{display:flex;flex-wrap:nowrap;gap:6px}.agua-actions>*{flex:1;min-width:0;width:0;min-height:44px;padding:6px 4px;font-size:11px;white-space:nowrap}.agua-total-item{min-width:0}.agua-total-label{white-space:nowrap}.agua-ind-card{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center}.agua-ind-nav{margin:0}.agua-ind-reading{margin:0}.agua-ind-stats{grid-column:1/-1}.agua-ind-icon{display:none}.agua-ind-num{font-size:44px}.agua-ind-counter{font-size:11px}.agua-ind-meter{padding:14px 8px;background:#fff}.agua-ind-meter-val{font-size:25px;letter-spacing:0}.agua-ind-meter-label{font-size:10px;letter-spacing:.6px}
@media(max-width:480px){body[data-page=agua] .page-intro{padding-top:16px;padding-bottom:8px}body[data-page=agua] .page-intro>p,body[data-page=agua] .page-intro::after{display:none}body[data-page=agua] .page-intro h1{font-size:26px;margin-bottom:3px}body[data-page=agua] .page-intro>span{font-size:12px}.agua-header{padding:16px;margin-bottom:8px}.agua-title{font-size:16px}.agua-mode-toggle{margin:10px 0}.agua-mode-btn{padding:8px 10px;font-size:12px}.agua-periodo,.agua-proxima{font-size:11px}.agua-proxima{padding:8px}.agua-totais{gap:8px;margin-top:10px}.agua-total-item{padding:9px 12px}.agua-total-val{font-size:18px}.agua-total-label{font-size:10px}.agua-rateio-aviso{font-size:10px;line-height:1.4}.agua-actions{margin-top:10px}.agua-individual{padding-top:4px}}
/* Water: resident totals, centered house and a complete compact table. */
.agua-total-label small{display:block;font:inherit;text-transform:none;letter-spacing:0;opacity:1;margin-top:2px}
.agua-ind-card{display:block}.agua-ind-nav{margin:8px 0 16px}.agua-ind-icon{display:block;font-size:34px;margin-bottom:5px}.agua-ind-num{font-size:64px}.agua-ind-reading{margin:12px auto 18px;max-width:300px}.agua-ind-stats{margin-top:12px}
.agua-table tr.agua-minha{background:#e2f4fc!important}.agua-table tr.agua-minha td{border-top:1px solid #63a9d4;border-bottom:1px solid #63a9d4}.agua-table tr.agua-minha td:first-child{box-shadow:inset 3px 0 #2384b6}
@media(max-width:600px){.agua-table{width:100%;table-layout:fixed;font-size:10px}.agua-table thead th,.agua-table tbody td,.agua-table tfoot td{padding:9px 3px;white-space:normal;overflow-wrap:anywhere;font-size:10px;letter-spacing:0}.agua-table th:first-child{width:9%}.agua-table .agua-casa{display:table-cell}.agua-table .agua-casa-num{font-size:12px}.agua-table .agua-consumo-cell{min-width:0}.agua-table .agua-consumo-val{padding-left:0}.agua-table .agua-consumo-bar-wrap{display:block}.agua-table .agua-consumo-bar{max-width:100%}.agua-table .agua-consumo-val{display:block}.agua-table-wrap{max-width:100%}}
@media(max-width:600px){.agua-table tfoot td{font-size:9px;overflow-wrap:normal}.agua-table tfoot strong{font-variant-numeric:tabular-nums}}

.admin-fab{bottom:calc(14px + env(safe-area-inset-bottom));width:52px;height:52px}.reu-cfg-fab{bottom:calc(19px + env(safe-area-inset-bottom))}
.app-header .user-chip{background:transparent;border:0;padding:0;gap:12px}.app-header .user-chip .logout{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 12px;border:1px solid #ffffff40;border-radius:10px;background:#ffffff0d;color:#fff;text-decoration:none;font-size:12px;cursor:pointer;opacity:1}.app-header .logout svg{width:17px;height:17px}.app-header .user-chip .logout:hover{background:#ffffff20}
.camera-loading{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:min(60dvh,540px);padding:32px 20px;border-radius:22px;background:radial-gradient(ellipse at top,#234362,#0f1b2d 75%);color:white}.camera-loading-logo{display:grid;place-items:center;width:68px;height:68px;border-radius:22px;border:1px solid #81b5df70;background:#ffffff09;box-shadow:0 10px 35px #0002;font-size:27px;font-weight:900}.camera-loading-brand{margin-top:20px;font-size:9px;letter-spacing:2.5px;color:#bed4e6}.camera-loading h2{font-size:clamp(27px,5vw,42px);letter-spacing:-1px;margin:18px 0 25px;color:#fff}.camera-loading p{font-size:12px;color:#bed4e6;line-height:1.6;margin:20px 0 0}.camera-loading-track{width:116px;height:2px;overflow:hidden;background:#ffffff15}.camera-loading-track span{display:block;width:45%;height:100%;background:#74bdf3;animation:camera-sweep 1.5s ease-in-out infinite}@keyframes camera-sweep{from{transform:translateX(-110%)}to{transform:translateX(330%)}}@media(prefers-reduced-motion:reduce){.camera-loading-track span{animation:none;width:100%}}@media(max-width:380px){.app-header .user-chip{gap:5px}.app-header .user-chip .logout{padding:8px;font-size:11px}}

/* Camera controls appear only when the loading scene has finished. */
body[data-page="cameras"]:has(.camera-loading) #page-intro,
.cam-container:has(.camera-loading)>.section-header,
.cam-container:has(.camera-loading)>.cam-scope-bar{display:none}
body[data-page="cameras"] .camera-loading{min-height:calc(100dvh - 190px);box-sizing:border-box}

/* Loading scene follows the standard light application background. */
.camera-loading{background:var(--bg);color:var(--text-1);border-radius:0}
.camera-loading-logo{background:#1a2d4a;color:#fff;border-color:#81b5df70;box-shadow:0 10px 30px #0f1b2d12}
.camera-loading h2{color:var(--text-1)}
.camera-loading-brand,.camera-loading p{color:var(--text-2)}
.camera-loading-track{background:#dce4ed}

/* Bounded, touch-friendly month and reading choosers. */
#agua-periodo-select[hidden],#nf-period[hidden]{display:none!important}
.period-picker-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;max-width:100%;padding:9px 12px;border:1px solid #ccd9e5;border-radius:10px;background:#f2f4f7;color:#101d2e;font:inherit;font-size:12px;cursor:pointer}
.period-picker-trigger::after{content:'⌄';font-size:16px}
.period-picker-overlay{position:fixed;inset:0;z-index:20000;background:#0f1b2d60;display:grid;place-items:center;padding:20px;box-sizing:border-box}
.period-picker-dialog{width:min(340px,100%);max-height:65dvh;overflow:hidden;border-radius:18px;background:var(--bg);color:var(--text-1);box-shadow:0 20px 70px #0003;display:flex;flex-direction:column}
.period-picker-dialog header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;gap:12px}
.period-picker-dialog h2{font-size:16px;margin:0}
.period-picker-close{width:36px;height:36px;border:0;border-radius:50%;background:#e4eaf1;font-size:24px;color:#101d2e;cursor:pointer}
.period-picker-options{max-height:44dvh;overflow:auto;overscroll-behavior:contain;padding:0 8px 8px}
.period-picker-options button{display:block;width:100%;min-height:44px;text-align:left;border:0;border-radius:8px;padding:12px;background:transparent;color:#101d2e;font:inherit;font-size:14px;cursor:pointer}
.period-picker-options button[aria-pressed=true]{background:#dcebf7;color:#195681;font-weight:700}
.period-picker-options button:focus-visible{outline:2px solid #4a9fe5;outline-offset:-2px}
body[data-page=mural]:has(.mural-loading) #page-intro{display:none}
.mural-loading{min-height:calc(100dvh - 190px);box-sizing:border-box}
.app-entry-loading{min-height:100dvh;box-sizing:border-box}

.notif-btn-reply{min-height:44px;border:1px solid #bfd2e2;border-radius:9px;background:#edf5fc;color:#195681;padding:9px 12px;font:700 12px inherit;cursor:pointer}.notif-delivery{margin:18px 0;line-height:1.6}.notif-form .period-picker-trigger{width:100%;font-size:14px;min-height:44px}.notif-actions{flex-wrap:wrap}
