:root{--bg:#f3f5f3;--card:#fff;--ink:#17211d;--muted:#748078;--green:#173e31;--green2:#245f4c;--soft:#e8f1ed;--line:#e4e9e6;--warn:#a65b17;--danger:#b64040;--shadow:0 10px 28px rgba(20,50,39,.08)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink);-webkit-tap-highlight-color:transparent}body{overscroll-behavior-y:none}.app-shell{width:100%;max-width:560px;min-height:100vh;margin:auto;background:var(--bg);position:relative;padding-bottom:94px}.topbar{height:76px;padding:max(14px,env(safe-area-inset-top)) 20px 12px;display:flex;align-items:flex-end;justify-content:space-between;background:rgba(243,245,243,.94);backdrop-filter:blur(18px);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:10px}.brand-mark{width:38px;height:38px;border-radius:14px;background:var(--green);color:white;display:grid;place-items:center;font-weight:800;font-family:Georgia,serif;font-size:21px}.brand strong,.brand small{display:block}.brand strong{font-size:15px;letter-spacing:.08em}.brand small{font-size:11px;color:var(--muted);margin-top:1px}.content{padding:12px 18px 28px}.bottom-nav{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:560px;display:grid;grid-template-columns:repeat(5,1fr);padding:10px 8px calc(9px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);backdrop-filter:blur(22px);border-top:1px solid var(--line);z-index:30}.bottom-nav a{text-decoration:none;color:#8b958f;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:18px;min-height:46px;justify-content:center}.bottom-nav small{font-size:10px;font-weight:650}.bottom-nav a.active{color:var(--green)}.bottom-nav a.active span{background:var(--soft);border-radius:14px;min-width:34px;text-align:center;padding:4px 8px}.greeting{display:flex;align-items:center;justify-content:space-between;padding:8px 2px 14px}.greeting small{color:var(--muted);font-size:14px}.greeting h1{font-size:30px;line-height:1.08;margin:3px 0 0}.avatar,.profile-avatar{width:48px;height:48px;border-radius:18px;background:var(--green);color:#fff;display:grid;place-items:center;font-weight:800;font-size:20px}.notice-card{display:flex;align-items:center;justify-content:space-between;background:var(--green);color:white;border-radius:20px;padding:17px 18px;margin:4px 0 24px;box-shadow:var(--shadow)}.notice-card div{display:flex;flex-direction:column;gap:4px}.notice-card b{font-size:15px}.notice-card span{font-size:12px;opacity:.8}.notice-card>span{font-size:28px;opacity:.8}.dashboard h2{font-size:17px;margin:18px 0 12px}.cards-stack{display:flex;flex-direction:column;gap:10px}.event-card,.simple-card,.quota-card,.empty-card,.profile-card,.card{background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:0 4px 14px rgba(24,46,37,.035)}.event-card{display:flex;align-items:center;padding:12px;text-decoration:none;color:inherit;gap:12px}.date-box{width:54px;height:58px;border-radius:16px;background:var(--soft);color:var(--green);display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none}.date-box strong{font-size:23px;line-height:1}.date-box span{font-size:9px;font-weight:800;margin-top:4px}.event-info{min-width:0;display:flex;flex-direction:column;gap:4px;flex:1}.event-info strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.event-info span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chev{font-size:25px;color:#a3aaa6}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.quick-grid a{background:white;border:1px solid var(--line);border-radius:20px;padding:16px;text-decoration:none;color:inherit;display:flex;flex-direction:column;gap:4px}.quick-grid b{font-size:14px}.quick-grid small{font-size:11px;color:var(--muted);line-height:1.3}.quick-icon{width:38px;height:38px;border-radius:14px;background:var(--soft);color:var(--green);display:grid;place-items:center;font-size:18px;margin-bottom:8px}.page-head{padding:8px 2px 16px}.page-head h1{font-size:28px;margin:0 0 5px}.page-head p{margin:0;color:var(--muted);font-size:13px}.simple-card{padding:16px;display:flex;flex-direction:column;gap:6px}.simple-card span,.simple-card small{font-size:12px;color:var(--muted)}.empty-card{padding:22px;text-align:center;display:flex;flex-direction:column;gap:7px}.empty-card b{font-size:14px}.empty-card span{font-size:12px;color:var(--muted);line-height:1.45}.quota-card{display:flex;justify-content:space-between;gap:16px;padding:16px}.quota-card>div{display:flex;flex-direction:column;gap:4px}.quota-card strong{font-size:19px}.quota-card span{font-size:11px;color:var(--muted)}.quota-right{align-items:flex-end}.quota-right b{font-size:14px}.status{padding:4px 8px;border-radius:999px!important;font-weight:700!important}.status.ok{background:#e6f3ea;color:#34724a}.status.warn{background:#fff1e3;color:var(--warn)}.profile-card{padding:24px 18px;text-align:center}.profile-avatar{margin:0 auto 10px;width:66px;height:66px;border-radius:23px;font-size:26px}.profile-card h2{font-size:20px;margin:0 0 20px}.profile-line{text-align:left;border-top:1px solid var(--line);padding:12px 2px;display:flex;flex-direction:column;gap:3px}.profile-line small{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.profile-line span{font-size:14px}.primary-btn,.secondary-btn{border:0;border-radius:17px;min-height:52px;width:100%;font-size:15px;font-weight:750;cursor:pointer}.primary-btn{background:var(--green);color:white}.primary-btn:disabled{opacity:.45}.secondary-btn{background:white;border:1px solid var(--line);color:var(--ink);margin-top:12px}.danger-link{border:0;background:transparent;color:var(--danger);width:100%;padding:18px 8px;font-size:13px}.auth-screen,.pin-screen{min-height:calc(100vh - 120px);display:flex;flex-direction:column;justify-content:center}.auth-hero{text-align:center;padding:10px 10px 20px}.hero-icon{width:58px;height:58px;border-radius:20px;background:var(--soft);color:var(--green);display:grid;place-items:center;margin:0 auto 15px;font-size:24px}.auth-hero h1,.welcome h1{margin:0;font-size:26px}.auth-hero p{font-size:13px;color:var(--muted);line-height:1.45;margin:8px auto 0;max-width:330px}.form-card{padding:18px}.form-card label{display:block;font-size:12px;font-weight:700;margin:13px 0 7px}.form-card label:first-child{margin-top:0}.form-card input{width:100%;height:50px;border:1px solid #dce3df;background:#fafcfb;border-radius:15px;padding:0 14px;font-size:16px;outline:none}.form-card input:focus{border-color:#8aa799;box-shadow:0 0 0 3px rgba(36,95,76,.08)}.form-card .big-code{font-size:25px;letter-spacing:.25em;text-align:center;font-weight:800}.form-card .primary-btn{margin-top:18px}.muted{color:var(--muted);font-weight:400}.security-note{text-align:center;font-size:11px;line-height:1.45;color:var(--muted);padding:14px 22px}.welcome{text-align:center;margin-bottom:20px}.welcome span,.welcome p{color:var(--muted);font-size:13px}.welcome h1{margin:4px 0}.welcome p{margin:6px 0}.pin-dots{display:flex;justify-content:center;gap:12px;height:24px;margin:4px 0 18px}.pin-dots i{width:13px;height:13px;border:2px solid #b9c3bd;border-radius:50%;transition:.15s}.pin-dots i.on{background:var(--green);border-color:var(--green);transform:scale(1.06)}.pin-dots i.optional{opacity:.4}.keypad{display:grid;grid-template-columns:repeat(3,78px);justify-content:center;gap:10px 18px;margin:4px auto 18px}.keypad button{width:78px;height:64px;border:0;border-radius:22px;background:white;box-shadow:0 3px 10px rgba(20,50,39,.04);font-size:24px;color:var(--ink);font-weight:650}.keypad button:active{transform:scale(.96);background:var(--soft)}.keypad .ghost{font-size:11px;background:transparent;box-shadow:none;color:var(--muted)}.login-btn{max-width:320px;display:block;margin:auto}.text-link{display:block;text-align:center;margin:16px auto 0;color:var(--muted);font-size:12px;text-decoration:none}.error{font-size:11px;color:var(--danger);margin-top:6px}.error.center{text-align:center;margin:-8px 0 12px}.event-detail{padding:8px 2px}.event-date-pill{display:inline-block;padding:7px 11px;border-radius:999px;background:var(--soft);color:var(--green);font-size:11px;font-weight:750}.event-detail h1{font-size:28px;line-height:1.15;margin:12px 0 22px}.detail-row{display:flex;gap:12px;align-items:center;background:white;border:1px solid var(--line);border-radius:18px;padding:14px;margin-bottom:12px}.detail-row>span{width:36px;height:36px;border-radius:12px;background:var(--soft);display:grid;place-items:center;color:var(--green)}.detail-row div{display:flex;flex-direction:column;gap:2px}.detail-row small{font-size:10px;color:var(--muted)}.detail-row b{font-size:13px}.detail-text{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;font-size:13px;line-height:1.55;margin-bottom:12px}.info-banner{border-radius:17px;background:#fff9ed;color:#806435;padding:14px;font-size:11px;line-height:1.5;margin:14px 0}.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:98px;max-width:88%;background:#15271f;color:white;border-radius:14px;padding:12px 16px;font-size:12px;z-index:99;box-shadow:var(--shadow)}@media(min-width:561px){body{background:#dfe4e1}.app-shell{box-shadow:0 0 40px rgba(15,40,30,.12)}}
.text-button{display:block;border:0;background:transparent;color:var(--green2);font-size:12px;font-weight:700;margin:14px auto 0;padding:10px 14px;cursor:pointer}.device-info-card{margin-top:14px;background:var(--soft);border:1px solid #d9e8e1;border-radius:18px;padding:15px 16px;display:flex;flex-direction:column;gap:5px}.device-info-card b{font-size:13px;color:var(--green)}.device-info-card span{font-size:11px;line-height:1.45;color:var(--muted)}

/* V010 - Eventos mobile */
.events-page-head{margin-bottom:14px}.events-list{display:flex;flex-direction:column;gap:14px;padding-bottom:8px}.mobile-event-card{background:#fff;border:2px solid #b9e5f8;border-radius:12px;padding:16px;box-shadow:0 7px 24px rgba(17,57,47,.06)}.mobile-event-card h2{margin:0;color:#294978;font-size:20px;line-height:1.08;font-weight:800}.event-date-full{margin-top:8px;color:#27384a;font-size:14px}.event-divider{width:50px;height:1px;background:#bfd1dc;margin:12px 0}.event-scope{font-size:13px;font-weight:800;letter-spacing:.03em;color:#1c2c31;margin-bottom:12px}.event-details{display:flex;flex-direction:column;gap:9px;font-size:14px;color:#34434b;line-height:1.35}.event-details strong{color:#17272d}.event-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px}.event-actions form{margin:0}.event-btn{border:0;border-radius:5px;padding:8px 11px;font-size:11px;font-weight:800;color:#fff;cursor:pointer;line-height:1}.event-btn.success{background:#d97706}.event-btn.danger{background:#b91c1c}.event-btn.attendees{background:#8b1111}.event-btn.attendees.has-attendees{background:#159447}.event-btn.attendees.no-attendees{background:#8b1111}.webapp-alert{padding:11px 13px;border-radius:9px;margin:0 0 12px;font-size:13px}.webapp-alert.error{background:#fff1f2;color:#b42318;border:1px solid #fecdd3}.attendees-dialog{width:min(92vw,460px);max-height:78vh;border:0;border-radius:18px;padding:0;background:#fff;box-shadow:0 30px 80px rgba(0,0,0,.25)}.attendees-dialog::backdrop{background:rgba(11,28,24,.55);backdrop-filter:blur(2px)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;padding:17px 18px;border-bottom:1px solid #edf1ef}.dialog-head strong{display:block;font-size:17px;color:#173b2f}.dialog-head small{display:block;margin-top:4px;color:#718079;line-height:1.25}.dialog-head button{border:0;background:#edf5f2;color:#173b2f;width:34px;height:34px;border-radius:50%;font-size:23px;line-height:30px;cursor:pointer}.attendees-body{padding:8px 18px 4px;overflow:auto;max-height:52vh}.attendee-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #edf1ef;font-size:14px;color:#1e2d32}.attendee-row b{white-space:nowrap;color:#173b2f;font-size:13px}.attendees-empty{padding:24px 0;text-align:center;color:#78867f;font-size:14px}.dialog-close{display:block;width:calc(100% - 36px);margin:12px 18px 18px;border:0;border-radius:11px;padding:12px;background:#173b2f;color:#fff;font-weight:800;cursor:pointer}@media(max-width:380px){.mobile-event-card{padding:14px}.mobile-event-card h2{font-size:18px}.event-btn{padding:8px 9px;font-size:10px}}

/* V015 - detalhes da inscrição mobile */
.event-btn.details{background:#2563eb;color:#fff;text-decoration:none;display:flex;align-items:center;justify-content:center}
.compact-page-head{padding-bottom:8px}
.back-link{display:inline-block;margin-bottom:8px;color:#2563eb;text-decoration:none;font-weight:800;font-size:14px}
.detail-event-card{margin-bottom:14px}
.mobile-panel{background:#fff;border:1px solid #e6eee9;border-radius:22px;padding:18px;margin:0 0 14px;box-shadow:0 10px 26px rgba(20,55,38,.06)}
.mobile-panel h2{font-size:18px;margin:0 0 3px;color:#18352a}
.mobile-panel p{font-size:13px;color:#708079;margin:0}
.panel-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.round-add-btn{border:0;background:#eaf7ef;color:#087c48;width:38px;height:38px;border-radius:50%;font-size:26px;line-height:1;font-weight:500}
.companion-list{display:grid;gap:8px;margin-bottom:14px}
.companion-row{padding:12px 13px;background:#f7faf8;border-radius:14px;display:flex;justify-content:space-between;align-items:center}
.companion-row strong{display:block;font-size:14px;color:#233b31}
.companion-row small{display:inline-block;margin-top:4px;padding:3px 7px;border-radius:999px;background:#fff3d8;color:#8a5b00;font-size:11px;font-weight:800}
.panel-empty{padding:13px;background:#f7faf8;border-radius:14px;color:#74847d;font-size:13px}
.wide-action-btn,.wide-danger-btn{width:100%;min-height:46px;border-radius:14px;border:0;font-weight:900;font-size:13px;letter-spacing:.03em}
.wide-action-btn{background:#eaf7ef;color:#087c48}
.wide-danger-btn{background:#fff0f0;color:#c0392b}
.danger-panel{border-color:#f3dada}
.danger-panel h2{color:#a9352c}
.danger-panel p{margin-bottom:14px}
.mobile-form-stack{display:grid;gap:13px}
.mobile-form-stack label,.dialog-form-body label{display:grid;gap:6px}
.mobile-form-stack label>span,.dialog-form-body label>span{font-size:12px;font-weight:800;color:#5d6d66}
.mobile-form-stack input,.dialog-form-body input[type="text"]{width:100%;box-sizing:border-box;border:1px solid #d8e2dc;border-radius:13px;padding:13px 14px;font-size:16px;outline:none;background:#fbfdfc}
.mobile-form-stack input:focus,.dialog-form-body input[type="text"]:focus{border-color:#2c9c66;box-shadow:0 0 0 3px rgba(44,156,102,.10)}
.form-dialog form{margin:0}
.dialog-form-body{padding:18px;display:grid;gap:14px}
.check-line{display:flex!important;align-items:center;gap:10px!important;padding:12px;background:#f7faf8;border-radius:13px}
.check-line input{width:20px;height:20px}
.dialog-form-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 18px 18px}
.dialog-form-actions button{min-height:44px;border-radius:12px;border:0;font-weight:900}
.dialog-secondary{background:#edf1ef;color:#55635d}
.dialog-primary{background:#108754;color:#fff}
.expense-summary{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:12px}
.expense-summary>div{background:#f7faf8;border-radius:13px;padding:12px}
.expense-summary span{display:block;font-size:11px;color:#718078;margin-bottom:4px}
.expense-summary strong{font-size:15px;color:#233b31}
.dialog-form-body input[type="number"]{width:100%;box-sizing:border-box;border:1px solid #d8e2dc;border-radius:13px;padding:13px 14px;font-size:16px;outline:none;background:#fbfdfc}
.dialog-form-body input[type="number"]:focus{border-color:#2c9c66;box-shadow:0 0 0 3px rgba(44,156,102,.10)}

/* V016 - detalhes mobile e remoção de acompanhantes */
.back-link-mobile{display:flex!important;align-items:center;justify-content:center;width:100%;min-height:52px;box-sizing:border-box;margin:0 0 16px!important;border-radius:15px;background:#edf4ff;color:#1d4ed8!important;font-size:14px!important;font-weight:900!important;letter-spacing:.02em;text-decoration:none;box-shadow:0 4px 14px rgba(37,99,235,.08)}
.companion-row{gap:10px}.companion-row>div{min-width:0;flex:1}.companion-row form{margin:0;flex:0 0 auto}.companion-remove-btn{border:0;border-radius:10px;background:#fff0f0;color:#b42318;min-height:38px;padding:0 11px;font-size:10px;font-weight:900;letter-spacing:.02em;cursor:pointer}
.companion-remove-btn:active{transform:scale(.98)}

/* Minhas inscrições - cartões mobile */
.registration-card{display:block;text-decoration:none;color:inherit;padding:16px 17px;transition:transform .12s ease,box-shadow .12s ease}.registration-card:active{transform:scale(.985)}.registration-card-past{background:#eaf5ee;border-color:#d7eadf}.registration-main{display:flex;flex-direction:column;gap:6px}.registration-main strong{font-size:16px;line-height:1.25;color:var(--ink)}.registration-main span{font-size:12px;color:var(--muted)}.registration-date{font-weight:700;color:var(--green)!important}.registration-expenses{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;padding-top:11px;border-top:1px solid rgba(23,62,49,.12)}.registration-expenses span{font-size:12px;color:var(--ink);background:rgba(255,255,255,.64);border-radius:12px;padding:9px 10px}.registration-expenses b{display:block;font-size:10px;color:var(--muted);margin-bottom:2px}.registration-open{display:block;text-align:right;margin-top:11px;font-size:11px!important;font-weight:800;color:var(--green)!important}@media(max-width:380px){.registration-expenses{grid-template-columns:1fr}}

/* V018 - Notificações */
.bottom-nav{overflow-x:auto;justify-content:flex-start;scrollbar-width:none}
.bottom-nav::-webkit-scrollbar{display:none}
.bottom-nav>a{min-width:70px;flex:1 0 16.666%;padding-left:3px;padding-right:3px}
.bottom-nav>a small{font-size:10px}
.notification-list{display:flex;flex-direction:column;gap:10px}
.notification-card{background:#fff;border:1px solid #dbe4df;border-radius:18px;overflow:hidden;box-shadow:0 2px 8px rgba(15,56,43,.035)}
.notification-card summary{list-style:none;cursor:pointer;padding:14px 15px}
.notification-card summary::-webkit-details-marker{display:none}
.notification-main{display:flex;align-items:center;gap:11px;min-width:0}
.notification-icon{width:38px;height:38px;border-radius:12px;background:#eef8f4;color:#0f513d;display:flex;align-items:center;justify-content:center;flex:0 0 38px;font-size:18px}
.notification-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.notification-copy strong{font-size:14px;line-height:1.25;color:#10211a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notification-copy small{font-size:11px;color:#6f7d77}
.notification-state{font-size:9px;font-weight:800;text-transform:uppercase;border-radius:999px;padding:5px 7px;background:#eef1ef;color:#52605b;flex:0 0 auto}
.notification-state.state-enviado{background:#e8f7ef;color:#087443}
.notification-state.state-pendente{background:#fff4d9;color:#966300}
.notification-state.state-erro{background:#feeceb;color:#b02a1f}
.notification-body{border-top:1px solid #edf1ef;padding:14px 15px;color:#27362f;font-size:13px;line-height:1.55;overflow-wrap:anywhere}
.notification-message img{max-width:100%;height:auto}
.notification-message table{max-width:100%!important;width:100%!important}
.notification-error{margin-top:12px;background:#fff1f0;border-radius:10px;padding:10px;color:#a62f26;font-size:12px}
.empty-card{text-align:center;background:#fff;border:1px solid #dbe4df;border-radius:18px;padding:28px 20px;color:#66736e}
.empty-card strong{display:block;color:#14241d;margin:8px 0 4px}
.empty-card p{margin:0;font-size:12px;line-height:1.5}
.empty-icon{width:46px;height:46px;margin:0 auto;border-radius:14px;background:#eef8f4;display:flex;align-items:center;justify-content:center;color:#0f513d;font-size:20px}

/* V020 - manter os 6 menus mobile numa única linha, sem alterar o aspeto */
.bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr));overflow:hidden}
.bottom-nav>a{min-width:0!important;width:auto;padding-left:0;padding-right:0}

/* V023 - edição mobile dos dados do perfil */
.profile-edit-btn{width:100%;min-height:48px;margin-top:18px;border:0;border-radius:14px;background:#154f3d;color:#fff;font-size:13px;font-weight:900;cursor:pointer}
.profile-edit-btn:active{transform:scale(.99)}
.profile-dialog{width:min(440px,calc(100vw - 24px));max-width:none;border:0;border-radius:22px;padding:0;box-shadow:0 22px 60px rgba(18,48,38,.22)}
.profile-dialog::backdrop{background:rgba(16,35,28,.35);backdrop-filter:blur(2px)}
.profile-dialog-head{display:flex;flex-direction:column;gap:3px;margin-bottom:2px}.profile-dialog-head strong{font-size:19px;color:#142b22}.profile-dialog-head span{font-size:12px;color:#728078}
.profile-dialog input[type="email"],.profile-dialog input[type="text"]{width:100%;box-sizing:border-box;border:1px solid #d8e2dc;border-radius:13px;padding:13px 14px;font-size:16px;outline:none;background:#fbfdfc}
.profile-dialog input:focus{border-color:#2c9c66;box-shadow:0 0 0 3px rgba(44,156,102,.10)}
.profile-success,.profile-error{border-radius:14px;padding:12px 14px;margin:0 0 12px;font-size:12px;font-weight:700}.profile-success{background:#e9f7ef;color:#087443}.profile-error{background:#fff0ef;color:#b02a1f}

/* V025: botão de cartazes, mantendo o desenho dos restantes botões. */
.event-btn.posters{background:#7c3aed;color:#fff;text-decoration:none}
.event-btn.posters:active{filter:brightness(.92)}
.posters-list{display:grid;gap:14px}
.poster-card{background:#fff;border:1px solid #dce5e1;border-radius:18px;padding:12px;box-shadow:0 4px 14px rgba(16,54,43,.05)}
.poster-card img{display:block;width:100%;height:auto;border-radius:12px}
.poster-title{font-weight:800;margin:2px 2px 10px;color:#123f34}

/* V026 - pesquisa nas notificações */
.notification-search{display:grid;grid-template-columns:1fr auto;gap:8px;margin:0 0 14px}
.notification-search-box{min-width:0;height:48px;background:#fff;border:1px solid #dbe4df;border-radius:15px;display:flex;align-items:center;padding:0 11px;gap:8px}
.notification-search-box>span{font-size:20px;color:#6f7d77;line-height:1}
.notification-search-box input{min-width:0;flex:1;border:0;outline:0;background:transparent;font-size:14px;color:#17211d;height:100%;padding:0}
.notification-search-box input::placeholder{color:#89948f}
.notification-search-clear{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#eef2f0;text-decoration:none;color:#52605b;font-size:20px;line-height:1}
.notification-search-btn{border:0;border-radius:14px;background:#173e31;color:#fff;font-size:12px;font-weight:800;padding:0 14px;min-height:48px}
@media(max-width:360px){.notification-search{grid-template-columns:1fr}.notification-search-btn{min-height:44px}}

/* Notificações Push - Perfil */
.push-card{margin-top:16px;background:#fff;border:1px solid #e7ece9;border-radius:18px;padding:16px;display:grid;grid-template-columns:44px 1fr;gap:12px;box-shadow:0 8px 24px rgba(18,56,44,.06)}
.push-card-icon{width:44px;height:44px;border-radius:14px;background:#eef5f2;display:flex;align-items:center;justify-content:center;font-size:22px}
.push-card-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
.push-card-copy b{font-size:15px;color:#183c31}
.push-card-copy span{font-size:12px;line-height:1.4;color:#74817c}
.push-toggle-btn{grid-column:1/-1;width:100%;border:0;border-radius:13px;padding:13px 14px;background:#173b2f;color:#fff;font-weight:800;font-size:14px;cursor:pointer}
.push-toggle-btn.is-active{background:#eef3f6;color:#214d6b;border:1px solid #d5e0e7}
.push-toggle-btn:disabled{opacity:.55;cursor:default}

/* V029: destaque de eventos da confraria e inscrições do confrade */
.mobile-event-card.own-confraria-event{border:3px solid #c62828}
.mobile-event-card.subscribed-event{background:#e6f3ea}
.mobile-event-card.own-confraria-event.subscribed-event{border:3px solid #c62828;background:#e6f3ea}
/* V041 - estado Push e versão */
.app-version{display:inline-block;margin-left:4px;font-size:10px;font-weight:800;color:#8a9994;letter-spacing:.02em;vertical-align:baseline}
.push-card-copy span.is-ok{color:#287b51;font-weight:700}
.push-card-copy span.is-error{color:#b42318;font-weight:700}
.push-card-copy span.is-warning{color:#9a6700;font-weight:700}


/* V044 - favicon/logótipo dinâmico por confraria e barra inferior com 5 menus */
.bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));overflow:hidden}
.bottom-nav>a{min-width:0!important;width:auto;padding-left:0;padding-right:0}
.bottom-nav>a>span{font-size:21px;line-height:1.1}
.bottom-nav>a.active>span{min-width:38px}

.brand-mark-image{overflow:hidden;background:transparent}.brand-mark-image img{width:100%;height:100%;display:block;object-fit:contain;border-radius:14px}

/* V049 - gestão de eventos classe 99 */
.events-admin-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.events-admin-head>div{min-width:0}.event-add-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 14px;border-radius:12px;background:#173b2f;color:#fff;text-decoration:none;font-weight:800;font-size:13px;white-space:nowrap;box-shadow:0 4px 12px rgba(23,59,47,.16)}.event-admin-title{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}.admin-event-form{display:grid;gap:14px}.admin-form-card{background:#fff;border:1px solid #e8ece9;border-radius:20px;padding:18px;box-shadow:0 5px 18px rgba(27,55,44,.06);margin-bottom:14px}.admin-form-card label{display:grid;gap:7px;margin-bottom:14px}.admin-form-card label>span,.poster-upload-box>span{font-size:12px;font-weight:800;color:#43554d;text-transform:uppercase;letter-spacing:.03em}.admin-form-card input,.admin-form-card select,.admin-form-card textarea{width:100%;box-sizing:border-box;border:1px solid #d9e2dd;border-radius:12px;padding:12px 13px;font:inherit;background:#fbfcfb;color:#1c2924}.admin-form-card textarea{resize:vertical;min-height:110px}.admin-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.admin-checks{display:flex;flex-wrap:wrap;gap:12px}.admin-checks label{display:flex;align-items:center;gap:7px;margin:0;padding:8px 10px;background:#f4f7f5;border-radius:10px;font-size:13px;font-weight:700}.admin-checks input{width:auto}.admin-card-title{display:flex;flex-direction:column;gap:3px;margin-bottom:14px}.admin-card-title b{font-size:17px}.admin-card-title span,.poster-upload-box small{font-size:12px;color:#718078}.poster-upload-box{border:1px dashed #aabbb2;border-radius:14px;padding:14px;margin:0!important;background:#f8faf9}.poster-upload-box input{background:#fff}.admin-form-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:10px;margin-bottom:18px}.admin-primary-btn,.admin-secondary-btn{min-height:48px;border:0;border-radius:14px;display:flex;align-items:center;justify-content:center;font-weight:800;text-decoration:none;font-size:14px}.admin-primary-btn{background:#173b2f;color:#fff}.admin-secondary-btn{background:#eef2f0;color:#26362f}.admin-posters-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.admin-poster-item{position:relative;border:1px solid #e0e7e3;border-radius:14px;padding:8px;background:#fafcfb}.admin-poster-item img{display:block;width:100%;aspect-ratio:3/4;object-fit:contain;background:#f0f3f1;border-radius:9px}.poster-cover-badge{position:absolute;top:14px;left:14px;background:#173b2f;color:#fff;padding:5px 8px;border-radius:8px;font-size:10px;font-weight:900}.admin-poster-actions{display:grid;gap:6px;margin-top:8px}.admin-poster-actions form{margin:0}.admin-poster-actions button{width:100%;border:0;border-radius:9px;padding:8px;font-weight:800;background:#e9f4ef;color:#174d37}.admin-poster-actions button.remove{background:#fbe9e9;color:#9b2424}

/* V049 - atualizador WebAPP classe 99 */
@media(max-width:420px){.admin-form-grid{grid-template-columns:1fr}.events-admin-head{align-items:flex-start}.event-add-btn{min-height:38px;padding:0 12px}.admin-form-actions{grid-template-columns:1fr}.admin-posters-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.autocomplete-results{position:relative;z-index:20;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-top:4px}.autocomplete-item{display:block;width:100%;text-align:left;padding:10px 12px;border:0;border-bottom:1px solid #eee;background:#fff}.autocomplete-item:last-child{border-bottom:0}.admin-registration-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #eee}.admin-registration-row small{display:block;color:#6b7280}.admin-danger-btn{background:#8b1e1e;color:#fff;border:0;border-radius:9px;padding:8px 12px}.admin-inline-form{min-width:0}

/* V052 - barra inferior mobile sempre fixa ao viewport */
.bottom-nav{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    margin:0 auto!important;
    transform:none!important;
    width:100%!important;
    max-width:560px!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    z-index:999!important;
    overflow:hidden!important;
    padding:10px 8px calc(9px + env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.98)!important;
    border-top:1px solid var(--line)!important;
    -webkit-transform:translateZ(0);
    backface-visibility:hidden;
}
.bottom-nav>a{min-width:0!important;width:auto!important;flex:none!important}
.app-shell{padding-bottom:calc(94px + env(safe-area-inset-bottom))!important}

/* V053 - teste Push por dispositivo */
.push-test-btn{grid-column:1/-1;width:100%;border:1px solid #d5e0e7;border-radius:13px;padding:12px 14px;background:#fff;color:#173b2f;font-weight:800;font-size:13px;cursor:pointer}
.push-test-btn:disabled{opacity:.55;cursor:default}

.push-repair-btn{grid-column:1/-1;width:100%;border:1px solid #f0c9c5;border-radius:13px;padding:12px 14px;background:#fff7f6;color:#a92d24;font-weight:800;font-size:13px;cursor:pointer}
.push-repair-btn:disabled{opacity:.55;cursor:default}

/* V059 - alerta Push compacto no cabeçalho */
.top-actions{display:flex;align-items:center;justify-content:flex-end;margin-left:auto;min-width:0}
.top-push-btn{border:0;border-radius:999px;background:#b42318;color:#fff;font-size:11px;font-weight:800;line-height:1.15;padding:7px 10px;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.12);cursor:pointer;max-width:145px}
.top-push-btn:hover,.top-push-btn:focus{background:#921c13;color:#fff}
.top-push-btn:disabled{opacity:.65;cursor:wait}
@media(max-width:390px){.top-push-btn{font-size:10px;padding:6px 8px;max-width:125px}.topbar .brand{min-width:0}.topbar .brand>div:last-child{min-width:0}}

/* V060 - Utilizadores com acesso à WebAPP */
.access-users-summary-card,.access-users-card,.access-detail-card{background:#fff;border-radius:18px;padding:16px;margin:16px 0;box-shadow:0 8px 24px rgba(26,48,39,.07);border:1px solid rgba(23,59,47,.08)}
.access-users-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}.access-users-summary-head>div{display:flex;flex-direction:column;gap:3px}.access-users-summary-head b{font-size:16px}.access-users-summary-head span{font-size:12px;color:#68766f}.access-users-count{min-width:30px;height:30px;padding:0 8px;border-radius:999px;background:#edf5f1!important;color:#173b2f!important;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:13px!important}
.access-user-mini-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 2px;border-top:1px solid #edf1ef;color:#173b2f;text-decoration:none}.access-user-mini-row>div{display:flex;flex-direction:column;gap:2px;min-width:0}.access-user-mini-row b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.access-user-mini-row small{font-size:11px;color:#75817c}.access-user-mini-row>span{font-size:24px;color:#8a9891}.access-users-open-all{display:flex;justify-content:center;margin-top:10px;background:#173b2f;color:#fff;text-decoration:none;border-radius:12px;padding:11px 14px;font-size:13px;font-weight:800}.access-users-empty-inline{display:block;color:#738079;font-size:13px;padding:10px 0}
.access-users-card{padding:4px 16px}.access-user-row{display:flex;align-items:center;gap:11px;padding:14px 0;border-bottom:1px solid #edf1ef;text-decoration:none;color:#173b2f}.access-user-row:last-child{border-bottom:0}.access-user-avatar{width:42px;height:42px;border-radius:13px;background:#e8f1ed;color:#173b2f;font-weight:900;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.access-user-avatar-lg{width:54px;height:54px;border-radius:16px;font-size:20px}.access-user-copy{display:flex;flex-direction:column;min-width:0;flex:1;gap:2px}.access-user-copy b,.access-user-copy span,.access-user-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.access-user-copy b{font-size:14px}.access-user-copy span{font-size:12px;color:#53635b}.access-user-copy small{font-size:11px;color:#7b8882}.access-user-chevron{font-size:26px;color:#91a099}.access-users-empty{padding:22px 4px;color:#738079;text-align:center;font-size:13px}.access-users-back{margin-top:10px}
.access-detail-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}.access-detail-head>div:last-child{display:flex;flex-direction:column;gap:5px}.access-detail-head b{font-size:17px}.access-role-badge{display:inline-flex;align-self:flex-start;padding:4px 8px;border-radius:999px;background:#e9f5ee;color:#17623c;font-size:11px;font-weight:800}.access-role-badge.superadmin{background:#f8ecec;color:#8e2424}.access-detail-grid{display:grid;grid-template-columns:1fr;gap:0}.access-detail-line{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-top:1px solid #edf1ef}.access-detail-line small{font-size:11px;color:#7a8781}.access-detail-line span{font-size:14px;color:#21342b;word-break:break-word}.access-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.access-section-title>span{background:#eef5f2;border-radius:999px;min-width:28px;height:28px;padding:0 7px;display:flex;align-items:center;justify-content:center;font-weight:800;color:#173b2f;font-size:12px}.access-device-row{padding:13px 0;border-top:1px solid #edf1ef}.access-device-top{display:flex;justify-content:space-between;gap:10px;align-items:center}.access-device-top b{font-size:14px}.device-state{font-size:10px;font-weight:900;padding:4px 7px;border-radius:999px}.device-state.active{background:#e7f5ec;color:#146b3c}.device-state.inactive{background:#f6e8e8;color:#922f2f}.access-device-meta{display:grid;grid-template-columns:1fr;gap:4px;margin-top:8px}.access-device-meta span{font-size:11px;color:#627068}

/* V060 - Utilizadores com acesso à WebAPP */
.access-users-summary-card,.access-users-card,.access-detail-card{background:#fff;border-radius:18px;padding:16px;margin:16px 0;box-shadow:0 8px 24px rgba(26,48,39,.07);border:1px solid rgba(23,59,47,.08)}
.access-users-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}.access-users-summary-head>div{display:flex;flex-direction:column;gap:3px}.access-users-summary-head b{font-size:16px}.access-users-summary-head span{font-size:12px;color:#68766f}.access-users-count{min-width:30px;height:30px;padding:0 8px;border-radius:999px;background:#edf5f1!important;color:#173b2f!important;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:13px!important}
.access-user-mini-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 2px;border-top:1px solid #edf1ef;color:#173b2f;text-decoration:none}.access-user-mini-row>div{display:flex;flex-direction:column;gap:2px;min-width:0}.access-user-mini-row b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.access-user-mini-row small{font-size:11px;color:#75817c}.access-user-mini-row>span{font-size:24px;color:#8a9891}.access-users-open-all{display:flex;justify-content:center;margin-top:10px;background:#173b2f;color:#fff;text-decoration:none;border-radius:12px;padding:11px 14px;font-size:13px;font-weight:800}.access-users-empty-inline{display:block;color:#738079;font-size:13px;padding:10px 0}
.access-users-card{padding:4px 16px}.access-user-row{display:flex;align-items:center;gap:11px;padding:14px 0;border-bottom:1px solid #edf1ef;text-decoration:none;color:#173b2f}.access-user-row:last-child{border-bottom:0}.access-user-avatar{width:42px;height:42px;border-radius:13px;background:#e8f1ed;color:#173b2f;font-weight:900;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.access-user-avatar-lg{width:54px;height:54px;border-radius:16px;font-size:20px}.access-user-copy{display:flex;flex-direction:column;min-width:0;flex:1;gap:2px}.access-user-copy b,.access-user-copy span,.access-user-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.access-user-copy b{font-size:14px}.access-user-copy span{font-size:12px;color:#53635b}.access-user-copy small{font-size:11px;color:#7b8882}.access-user-chevron{font-size:26px;color:#91a099}.access-users-empty{padding:22px 4px;color:#738079;text-align:center;font-size:13px}.access-users-back{margin-top:10px}
.access-detail-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}.access-detail-head>div:last-child{display:flex;flex-direction:column;gap:5px}.access-detail-head b{font-size:17px}.access-role-badge{display:inline-flex;align-self:flex-start;padding:4px 8px;border-radius:999px;background:#e9f5ee;color:#17623c;font-size:11px;font-weight:800}.access-role-badge.superadmin{background:#f8ecec;color:#8e2424}.access-detail-grid{display:grid;grid-template-columns:1fr;gap:0}.access-detail-line{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-top:1px solid #edf1ef}.access-detail-line small{font-size:11px;color:#7a8781}.access-detail-line span{font-size:14px;color:#21342b;word-break:break-word}.access-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.access-section-title>span{background:#eef5f2;border-radius:999px;min-width:28px;height:28px;padding:0 7px;display:flex;align-items:center;justify-content:center;font-weight:800;color:#173b2f;font-size:12px}.access-device-row{padding:13px 0;border-top:1px solid #edf1ef}.access-device-top{display:flex;justify-content:space-between;gap:10px;align-items:center}.access-device-top b{font-size:14px}.device-state{font-size:10px;font-weight:900;padding:4px 7px;border-radius:999px}.device-state.active{background:#e7f5ec;color:#146b3c}.device-state.inactive{background:#f6e8e8;color:#922f2f}.access-device-meta{display:grid;grid-template-columns:1fr;gap:4px;margin-top:8px}.access-device-meta span{font-size:11px;color:#627068}

/* V066 - Partilha social de eventos para Utilizadores editores e Superadmins */
/* V068 - Correção de sintaxe na gestão de inscrições de confrarias */
.event-social-share{margin-top:18px}.event-share-poster{display:flex;justify-content:center;margin:12px 0}.event-share-poster img{display:block;width:min(100%,360px);max-height:440px;object-fit:contain;border-radius:14px;background:#f5f5f5}.event-share-preview{background:#f7f9f8;border:1px solid #e5ebe8;border-radius:13px;padding:13px;margin:12px 0}.event-share-preview pre{margin:0;white-space:pre-wrap;word-break:break-word;font:inherit;font-size:13px;line-height:1.55;color:#25352e}.event-share-actions{display:grid;grid-template-columns:1fr;gap:9px}.event-share-btn{border:0;border-radius:12px;padding:13px 14px;color:#fff;font-weight:800;font-size:13px;cursor:pointer}.event-share-btn:disabled{opacity:.6}.event-share-btn.facebook{background:#1877f2}.event-share-btn.instagram{background:#9d2f7f}.event-share-btn.whatsapp{background:#128c4b}.event-share-help{margin-top:10px;font-size:11px;line-height:1.45;color:#6c7973}

/* V069 - Código de acesso: SMTP configurado pode ser usado mesmo inativo */
/* V072 - cópia por rede social */
.social-copy-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}.social-copy-actions .event-share-btn{padding:11px 6px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;font-size:18px}.social-copy-actions .event-share-btn span{font-size:10px;font-weight:800}.event-copy-toast{position:fixed;left:50%;bottom:82px;transform:translate(-50%,14px);z-index:9999;padding:10px 15px;border-radius:999px;font-size:12px;font-weight:800;color:#fff;background:#25352e;opacity:0;pointer-events:none;transition:.2s ease;white-space:nowrap;max-width:90vw}.event-copy-toast.show{opacity:1;transform:translate(-50%,0)}.event-copy-toast.error{background:#8f1d1d}

/* V080: inscrições de confrarias nos capítulos */
.event-btn.confrarias{background:#2563a8}.template-standard .event-btn.confrarias{background:#6b4f2a}

/* V083 · cálculo de percurso/portagens */
.toll-calculator-box{display:grid;gap:10px;padding:12px;border:1px solid rgba(15,23,42,.10);border-radius:14px;background:#f8fafc;margin-bottom:4px}.toll-calculator-box>small{line-height:1.35;color:#64748b}.toll-calculator-box label{margin:0}.toll-calc-btn{width:100%;min-height:40px}.toll-result{padding:9px 10px;border-radius:10px;background:#fff;border:1px solid rgba(15,23,42,.08);font-size:13px;line-height:1.35}.toll-result a{font-weight:700}
