.brand{
  --ink:#16211F;
  --ink-2:#22302D;
  --text:#1F2A28;
  --muted:#5F6E6A;
  --paper:#F3F5F4;
  --paper-2:#F8FAF9;
  --card:#FFFFFF;
  --line:#D9E0DD;
  --line-2:#E6EBE9;
  --brass:#0F5C54;
  --brass-dk:#0B463F;
  --brass-rgb:15,92,84;
  --accent-2-rgb:63,169,138;
  --oxblood:#B3261E;
  --mint:#BFE6D8;
  --mint-strong:#3FA98A;
  --shadow:0 16px 40px rgba(22,33,31,.10);
  --shadow-sm:0 1px 2px rgba(22,33,31,.05);
  --r:8px;
  --r-lg:14px;
  background:var(--paper);
  background-image:none;
}
.brand h1,.brand h2,.brand h3,.brand h4{font-family:'Inter','Segoe UI',system-ui,sans-serif;text-transform:none;letter-spacing:-.015em}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.brand ::selection{background:var(--mint);color:var(--ink)}

.brand-lockup{display:inline-flex;align-items:center;gap:9px;color:var(--ink)}
.brand-mark{width:30px;height:30px;flex:0 0 auto}
.brand-mark path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.brand-mark .bm-a{stroke:var(--brass);stroke-width:6.5}
.brand-mark .bm-v{stroke:var(--mint-strong);stroke-width:5}
.brand-word{font-weight:700;font-size:20px;letter-spacing:-.025em;line-height:1}
.brand-word span{font-weight:500;color:var(--brass);margin-left:.28em;letter-spacing:-.01em}

.brand .topnav{background:var(--card);border-bottom:1px solid var(--line);box-shadow:none;padding:14px 28px}
.brand .topnav:after,.brand .card-panel:before,.brand .modal-box:before,.brand .login-card:before{display:none}
.brand .topnav .left{gap:0}
.brand .area{color:var(--muted);font-size:14px;font-weight:500;margin-left:16px;padding-left:16px;border-left:1px solid var(--line);line-height:22px}
.brand .user-pill{color:var(--text);font-weight:500;border-left-color:var(--line)}
.brand .user-pill button{color:var(--muted);font-weight:500}
.brand .user-pill button:hover{color:var(--ink)}

.brand .view{max-width:1240px;padding:40px 28px 64px;animation:none}

.brand .settings-tabs{background:none;border:none;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;padding:0;gap:28px;width:100%;margin-bottom:32px}
.brand .settings-tabs .tab-item{padding:0 0 12px;border-radius:0;font-size:15px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.brand .settings-tabs .tab-item:hover{color:var(--ink)}
.brand .settings-tabs .tab-item.active{background:none;color:var(--ink);border-bottom-color:var(--brass)}

.brand .card-panel{border-radius:var(--r-lg);padding:28px 28px 10px;box-shadow:var(--shadow-sm)}
.brand .section-head{margin-bottom:18px}
.brand .section-head h2{font-size:22px;font-weight:650}
.brand .section-sub{margin:-10px 0 22px;max-width:72ch;line-height:1.5}

.brand table.data th{text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:600;color:var(--muted);border-bottom:1px solid var(--line);padding:10px 10px;white-space:nowrap}
.brand table.data td{padding:14px 10px}
.brand table.data td.strong{font-weight:600}
.brand table.data td a{color:var(--brass)}
.brand table.data td a:hover{text-decoration:underline}
.brand table.data small{color:var(--muted);font-size:12.5px}

.brand .plan{display:inline-block;padding:3px 10px;border-radius:999px;background:var(--mint);color:var(--brass-dk);font-size:12.5px;font-weight:600;white-space:nowrap}
.brand .plan.custom{background:var(--paper);color:var(--text);box-shadow:inset 0 0 0 1px var(--line)}
.brand .tab-count{display:inline-block;min-width:20px;margin-left:7px;padding:1px 6px;border-radius:999px;background:var(--brass);color:#fff;font-size:12px;font-weight:600;text-align:center}
.brand .sub-line{display:block;color:var(--muted);font-size:12.5px;font-weight:400;margin-top:2px}
.brand .empty-line{color:var(--muted);margin:4px 0 22px}
.brand .state-off{display:block;color:var(--oxblood);font-size:12.5px;font-weight:500}

.brand .user-list{list-style:none;margin:0 0 8px;padding:0;border-top:1px solid var(--line)}
.brand .user-item{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;padding:14px 2px;border-bottom:1px solid var(--line)}
.brand .user-item.inactive .user-main{opacity:.6}
.brand .user-main{flex:1 1 260px;min-width:0}
.brand .user-email{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.brand .user-meta{color:var(--text);font-size:14px;margin-top:2px}
.brand .user-access{color:var(--muted);font-size:13px;margin-top:2px}
.brand .user-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.brand .user-state{color:var(--muted);font-size:13px;margin-top:4px}
.brand .user-state .state-on.inline,.brand .user-state .state-off.inline{display:inline;margin:0}
.brand .state-wait{color:#9A6A1F;font-weight:600}
.brand .user-item.is-support{background:var(--bg,#F3F5F4);border-radius:var(--r);padding:12px 14px;border-bottom:0;margin-top:8px}
.brand .support-account{margin:14px 0 6px;padding:14px;border:1px dashed var(--line);border-radius:var(--r)}
.brand .support-account .btn{margin-top:8px}
@media (max-width:760px){
  .brand .user-actions{width:100%;justify-content:stretch}
  .brand .user-actions .btn{flex:1 1 auto;min-height:44px;justify-content:center}
}

.brand .btn{border-radius:var(--r);font-weight:600}
.brand .btn-primary{background:var(--brass);color:#fff;box-shadow:none}
.brand .btn-primary:hover{background:var(--brass-dk);color:#fff}
.brand .btn-outline{border:1px solid var(--line)}
.brand .btn-outline:hover{border-color:var(--ink);color:var(--ink)}
.brand .btn-danger{border:1px solid #EBC9C6}
.brand .btn-dark{background:var(--brass);color:#fff}
.brand .btn-dark:hover{background:var(--brass-dk)}

.brand .field-label{text-transform:none;letter-spacing:0;font-size:13px;font-weight:600;color:var(--text)}
.brand .report-group-title{font-family:'Inter','Segoe UI',system-ui,sans-serif;text-transform:none;letter-spacing:-.01em;font-size:15px;font-weight:650;margin:28px 0 12px}
.brand input[type=text],.brand input[type=search],.brand input[type=email],.brand input[type=url],.brand input[type=number],.brand input[type=password],.brand select,.brand textarea{border-width:1px;border-radius:var(--r)}
.brand input::placeholder{color:#9AA7A3}

.brand .modal-box{border-radius:var(--r-lg);box-shadow:var(--shadow)}
.brand .modal-box h2{font-size:22px;font-weight:650}
.brand .modal-box h3{font-size:16px;font-weight:650}

.brand .login-card{border-radius:var(--r-lg);box-shadow:var(--shadow);padding:40px 36px 36px}
.brand .login-card .brand-lockup{display:flex;justify-content:center;margin-bottom:6px}
.brand .login-card .brand-mark{width:38px;height:38px}
.brand .login-card .brand-word{font-size:26px}
.brand .login-card .sub{margin-bottom:28px;font-size:14px}

/* Registo, login e passo inicial em duas metades (docs/adr/0012). A metade da direita só existe em ecrãs largos,
   e a imagem só é pedida aí: num telemóvel a página é só o formulário. */
.auth{min-height:100dvh;display:grid;grid-template-columns:minmax(0,1fr);background:var(--card,#fff)}
.auth-main{display:flex;align-items:center;justify-content:center;padding:32px 20px}
.auth-box{width:100%;max-width:400px}
.auth-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.auth-logo{display:inline-flex;margin-bottom:28px;text-decoration:none}
.auth-logo .brand-mark{width:32px;height:32px}
.auth-logo .brand-word{font-size:22px}
.auth-out{background:none;border:0;padding:8px 0;margin-bottom:28px;font:inherit;font-size:14px;color:var(--muted);cursor:pointer}
.auth-out:hover{color:var(--ink)}
.auth-box h1{font-size:26px;font-weight:650;letter-spacing:-.02em;line-height:1.2;margin:0 0 8px;color:var(--ink);text-transform:none;text-align:left}
.auth-sub{margin:0 0 24px;color:var(--muted);font-size:15px;line-height:1.5}
.auth-fine{margin:16px 0 0;font-size:13px;color:var(--muted);line-height:1.5}
.auth-alt{margin:16px 0 0;font-size:14px;color:var(--muted)}
.auth-fine a,.auth-alt a,.auth-check a{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.auth-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:var(--text);line-height:1.45;margin:4px 0 20px}
.auth-check input{margin-top:3px;flex:0 0 auto}
.auth-trap{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
.auth-done p{color:var(--text);line-height:1.55;margin:0 0 12px}
.auth-done strong{overflow-wrap:anywhere}
.first-steps{background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);padding:20px 22px;margin:0 0 18px}
.first-steps-head{display:flex;align-items:baseline;gap:12px}
.first-steps-head h2{font-size:17px;font-weight:650;margin:0;color:var(--ink);text-transform:none;letter-spacing:0}
.first-steps-count{font-size:13px;color:var(--muted)}
.first-steps-close{margin-left:auto;background:none;border:0;padding:6px 0;font:inherit;font-size:13px;color:var(--muted);cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.first-steps-sub{margin:6px 0 12px;font-size:14px;color:var(--muted)}
.first-steps-head{flex-wrap:wrap}
.fs-bar{height:6px;border-radius:6px;background:var(--line);overflow:hidden;margin:12px 0 4px}
.fs-bar span{display:block;height:100%;width:0;background:var(--brass);border-radius:6px;transition:width .3s ease}
.fs-list{list-style:none;margin:0;padding:0;display:grid}
.fs-step{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:6px 14px;align-items:center;padding:14px 0;border-top:1px solid var(--line)}
.fs-check{width:22px;height:22px;border-radius:50%;border:2px solid var(--line-input);align-self:start;margin-top:2px}
.fs-step.is-done .fs-check{border-color:var(--brass);background:var(--brass) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center/14px no-repeat}
.fs-body strong{font-size:15px;color:var(--ink)}
.fs-body p{margin:2px 0 0;font-size:13.5px;color:var(--muted);line-height:1.45}
.fs-body small{display:block;margin-top:2px;font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.fs-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.fs-actions .btn{min-height:40px;white-space:nowrap}
.fs-step.is-next .fs-actions .btn:first-child{background:var(--brass);border-color:var(--brass);color:#fff}
.fs-done-label{display:none;font-size:13px;font-weight:600;color:var(--brass)}
.fs-step.is-done .fs-ok{display:none}
.fs-step.is-done .fs-done-label{display:inline}
.fs-step.is-done .fs-body strong{color:var(--muted)}
.fs-ready h3{margin:14px 0 6px;font-size:17px;text-transform:none;letter-spacing:0}
.fs-ready p{margin:0 0 12px;font-size:14.5px;color:var(--text);overflow-wrap:anywhere}
.fs-ready-actions{display:flex;gap:10px;flex-wrap:wrap}
.fs-tour{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.quick-tour .fs-tour{margin:0;padding:0;border:0}
.setup-back{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:0 0 16px;padding:12px 16px;border:1px solid var(--brass);border-radius:var(--r);background:#F1F8F6;font-size:14px}
/* Assistente por conversa: botão flutuante no canto inferior direito e painel de conversa */
.asst-fab{position:fixed;right:24px;bottom:24px;z-index:150;display:inline-flex;align-items:center;justify-content:center;width:60px;height:60px;padding:0;border:0;border-radius:50%;background:var(--brass);color:#fff;font:inherit;font-weight:600;font-size:15px;cursor:pointer;box-shadow:0 10px 28px rgba(15,35,32,.28);transition:transform .15s ease,box-shadow .15s ease;touch-action:manipulation}
.asst-fab svg{width:38px;height:38px;display:block}
.asst-fab .bubble{fill:#fff}
.asst-fab .mark-a{fill:none;stroke:var(--brass);stroke-width:4.2;stroke-linecap:round;stroke-linejoin:round}
.asst-fab .mark-v{fill:none;stroke:#3FA88F;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.asst-avatar{flex:0 0 36px;width:36px;height:36px;border-radius:50%;border:2px solid rgba(255,255,255,.9);display:block}
.asst-avatar.sm{flex-basis:26px;width:26px;height:26px;border:0;align-self:flex-end}
.asst-avatar.lg{width:56px;height:56px;border:0;margin:0 auto 12px}
.asst-row{display:flex;gap:8px;align-items:flex-end;max-width:92%}
.asst-row .asst-msg{max-width:none}
.asst-icon svg,.asst-send svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.asst-fab:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(15,35,32,.34)}
.asst-fab:focus-visible,.asst-icon:focus-visible,.asst-send:focus-visible{outline:2px solid #fff;outline-offset:2px;box-shadow:0 0 0 4px var(--brass)}
.asst-open .asst-fab{display:none}
.asst{position:fixed;right:24px;bottom:24px;z-index:150;width:400px;max-width:calc(100vw - 32px);height:min(640px,calc(100dvh - 48px));display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 60px rgba(15,35,32,.28);overflow:hidden;animation:asstIn .2s ease}
.asst.hidden{display:none}
@keyframes asstIn{from{opacity:0;transform:translateY(12px) scale(.98)}}
.asst-head{display:flex;align-items:center;gap:6px;padding:14px 12px 14px 18px;background:var(--brass);color:#fff}
.asst-head>div{flex:1;display:flex;flex-direction:column;gap:1px;min-width:0}
.asst-head strong{font-size:16px;font-weight:650}
.asst-head small{font-size:12.5px;opacity:.82}
.asst-icon{width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}
.asst-icon:hover{background:rgba(255,255,255,.16)}
.asst-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--bg,#F3F5F4)}
.asst-msg{max-width:86%;padding:10px 14px;border-radius:16px;font-size:14.5px;line-height:1.5;overflow-wrap:anywhere}
.asst-msg ul{margin:4px 0;padding-left:18px}
.asst-msg li{margin:2px 0}
.asst-msg li::marker{color:var(--brass)}
.asst-msg.bot{align-self:flex-start;background:var(--card);border:1px solid var(--line);border-bottom-left-radius:6px;color:var(--ink)}
.asst-msg.mine{align-self:flex-end;background:var(--brass);color:#fff;border-bottom-right-radius:6px}
.asst-msg.error{background:#FBE4DF;border-color:#F0C4BC;color:#7A231B}
.asst-typing{display:inline-flex;gap:5px;align-items:center;padding:14px}
.asst-typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:asstDot 1.1s infinite ease-in-out}
.asst-typing i:nth-child(2){animation-delay:.15s}
.asst-typing i:nth-child(3){animation-delay:.3s}
@keyframes asstDot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.asst-empty{margin:auto 0;text-align:center;color:var(--muted);font-size:14.5px;line-height:1.5}
.asst-empty p{margin:0 0 6px}
.asst-empty strong{color:var(--ink);font-size:17px}
.asst-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:14px}
.asst-chips button{min-height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--ink);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;touch-action:manipulation}
.asst-chips button:hover{border-color:var(--brass);color:var(--brass)}
.asst-card{align-self:stretch;background:var(--card);border:1.5px solid var(--brass);border-radius:16px;padding:14px 16px;display:grid;gap:10px}
.asst-card-title{font-size:15px;color:var(--ink)}
.asst-card ul{list-style:none;margin:0;padding:0;display:grid;gap:5px;font-size:14px;line-height:1.45;color:var(--text)}
.asst-warn{margin:0;padding:9px 12px;border-radius:10px;background:#FCF3DC;border:1px solid #E2C27A;font-size:13.5px;line-height:1.45;color:var(--ink)}
.asst-card ul.asst-card-who{padding:9px 11px;border-radius:10px;background:#F3F5F4;font-size:13.5px;color:var(--muted)}
.asst-card-actions{display:flex;gap:8px;flex-wrap:wrap}
.asst-card-actions .btn{flex:1;min-height:44px;justify-content:center;text-align:center}
.asst-card-state{margin:0;font-size:13.5px;font-weight:600;color:var(--muted)}
.asst-card.is-done{border-color:#BFE6D8;background:#F1F8F6}
.asst-card.is-done .asst-card-state{color:#0B463F}
.asst-card.is-dismissed,.asst-card.is-failed{border-color:var(--line)}
.asst-card.is-failed .asst-card-state{color:#9B2C22}
.asst-form{display:flex;align-items:flex-end;gap:8px;padding:12px 12px 6px;border-top:1px solid var(--line);background:var(--card)}
.asst-form textarea{flex:1;min-width:0;min-height:44px;max-height:120px;resize:none;scrollbar-width:none;border-radius:14px;padding:11px 14px;font-size:16px;line-height:1.35}
.asst-send{flex:0 0 44px;height:44px;border:0;border-radius:50%;background:var(--brass);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}
.asst-send:disabled{opacity:.45;cursor:default}
.asst-mic{flex:0 0 44px;height:44px;border:1px solid var(--line);border-radius:50%;background:var(--card);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}
.asst-mic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.asst-mic.is-on{background:#B3261E;border-color:#B3261E;color:#fff;animation:asst-mic 1.2s ease-in-out infinite}
.asst-mic:focus-visible{outline:2px solid var(--brass);outline-offset:2px}
@keyframes asst-mic{50%{box-shadow:0 0 0 7px rgba(179,38,30,.18)}}
.asst-foot{margin:0;padding:0 14px 10px;background:var(--card);font-size:11.5px;color:var(--muted);text-align:center}
@media(max-width:760px){
  /* No telemóvel o botão fica por cima da barra de navegação e só na agenda e nos clientes, onde não há barra de guardar. */
  .asst-fab{right:14px;bottom:calc(76px + env(safe-area-inset-bottom));height:56px;width:56px}
  body:not([data-help="agenda"]):not([data-help="clients"]) .asst-fab{display:none}
  .asst{inset:0;width:auto;max-width:none;height:100dvh;border:0;border-radius:0}
  .asst-head{padding-top:calc(14px + env(safe-area-inset-top))}
  .asst-foot{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  .asst-open{overflow:hidden}
}
@media(prefers-reduced-motion:reduce){.asst,.asst-typing i,.asst-mic.is-on{animation:none}.asst-fab{transition:none}}
.link-nopass{margin:0 0 16px;padding:14px 16px;border:1px solid #E2C27A;border-radius:var(--r);background:#FCF3DC;display:grid;gap:10px;justify-items:start}
.link-nopass p{margin:0;font-size:14.5px;line-height:1.5;color:var(--ink)}
.link-nopass .btn{min-height:44px}
.fb-toggle{display:none;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;margin-top:12px;border:1px solid var(--line);border-radius:var(--r);background:none;font:inherit;font-weight:600;color:var(--ink);cursor:pointer}
@media(max-width:760px){
  .brand .settings-tabs .tab-item{display:inline-flex;align-items:center;min-height:44px;padding:0 0 4px}
  button.chip{min-height:40px}
  .first-steps-close,.auth-out{min-height:44px;padding-left:6px;padding-right:6px}
  .fb-toggle{display:flex}
  .filter-bar.is-collapsed .fb-row{display:none}
}
@media(max-width:640px){
  .fs-step{grid-template-columns:24px minmax(0,1fr)}
  .fs-actions{grid-column:2;justify-content:flex-start}
  .fs-actions .btn{min-height:44px;flex:1}
  .fs-ready-actions .btn,.setup-back .btn{flex:1;justify-content:center;text-align:center;min-height:44px}
}
.auth-again{margin:16px 0 0;font-size:14px;color:var(--muted)}
.auth-again button{background:none;border:0;padding:0;font:inherit;color:var(--ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.auth-ask{border:0;padding:0;margin:8px 0 0}
.auth-ask legend{padding:0;margin-bottom:10px;font-size:14px;font-weight:600;color:var(--ink)}
.slug-field{display:flex;align-items:center;border:1px solid var(--line);border-radius:var(--r);background:#fff;overflow:hidden}
.slug-field:focus-within{border-color:#0F5C54;box-shadow:0 0 0 3px rgba(15,92,84,.16)}
.slug-field span{padding:0 0 0 12px;color:var(--muted);font-size:15px;white-space:nowrap}
.brand .slug-field input{border:0;box-shadow:none;padding-left:2px;min-width:0;flex:1}
.brand .slug-field input:focus{box-shadow:none;outline:none}
#slugHint.is-bad{color:#9B2C22}
#slugHint.is-ok{color:#0F5C54}
.type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 22px}
.type-opt{position:relative;display:block}
.type-opt input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.type-opt span{display:flex;align-items:center;min-height:48px;padding:10px 14px;border:1px solid var(--line);border-radius:var(--r);font-size:15px;color:var(--ink);background:#fff}
.type-opt input:checked+span{border-color:#0F5C54;box-shadow:0 0 0 1px #0F5C54;font-weight:600}
.type-opt input:focus-visible+span{outline:2px solid #0F5C54;outline-offset:2px}
.auth-aside{display:none}
@media (min-width:960px){
  .auth{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .auth-aside{display:flex;align-items:center;justify-content:center;padding:48px;color:#fff;background:#0F5C54 url(../img/auth-agenda.webp) center/cover no-repeat;position:relative;isolation:isolate}
  .auth-aside:before{content:'';position:absolute;inset:0;background:rgba(10,70,63,.86);z-index:-1}
  .auth-aside-in{max-width:460px}
  .auth-quote{margin:0 0 40px}
  .auth-quote blockquote{margin:0;font-size:22px;line-height:1.4;font-weight:500;letter-spacing:-.01em}
  .auth-quote figcaption{margin-top:18px;font-size:14px;color:#BFE6D8;display:flex;align-items:center;gap:12px}
  .auth-quote-logo{flex:0 0 48px;width:48px;height:48px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.55);background:#000}
  .auth-quote-who{display:flex;flex-direction:column;gap:2px}
  .auth-quote-who strong{color:#fff;font-weight:600;font-size:15px}
  .auth-quote figcaption a{color:inherit;text-decoration:underline;text-underline-offset:3px}
  .auth-quote-tag{display:inline-block;margin-bottom:12px;padding:3px 10px;border-radius:999px;border:1px solid rgba(191,230,216,.5);font-size:12px;font-weight:600;color:#BFE6D8}
  .auth-aside h2{font-size:17px;font-weight:650;margin:0 0 16px;color:#fff;text-transform:none;letter-spacing:0}
  .auth-points{list-style:none;margin:0;padding:0;display:grid;gap:12px}
  .auth-points li{display:flex;gap:12px;align-items:flex-start;font-size:15px;line-height:1.45}
  .auth-points strong{display:block;font-weight:600}
  .auth-points small{display:block;margin-top:3px;font-size:13.5px;line-height:1.45;opacity:.82}
  .auth-points svg{width:18px;height:18px;flex:0 0 auto;margin-top:2px;fill:none;stroke:#BFE6D8;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
}

.brand .mfa-card{width:460px}
.brand .mfa-title{font-size:22px;font-weight:650;text-align:center;margin:18px 0 4px}
.brand .mfa-steps{margin:0 0 18px;padding-left:20px;color:var(--text);font-size:14px;line-height:1.5}
.brand .mfa-steps li+li{margin-top:6px}
.brand .mfa-qr{display:block;margin:0 auto 12px;border:1px solid var(--line);border-radius:var(--r);image-rendering:pixelated}
.brand .mfa-key{text-align:center;font-size:13px;color:var(--muted);margin:0 0 20px}
.brand .mfa-key code{display:inline-block;margin-top:4px;padding:3px 8px;background:var(--paper);border-radius:6px;color:var(--ink);font-size:13px;letter-spacing:.04em}
.brand .recovery-codes{list-style:none;padding:0;margin:0 0 22px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.brand .recovery-codes li{padding:9px 10px;background:var(--paper);border-radius:var(--r);text-align:center;font-variant-numeric:tabular-nums;letter-spacing:.04em;color:var(--ink);font-weight:600}
@media (max-width:760px){
  .brand .topnav{padding:12px 16px}
  .brand .area{display:none}
  .brand .view{padding:24px 16px 48px}
  .brand .card-panel{padding:20px 16px 6px}
}

/* Backoffice dos negócios: mesma identidade da plataforma; a cor e o tema de cada negócio ficam na página pública. */
.brand{--brass-on-bar:var(--brass);--sage:var(--brass);--line-input:#C4CECA}
.admin-brand{display:flex;align-items:center;gap:10px;margin-right:18px;padding-right:18px;border-right:1px solid var(--line);color:var(--ink);min-width:0}
.admin-brand .brand-mark{width:26px;height:26px}
.admin-business{font-weight:650;font-size:15px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.brand .nav-link{color:var(--muted);font-weight:600;border-radius:var(--r)}
.brand .nav-link:hover{background:var(--paper);color:var(--ink)}
.brand .nav-link.active{background:var(--mint);color:var(--brass-dk)}
.brand .nav-link.active:after{display:none}
.brand .notif-bell,.brand .domain-pill{background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:var(--r)}
.brand .notif-bell:hover,.brand .domain-pill:hover{border-color:var(--ink);background:var(--card)}
.brand .bottom-nav{background:var(--card);border-top:1px solid var(--line);box-shadow:0 -1px 0 rgba(22,33,31,.04)}
.brand .bottom-nav a{color:var(--muted);text-transform:none;letter-spacing:0;font-weight:600;font-size:11px}
.brand .bottom-nav a.active{color:var(--brass)}

.brand .agenda-toolbar .date-label,.brand .agenda-head .staff,.brand .notif-toggle-row .nt-text h4,.brand .sub-group{font-family:'Inter','Segoe UI',system-ui,sans-serif;text-transform:none;letter-spacing:-.01em}
.brand .stat-card .snum,.brand .kpi .kn,.brand .health-strip .hv{font-family:'Inter','Segoe UI',system-ui,sans-serif;letter-spacing:-.03em;font-weight:700}
.brand .reports-title,.brand .empty-state h2,.brand .drawer-head h3{text-transform:none;letter-spacing:-.015em}
.brand .drawer-head h3{color:var(--ink)}
.brand .stat-card .slabel,.brand .kpi .kl,.brand .bar-col small,.brand .tmpl-box label,.brand .msg-meta .mtype,.brand .tag,.brand .sub-group{text-transform:none;letter-spacing:0}
.brand .kpi:before{display:none}
.brand .staff-avatar{background:var(--mint);color:var(--brass-dk);font-family:'Inter','Segoe UI',system-ui,sans-serif}
.brand .day-tab.active{background:var(--ink);color:#fff}
.brand .chip.active{background:var(--ink);color:#fff;border-color:var(--ink)}

.brand input[type=text],.brand input[type=search],.brand input[type=email],.brand input[type=url],.brand input[type=tel],.brand input[type=number],.brand input[type=password],.brand input[type=date],.brand input[type=time],.brand select,.brand textarea,.brand .dd-btn,.brand .dp-btn,.brand .phone-field{border:1px solid var(--line-input)}
.brand input:hover,.brand select:hover,.brand textarea:hover,.brand .dd-btn:hover{border-color:#9FAEA9}
.brand input:focus,.brand select:focus,.brand textarea:focus,.brand .dd-btn:focus-visible,.brand .dd.is-open .dd-btn,.brand .dp-btn:focus-visible,.brand .dp.is-open .dp-btn{border-color:var(--brass);box-shadow:0 0 0 3px rgba(15,92,84,.15)}
.brand .phone-field input{border:none}
.brand .phone-field .prefix{color:var(--muted);border-right:1px solid var(--line-input)}

.brand .agenda-toolbar{gap:12px 16px}
.view-switch{display:inline-flex;padding:3px;border-radius:var(--r);background:var(--paper);border:1px solid var(--line)}
.view-switch button{border:none;background:none;padding:7px 14px;border-radius:6px;font:inherit;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer}
.view-switch button[aria-pressed=true]{background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(22,33,31,.12)}
.range-nav{display:flex;align-items:center;gap:6px}
.range-nav .date-label{min-width:130px;text-align:center;font-weight:650;font-size:15px}
.nav-step{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--r);border:1px solid var(--line);background:var(--card);color:var(--ink);cursor:pointer}
.nav-step:hover{border-color:var(--ink)}
.nav-step .icon{width:18px;height:18px}
.view-staff{min-width:190px}
.brand .agenda-toolbar #btnNovaMarcacao{margin-left:auto}
.brand .agenda-toolbar .day-tabs{flex-basis:100%;order:10}

.week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));min-height:420px}
.week-day{border-right:1px solid var(--line-2);display:flex;flex-direction:column;min-width:0}
.week-day:last-child{border-right:none}
.week-head{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 12px 10px;border:none;border-bottom:1px solid var(--line);background:var(--card);text-align:left;cursor:pointer;font:inherit}
.week-head span{font-size:12.5px;color:var(--muted);font-weight:600}
.week-head b{font-size:22px;color:var(--ink);letter-spacing:-.02em;line-height:1.1}
.week-head small{font-size:12px;color:var(--muted)}
.week-head:hover b{color:var(--brass)}
.week-day.is-today .week-head b{color:var(--brass)}
.week-day.is-today .week-head{box-shadow:inset 0 -2px 0 var(--brass)}
.week-list{display:flex;flex-direction:column;gap:6px;padding:10px 8px}
.range-appt{display:block;width:100%;text-align:left;border:1px solid var(--line-2);background:var(--paper-2);border-radius:var(--r);padding:7px 9px;font:inherit;font-size:13px;color:var(--text);cursor:pointer;line-height:1.35}
.range-appt:hover{border-color:var(--brass)}
.range-appt b{color:var(--ink);font-variant-numeric:tabular-nums}
.range-appt span{font-weight:600;color:var(--ink)}
.range-appt small{display:block;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.range-appt.online{background:var(--mint);border-color:transparent}

.month-summary{padding:12px 16px;font-size:13.5px;color:var(--muted);border-bottom:1px solid var(--line)}
.month-dow{display:grid;grid-template-columns:repeat(7,1fr);border-bottom:1px solid var(--line)}
.month-dow span{padding:8px 10px;font-size:12.5px;font-weight:600;color:var(--muted)}
.month-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.month-day{position:relative;min-height:108px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:8px 10px;border:none;border-right:1px solid var(--line-2);border-bottom:1px solid var(--line-2);background:var(--card);text-align:left;font:inherit;cursor:pointer;min-width:0}
.month-day:nth-child(7n){border-right:none}
.month-day:hover{background:var(--paper-2)}
.month-day.is-out{background:var(--paper);color:var(--muted)}
.month-day.is-out .month-num{color:#A7B2AF}
.month-num{font-size:14px;font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}
.month-day.is-today .month-num{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:var(--brass);color:#fff;margin:-3px 0 0 -4px}
.month-count{position:absolute;top:8px;right:10px;font-size:12px;font-weight:600;color:var(--brass-dk);background:var(--mint);border-radius:999px;padding:1px 8px}
.month-lines{display:flex;flex-direction:column;gap:2px;width:100%;min-width:0}
.month-line{font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.month-line b{font-variant-numeric:tabular-nums;color:var(--ink)}
.month-more{font-size:12px;color:var(--muted)}

@media (max-width:900px){
  .week-grid{grid-template-columns:1fr;min-height:0}
  .week-day{border-right:none;border-bottom:1px solid var(--line-2)}
  .week-head{flex-direction:row;align-items:baseline;gap:10px}
  .month-day{min-height:64px;padding:6px}
  .month-lines{display:none}
  .month-count{position:static;margin-top:auto}
}
@media (max-width:760px){
  .brand .agenda-toolbar #btnNovaMarcacao{margin-left:0;order:9}
  .range-nav{flex:1;justify-content:space-between}
  .range-nav .btn{width:auto;flex:0 0 auto}
  .view-staff{flex-basis:100%}
}

@media (max-width:760px){
  .admin-brand{margin-right:0;padding-right:0;border-right:none}
  .admin-business{max-width:150px}
}
.sms-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin:6px 0 26px}
.sms-stat{display:flex;flex-direction:column;gap:4px}
.sms-stat span{font-size:13px;color:var(--muted);font-weight:600}
.sms-stat b{font-size:28px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;line-height:1.1}
.sms-stat small{font-size:12.5px;color:var(--muted)}
.sms-test{margin-top:26px;max-width:520px}
.sms-test-row{display:flex;gap:10px;align-items:center}
.sms-test-row .phone-field{flex:1}
.integration{padding:20px 0;border-top:1px solid var(--line)}
.integration-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.integration-head h3{margin:0 0 4px;font-size:16px}
.integration-head .muted{margin:0;color:var(--muted);font-size:13.5px}
.integration-meta{margin:10px 0 0;font-size:13.5px;color:var(--muted)}
.integration-form{display:grid;grid-template-columns:minmax(0,420px) auto auto;gap:18px;align-items:end;margin-top:16px}
.integration-form .form-field{margin:0}
/* Campos a mais de uma integração (modelo e tetos do assistente): ocupam a linha toda, por cima da chave e dos botões */
.integration-form>.field-row,.integration-form>.form-field:has(.ik-option){grid-column:1/-1;max-width:640px}
.integration-form>.field-row{margin:0}
.switch-row{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;min-height:46px}
.integration-actions{display:flex;gap:10px}
@media(max-width:760px){.sms-stats{grid-template-columns:1fr 1fr}.integration-form{grid-template-columns:1fr}.sms-test-row{flex-direction:column;align-items:stretch}}

/* Plataforma: lista de negócios e página de cada negócio */
.brand table.data td .row-title{color:var(--ink);font-weight:600}
.brand table.data td .row-title:hover{color:var(--brass)}
.brand .row-sub{display:block;color:var(--muted);font-size:12.5px;font-weight:400;margin-top:2px}
.brand .row-action{width:44px;text-align:right}
.brand .icon-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:9px;border:1px solid var(--line);color:var(--text);background:var(--card);transition:.15s}
.brand .icon-btn:hover{border-color:var(--brass);color:var(--brass)}
.brand .icon-btn .icon{width:18px;height:18px}
.brand .app-code-cell{font-weight:600;letter-spacing:.12em;font-variant-numeric:tabular-nums;color:var(--ink)}
.brand .back-link{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:14px;font-weight:600;margin-bottom:14px}
.brand .back-link:hover{color:var(--ink)}
.brand .back-link .icon{width:16px;height:16px}
.brand .page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:26px}
.brand .page-head h1{margin:0;font-size:26px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.brand .page-sub{margin:4px 0 0;color:var(--muted);font-size:14px}
.brand .page-sub a{color:var(--brass)}
.brand .state-off.inline{display:inline;margin-left:10px}
.brand .detail-list{display:grid;grid-template-columns:max-content 1fr;gap:12px 28px;margin:0 0 24px;font-size:14.5px}
.brand .detail-list dt{color:var(--muted)}
.brand .detail-list dd{margin:0;color:var(--ink);font-weight:500}
.brand .detail-list dd small{display:block;color:var(--muted);font-weight:400;font-size:13px;margin-top:2px}
.brand .confirm-inline{margin-top:14px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;max-width:560px}
.brand .confirm-inline p{margin:0 0 12px;font-size:14px;color:var(--text)}
.brand .tab-loading{margin:0;color:var(--muted);font-size:14px}
.brand .form-narrow{max-width:640px}
.brand .form-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
.brand .card-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.brand .confirm-inline{margin-bottom:14px}
.brand .state-on{display:block;color:var(--sage);font-size:12.5px;font-weight:600}
.brand #stab-parametrizacoes .sub-tabs{margin:0 0 18px}
.brand .sub-tab.active{background:var(--ink);border-color:var(--ink);color:#fff}

/* Plataforma → Site */
.brand .site-range{display:flex;padding:3px;border-radius:10px;background:var(--paper);border:1px solid var(--line)}
.brand .site-range button{border:0;background:none;padding:7px 12px;border-radius:8px;font:600 13px 'Inter',sans-serif;color:var(--muted);cursor:pointer;min-height:34px}
.brand .site-range button.active{background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.1)}
.brand #stab-site .sub-group{margin:26px 0 12px}
.brand .funnel{display:grid;gap:10px}
.brand .funnel-row{display:grid;grid-template-columns:minmax(150px,220px) minmax(0,1fr) 70px 170px;gap:12px;align-items:center;font-size:14px}
.brand .funnel-row .fl{color:var(--ink);font-weight:500}
.brand .funnel-row .fbar{height:12px;border-radius:999px;background:var(--line-2);overflow:hidden}
.brand .funnel-row .fbar i{display:block;height:100%;border-radius:999px;background:var(--brass)}
.brand .funnel-row b{text-align:right;font-variant-numeric:tabular-nums}
.brand .funnel-row small{color:var(--muted)}
.brand .site-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 28px}
.brand .site-list .data td{padding:9px 0}
@media(max-width:760px){
  .brand .funnel-row{grid-template-columns:minmax(0,1fr) 60px;row-gap:4px}
  .brand .funnel-row .fbar{grid-column:1/-1;grid-row:2}
  .brand .funnel-row small{grid-column:1/-1}
  .brand .site-grid{grid-template-columns:minmax(0,1fr)}
}

/* ── Plataforma: barra lateral e painel de Início ── */
.platform-shell .shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:calc(100dvh - 65px)}
.platform-shell .shell>.view{min-width:0;max-width:1240px;width:100%}
.side-nav{position:sticky;top:65px;align-self:start;height:calc(100dvh - 65px);overflow-y:auto;display:flex;flex-direction:column;justify-content:space-between;gap:16px;padding:20px 14px;border-right:1px solid var(--line);background:var(--card)}
.side-nav nav{display:flex;flex-direction:column;gap:2px}
.side-nav nav a{display:flex;align-items:center;gap:12px;min-height:42px;padding:0 12px;border-radius:10px;color:var(--text);font-weight:500;font-size:14.5px}
.side-nav nav a .icon{width:19px;height:19px;color:var(--muted);flex:0 0 auto}
.side-nav nav a span{flex:1}
.side-nav nav a:hover{background:var(--paper)}
.side-nav nav a.active{background:color-mix(in srgb,var(--brass) 12%,var(--card));color:var(--ink);font-weight:650}
.side-nav nav a.active .icon{color:var(--brass)}
.side-badge{min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:var(--oxblood);color:#fff;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.side-group{margin:18px 12px 6px;font-size:11.5px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.side-site{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;font-size:13.5px;color:var(--muted);border:1px solid var(--line)}
.side-site .icon{width:16px;height:16px}
.side-site:hover{color:var(--ink);border-color:var(--ink)}
.side-toggle{display:none;width:42px;height:42px;margin-right:6px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--ink);align-items:center;justify-content:center;cursor:pointer}
.side-toggle .icon{width:20px;height:20px}
.side-scrim{position:fixed;inset:0;z-index:89;background:rgba(10,20,18,.38)}

.home-head{margin:4px 0 22px}
.home-head h1{margin:0;font-size:clamp(26px,3vw,32px);font-weight:700;letter-spacing:-.03em;color:var(--ink)}
.home-head p{margin:4px 0 0;color:var(--muted)}
.quick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.quick{display:flex;align-items:center;gap:14px;min-height:76px;padding:14px 16px;border-radius:14px;border:1px solid var(--line);background:var(--card);color:var(--text);text-align:left;font:inherit;cursor:pointer;box-shadow:var(--shadow-sm);transition:border-color .15s,transform .15s,box-shadow .15s}
.quick:hover{border-color:var(--brass);transform:translateY(-1px);box-shadow:0 10px 24px -14px rgba(15,92,84,.35)}
.quick .q-ico{width:42px;height:42px;flex:0 0 auto;border-radius:12px;background:color-mix(in srgb,var(--brass) 12%,var(--card));color:var(--brass);display:flex;align-items:center;justify-content:center}
.quick .q-ico .icon{width:20px;height:20px}
.quick b{display:block;font-size:15px;color:var(--ink);font-weight:650}
.quick small{display:block;font-size:13px;color:var(--muted);margin-top:2px}
.quick.is-alert .q-ico{background:color-mix(in srgb,var(--oxblood) 12%,var(--card));color:var(--oxblood)}
.home-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0}
.kpi-card{padding:18px 18px 16px;border-radius:14px;border:1px solid var(--line);background:var(--card)}
.kpi-card span{display:block;font-size:13px;color:var(--muted);font-weight:500}
.kpi-card b{display:block;font-size:30px;font-weight:700;letter-spacing:-.03em;color:var(--ink);margin-top:6px;font-variant-numeric:tabular-nums}
.kpi-card small{display:block;font-size:12.5px;color:var(--muted);margin-top:2px}
.home-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.home-cols .card-panel .section-head{margin-bottom:10px}
.home-cols .card-panel .section-head h2{font-size:18px}
.link-more{font-size:13.5px;font-weight:600;color:var(--brass)}
.home-list{list-style:none;margin:0 0 14px;padding:0}
.home-list li+li{border-top:1px solid var(--line-2)}
.home-list a{display:flex;flex-direction:column;gap:2px;padding:11px 4px;border-radius:8px}
.home-list a:hover b{color:var(--brass)}
.home-list b{font-size:15px;color:var(--ink);font-weight:600}
.home-list small{font-size:13px;color:var(--muted)}

@media(max-width:640px){.home-kpis{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){
  .platform-shell .shell{grid-template-columns:minmax(0,1fr)}
  .side-toggle{display:inline-flex}
  .side-nav{position:fixed;top:0;left:0;bottom:0;z-index:90;width:min(290px,84vw);height:100dvh;padding-top:calc(20px + env(safe-area-inset-top));transform:translateX(-102%);transition:transform .22s ease;box-shadow:12px 0 40px rgba(0,0,0,.18)}
  body.side-open .side-nav{transform:none}
  body.side-open{overflow:hidden}
  .home-cols{grid-template-columns:minmax(0,1fr)}
  .platform-shell .topnav .area{display:none}
}
@media(max-width:520px){.quick-grid{grid-template-columns:minmax(0,1fr)}.home-kpis{gap:10px}.kpi-card b{font-size:26px}}

/* ---------- Gestão (Resumo, Clientes, Pagamentos, Gastos, Cofre) ---------- */
.mg>.card-panel,.mg .mg-cols>.card-panel{margin-bottom:18px}
.mg-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px 20px;flex-wrap:wrap;margin:4px 0 18px}
.mg-head h2{margin:0;font-size:clamp(24px,2.6vw,30px);font-weight:700;letter-spacing:-.03em;color:var(--ink)}
.mg-head p{margin:4px 0 0;color:var(--muted)}
.mg-actions{display:flex;gap:8px;flex-wrap:wrap}
.mg-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.kpi-card.lead{background:var(--brass);border-color:var(--brass)}
.kpi-card.lead span,.kpi-card.lead small{color:rgba(255,255,255,.78)}
.kpi-card.lead b{color:#fff}
.kpi-card.alert b{color:var(--oxblood)}
.mg-title{margin:0 0 14px;font-size:15px;font-weight:600;color:var(--ink)}
.mg-title-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.mg-title-row .mg-title{margin:0}
.mg-empty{color:var(--muted);margin:6px 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mg-link{background:none;border:none;padding:0;font:inherit;font-weight:600;color:var(--ink);cursor:pointer;text-align:left}
.mg-link:hover{color:var(--brass);text-decoration:underline}
.mg .debt,.mg-balance .debt b{color:var(--oxblood);font-weight:600}
.mg .muted{color:var(--muted)}
.mg-warn{background:#FFF6E0;border:1px solid #F1D99B;color:#6B5212;border-radius:var(--r);padding:10px 14px;margin:0 0 16px;font-size:14px}

/* grelha de mensalidades */
.mg-matrix{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}
.mg-matrix th{font-weight:600;color:var(--muted);font-size:12px;padding:0 3px 8px;white-space:nowrap;text-align:center}
.mg-matrix th.now{color:var(--brass)}
.mg-matrix td{padding:4px 3px;text-align:center;border-top:1px solid var(--line-2)}
.mg-matrix td.name{text-align:left;padding:8px 14px 8px 0;min-width:170px}
.mg-matrix td.name small{display:block;color:var(--muted);font-size:12px;margin-top:1px}
.mg-matrix td.num{text-align:right;padding-left:12px;white-space:nowrap}
.cell{display:inline-block;width:26px;height:22px;border-radius:6px;border:none;padding:0;vertical-align:middle;background:transparent}
button.cell{cursor:pointer}
button.cell:hover{outline:2px solid var(--ink);outline-offset:1px}
.cell.pago{background:var(--mint-strong)}
.cell.parcial{background:repeating-linear-gradient(135deg,var(--mint-strong) 0 5px,var(--mint) 5px 10px)}
.cell.pendente{background:#fff;box-shadow:inset 0 0 0 2px #D9A23A}
.cell.falta{background:#E9A8A2;box-shadow:inset 0 0 0 1px var(--oxblood)}
.staff-nologin{margin-top:12px}
.staff-nologin>summary{cursor:pointer;color:var(--muted);font-weight:600;font-size:14px;padding:6px 0}
.staff-nologin[open]>summary{margin-bottom:8px}
.cell.gratis{background:var(--line-2);box-shadow:inset 0 0 0 1px var(--line)}
.cell.na{background:transparent}
.mg-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:14px;font-size:12.5px;color:var(--muted)}
.mg-legend span{display:inline-flex;align-items:center;gap:7px}
.mg-legend i{display:inline-block;width:14px;height:12px;border-radius:3px}
.mg-legend i.bar-in{background:var(--mint-strong)}
.mg-legend i.bar-out{background:var(--ink-2)}

/* gráfico recebido/gastos */
.mg-chart{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;align-items:end;margin-bottom:6px}
.mg-chart .m{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.mg-chart .pair{display:flex;align-items:flex-end;justify-content:center;gap:4px;height:150px;width:100%}
.mg-chart .pair i{display:block;width:min(26px,38%);background:var(--mint-strong);border-radius:4px 4px 0 0;min-height:2px}
.mg-chart .pair i.out{background:var(--ink-2)}
.mg-chart span{font-size:12px;color:var(--muted)}
.mg-chart span.now{color:var(--brass);font-weight:700}
.mg-chart b{font-size:12.5px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.mg-chart b.neg{color:var(--oxblood)}

.mg-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.mg-list{display:flex;flex-direction:column}
.mg-li{display:flex;justify-content:space-between;align-items:center;gap:8px 14px;padding:11px 0;border-top:1px solid var(--line-2);flex-wrap:wrap}
.mg-li:first-child{border-top:none}
.mg-li small{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
.mg-li b{font-weight:600;color:var(--ink)}
.mg-li-end{display:flex;align-items:center;gap:10px}
.mg-li .num,.mg-li-end span{font-variant-numeric:tabular-nums;font-weight:600}

/* barras por categoria */
.mg-bars{display:flex;flex-direction:column;gap:10px}
.mg-bars .br{display:grid;grid-template-columns:minmax(120px,220px) minmax(0,1fr) auto;gap:12px;align-items:center;font-size:13.5px}
.mg-bar{height:10px;border-radius:5px;background:var(--line-2);overflow:hidden}
.mg-bar i{display:block;height:100%;background:var(--brass);border-radius:5px}
.mg-bars small{color:var(--muted)}

/* tabelas com filtros */
.mg-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.mg-toolbar input[type=search]{flex:1 1 260px;min-width:0}
.mg-toolbar select{flex:0 1 230px;min-width:0}
.brand .mg-toolbar input[type=search]{border:1px solid var(--line-input);border-radius:var(--r);padding:9px 12px;font:inherit;background:var(--card)}
.mg-table-panel{padding:6px 14px}
.mg tr.mg-row{cursor:pointer}
.mg tr.mg-row:hover td,.mg-detail-pays tr.mg-row:hover td{background:var(--paper-2)}
.mg tr.mg-row:focus-visible{outline:2px solid var(--brass);outline-offset:-2px}
.mg tr.hidden{display:none}
.mg-tag{display:inline-block;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px}
.mg-tag.s1{background:var(--mint);color:#0B463F}
.mg-tag.s2{background:#FCEFD2;color:#7A5410}
.mg-tag.s3{background:var(--line-2);color:var(--muted)}

/* detalhe do cliente */
.mg-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px;padding-right:36px}
.mg-detail-head h2{margin:0}
.mg-detail-head .muted{margin:2px 0 0;color:var(--muted)}
.mg-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px;margin-bottom:16px;font-size:12.5px;color:var(--muted)}
.mg-info b{display:block;font-size:14px;color:var(--ink);font-weight:500;margin-top:2px;overflow-wrap:anywhere}
.mg-balance{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.mg-balance div{background:var(--paper);border-radius:10px;padding:12px 14px;font-size:12.5px;color:var(--muted)}
.mg-balance b{display:block;font-size:19px;color:var(--ink);font-weight:700;margin-top:2px;font-variant-numeric:tabular-nums}
.mg-notes{margin:0 0 16px;white-space:pre-wrap;color:var(--text)}
.mg-detail-pays{max-height:260px;overflow:auto}
.mg-left{margin-right:auto}
.modal-footer-btns .mg-left{order:-1}
.brand .mg-danger-link{color:var(--oxblood)}
#mgpHint,#mgeHint{margin:0 0 12px}
.mg-check{display:flex;align-items:flex-end;padding-bottom:10px}

/* cofre */
.mg-lock{max-width:460px;margin:30px auto;text-align:center}
.mg-lock h2{margin:10px 0 6px}
.mg-lock p{color:var(--muted)}
.mg-lock-ico{display:inline-flex;width:52px;height:52px;align-items:center;justify-content:center;border-radius:14px;background:var(--mint);color:var(--brass)}
.mg-lock-ico .icon{width:24px;height:24px}
.mg-lock-form{display:flex;gap:8px;margin:16px 0 6px}
.mg-lock-form input{flex:1;min-width:0;text-align:center;font-size:20px;letter-spacing:.2em;font-variant-numeric:tabular-nums}
.mg-pw{display:flex;align-items:center;gap:4px;min-width:0}
.mg-pw span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
.mg-pw .pw{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:8px;background:none;color:var(--muted);cursor:pointer;flex:0 0 auto}
.icon-btn:hover{background:var(--paper);color:var(--ink)}
.icon-btn .icon{width:17px;height:17px}
.mg-pw-input{display:flex;align-items:stretch;gap:4px}
.mg-pw-input input{flex:1;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.mg-pw-input .icon-btn{height:auto;width:40px;border:1px solid var(--line-input)}
.mg-strength{height:4px;border-radius:2px;background:var(--line-2);margin:8px 0 4px;overflow:hidden}
.mg-strength i{display:block;height:100%;width:0;background:var(--brass);transition:width .2s}
.mg-gen-out{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:17px;padding:14px;border-radius:10px;background:var(--paper);margin:6px 0 14px;overflow-wrap:anywhere;user-select:all}
.mg-log summary{cursor:pointer;font-weight:600;color:var(--ink)}
.mg-log[open] summary{margin-bottom:10px}
.mg input[type=range]{width:100%}

@media(max-width:1100px){.mg-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.mg-cols{grid-template-columns:minmax(0,1fr)}.mg-info{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){
  .mg-kpis{gap:10px}.kpi-card b{font-size:24px}
  .mg-chart{gap:4px}.mg-chart b{font-size:11px}
  .mg-bars .br{grid-template-columns:minmax(0,1fr) auto}.mg-bar{grid-column:1/-1;grid-row:2}
  .mg-balance{grid-template-columns:minmax(0,1fr)}
  .mg-info{grid-template-columns:minmax(0,1fr)}
  .mg-head .mg-actions{width:100%}.mg-head .mg-actions .btn{flex:1}
  .mg-toolbar select{flex:1 1 100%}
}

/* ---------- Suporte: kanban (docs/adr/0003) ---------- */
.sup-board-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:6px}
.sup-board-head h1{margin:0}
.brand .sup-board-sub{margin:0 0 16px}
.sup-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-bottom:12px}
.sup-filter{max-width:100%;overflow-x:auto}
.sup-filter button{white-space:nowrap}
.brand input.sup-search{flex:1 1 220px;max-width:340px;min-height:40px}
/* O quadro fica com a altura do ecrã (--sup-top vem do script) e cada coluna faz scroll por dentro: a página não cresce com os cartões. */
.platform-shell .shell>.view:has(.sup-board){max-width:1600px}
.sup-board{display:grid;grid-template-columns:repeat(4,minmax(240px,1fr));gap:14px;align-items:stretch;overflow-x:auto;scroll-snap-type:x mandatory;height:calc(100dvh - var(--sup-top,260px) - 24px);min-height:420px}
.sup-col{display:flex;flex-direction:column;min-height:0;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px 6px 6px 12px;scroll-snap-align:start;transition:border-color .15s,background .15s}
.sup-col.over{border-color:var(--brass);background:color-mix(in srgb,var(--brass) 6%,var(--card))}
.sup-col h2{display:flex;align-items:center;gap:8px;font-size:14px;margin:2px 10px 10px 4px;flex:none}
.sup-col h2 small{color:var(--muted);font-weight:500;font-size:12px}
.sup-col h2 b{margin-left:auto;font-size:12px;color:var(--muted)}
.sup-cards{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 6px 6px 0;scrollbar-width:thin}
.sup-more{flex:none;min-height:40px;border:1px dashed var(--line);border-radius:10px;background:none;font:inherit;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer;touch-action:manipulation}
.sup-more:hover{color:var(--text);border-color:var(--muted)}
.sup-card{background:var(--bg,#F3F5F4);border:1px solid var(--line);border-radius:10px;padding:9px 11px;cursor:pointer;display:flex;flex-direction:column;gap:4px;flex:none;transition:border-color .15s,box-shadow .15s}
.sup-card:hover,.sup-card:focus-visible{border-color:var(--brass);outline:none}
.sup-card.dragging{opacity:.5}
.sup-card.unread{border-color:var(--brass);box-shadow:0 0 0 1px var(--brass) inset}
.sc-tags{display:flex;gap:6px;flex-wrap:wrap}
.sc-tag{font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--line-2,#E6EAE8);color:var(--text)}
.sc-tag.k1{background:#FBE4DF;color:#9B2C22}
.sc-tag.k2{background:#E1ECFB;color:#2F4F8A}
.sc-tag.k3{background:#E3F2EC;color:#0B463F}
.sc-tag.task{background:#EDE8F7;color:#4B3B7A}
.sc-tag.high{background:#9B2C22;color:#fff}
.c1{--tag-bg:#E6EAE8;--tag-fg:#33403C}.c2{--tag-bg:#FBE4DF;--tag-fg:#9B2C22}.c3{--tag-bg:#FCE9D2;--tag-fg:#8A4B10}.c4{--tag-bg:#FBF1C7;--tag-fg:#6B5300}
.c5{--tag-bg:#DDF1E4;--tag-fg:#1D5E3A}.c6{--tag-bg:#D5EEF0;--tag-fg:#0E5560}.c7{--tag-bg:#E1ECFB;--tag-fg:#2F4F8A}.c8{--tag-bg:#EDE8F7;--tag-fg:#4B3B7A}
.sc-tag[class*=" c"]{background:var(--tag-bg);color:var(--tag-fg);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sup-board-actions{display:flex;gap:10px;flex-wrap:wrap}
.sup-tag-filter,.tag-pick{display:flex;flex-wrap:wrap;gap:8px}
.sup-tag-filter{margin:-4px 0 16px}
.tag-pick{margin-bottom:10px}
.tag-btn{min-height:40px;max-width:100%;padding:0 14px;border-radius:999px;border:1.5px solid transparent;background:var(--tag-bg,var(--card));color:var(--tag-fg,var(--text));font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;touch-action:manipulation;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tag-btn[data-tag="0"]{border-color:var(--line)}
.tag-btn:hover{border-color:var(--tag-fg,var(--line))}
.tag-pick .tag-btn[aria-pressed="true"]:before{content:'✓ '}
.tag-btn[aria-pressed="true"]{border-color:var(--tag-fg,var(--brass));box-shadow:0 0 0 1px var(--tag-fg,var(--brass)) inset}
.tag-btn:focus-visible,.tag-color:focus-visible{outline:2px solid var(--brass);outline-offset:2px}
.tag-form{display:grid;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg,#F3F5F4)}
.tag-form.hidden{display:none}
.tag-form-title{font-size:15px;margin:16px 0 8px}
.tag-colors{display:flex;flex-wrap:wrap;gap:8px}
.tag-color{width:40px;height:40px;border-radius:50%;border:2px solid #fff;background:var(--tag-bg);box-shadow:0 0 0 1px var(--line);cursor:pointer;touch-action:manipulation;padding:0}
.tag-color[aria-checked="true"]{box-shadow:0 0 0 2px var(--tag-fg)}
.tag-form-btns{display:flex;gap:8px;flex-wrap:wrap}
.tag-form .err:empty{display:none}
.tag-list{list-style:none;padding:0;margin:18px 0 0;display:flex;flex-direction:column}
.tag-list li{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--line)}
.tag-list li small{color:var(--muted)}
.tag-list-actions{display:flex;gap:8px;margin-left:auto}
@media(max-width:560px){.sup-board-actions{width:100%}.sup-board-actions .btn{flex:1;justify-content:center;text-align:center}.tag-btn,.tag-color{min-height:44px}.tag-color{width:44px;height:44px}.tag-list-actions{width:100%;margin-left:0}.tag-list-actions .btn{flex:1}}
.sc-new{font-size:11.5px;font-weight:700;color:var(--brass)}
.sc-title{font-weight:600;font-size:14.5px;line-height:1.3;word-break:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sc-meta{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sup-card .sc-tag{font-size:11px;padding:1px 7px}
.sc-foot{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted)}
.sc-foot .late{color:#9B2C22;font-weight:700}
.sc-empty{color:var(--muted);font-size:13px;margin:4px}
.sup-linked{list-style:none;padding:0;margin:6px 0 0;display:flex;flex-direction:column;gap:6px}
.sup-linked small{color:var(--muted)}
.sup-move{max-width:240px}
@media(max-width:900px){.sup-board{grid-template-columns:repeat(4,minmax(78vw,1fr))}.brand input.sup-search{max-width:none;flex-basis:100%;font-size:16px}}
.sup-linked .link-btn{background:none;border:0;padding:0;font:inherit;font-weight:600;color:var(--brass);cursor:pointer;text-align:left}

/* ---------- Cobrança: por confirmar e dados de pagamento (docs/adr/0006) ---------- */
.mg-waiting{border-color:#EBCB82;background:#FFFBF0;margin-bottom:16px}
.mg-waiting h3{margin:0 0 4px;display:flex;align-items:center;gap:8px}
.mg-waiting h3 b{min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#7A5410;color:#fff;font-size:12px;line-height:22px;text-align:center}
.mg-waiting-list{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column}
.mg-waiting-list li{display:flex;align-items:center;gap:12px 16px;flex-wrap:wrap;padding:12px 0;border-top:1px solid #EBDDB8}
.mw-main{flex:1;min-width:220px;display:flex;flex-direction:column;gap:2px}
.mw-main span{color:var(--muted);font-size:13.5px}
.mw-amount{font-weight:700;white-space:nowrap}
.mw-amount small{font-weight:500;color:var(--muted)}
.mw-actions{display:flex;gap:8px;flex-wrap:wrap}
.mg-paysettings{margin-bottom:16px}
.mg-paysettings>summary{cursor:pointer;font-weight:700;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.mg-paysettings>summary small{font-weight:500;color:var(--muted)}
.mg-paysettings[open]>summary{margin-bottom:14px}
.brand .mg-paysettings{padding-bottom:26px}
.mg-paysettings .field-row,.mg-paysettings .form-field{margin-bottom:16px}
.mg-paysettings .field-hint{margin:8px 0 0}
.mg-paysettings>.field-hint{margin:0 0 18px}
.mg-paysettings .btn{margin-top:2px}
.mg-paysettings .err:empty{display:none}

/* Conta alrevapro (ADR 0007): faixa a lembrar em que negócio está, e a escolha do negócio. */
.support-bar{display:flex;align-items:center;justify-content:center;gap:6px 14px;flex-wrap:wrap;padding:8px 16px;background:#0F5C54;color:#fff;font-size:13.5px;text-align:center}
.support-bar a{color:#BFE6D8;font-weight:600;text-decoration:underline;text-underline-offset:3px;padding:6px 2px}
.pick-card{width:480px}
.pick-search{display:flex;gap:8px;align-items:stretch;margin-bottom:14px}
.pick-search input{flex:1;min-width:0;width:auto}
.pick-search .btn{flex:0 0 auto}
.pick-list{list-style:none;margin:0;padding:0;max-height:min(56vh,460px);overflow:auto;border:1px solid var(--line);border-radius:var(--r)}
.pick-list li+li{border-top:1px solid var(--line)}
.pick-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:56px;padding:12px 16px;background:none;border:0;text-align:left;cursor:pointer;font:inherit;color:var(--ink)}
.pick-item:hover,.pick-item:focus-visible{background:var(--bg,#F3F5F4)}
.pick-item.is-current{background:#E3F1EC}
.pick-name{font-weight:600;font-size:15px}
.pick-slug{font-size:13px;color:var(--muted)}
.pick-empty{text-align:center;color:var(--muted);font-size:14px;padding:18px 0}
.link-button{background:none;border:0;color:var(--muted);text-decoration:underline;text-underline-offset:3px;font:inherit;font-size:14px;cursor:pointer;padding:10px 4px}
@media (max-width:760px){.pick-search .btn{min-height:44px}}

/* Equipa do negócio na plataforma: uma linha por pessoa, folha para adicionar e editar. */
.team-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;margin-bottom:8px}
.team-head h2{margin:0 0 4px}
.team-head .section-sub{margin:0;max-width:60ch}
.team-list{list-style:none;margin:8px 0 0;padding:0}
/* Lugares da equipa face ao plano (docs/adr/0015): o número e, no limite, o aviso com «Mudar de plano». */
.team-seats-more{font-weight:700;color:var(--sage);text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.team-seats{margin:8px 0 0;font-size:13.5px;color:var(--muted);max-width:60ch}
.team-seats.warn{color:#8A4B10;font-weight:600}
.team-full{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:10px 0 4px;padding:12px 14px;border-radius:12px;background:#FCE9D2;color:#5C3410;font-size:14px}
.team-full p{margin:0;flex:1 1 280px}
.card-panel:has(.team-list){overflow:visible}
.team-item{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;padding:14px 2px;border-bottom:1px solid var(--line)}
.team-item.inactive .team-main{opacity:.6}
.team-photo{width:44px;height:44px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--paper);color:var(--muted);font-weight:650;font-size:16px;border:1px solid var(--line);padding:0;position:relative}
.team-photo img{width:100%;height:100%;object-fit:cover}
button.team-photo{cursor:pointer}
.admin-who{display:flex;align-items:center;gap:10px}
.admin-who .team-photo{width:36px;height:36px;font-size:14px}
button.team-photo:hover::after,button.team-photo:focus-visible::after{content:"Foto";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.45);color:#fff;font-size:11px;font-weight:600}
.team-item>.team-photo+.team-main{flex:1 1 220px}
.team-main{min-width:0;flex:1 1 280px}
.team-name{font-weight:650;color:var(--ink);font-size:15px;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px}
.team-what{font-weight:500;font-size:13px;color:var(--muted)}
.team-email{font-size:14px;color:var(--text);margin-top:2px;overflow-wrap:anywhere}
.team-note{font-size:13px;color:var(--muted);margin-top:2px}
.team-state{font-size:13px;color:var(--muted);margin-top:4px}
.team-state .state-off.inline{display:inline;margin:0}
.team-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;align-items:center}
/* O menu «⋯» abre para fora do cartão: sem isto o cartão cortava-o na última linha da lista. */
.brand .card-panel:has(.team-list){overflow:visible}
.team-more{position:relative}
.team-more>summary{list-style:none;cursor:pointer;min-width:40px;justify-content:center}
.team-more>summary::-webkit-details-marker{display:none}
.team-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:20;min-width:190px;background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:6px;display:flex;flex-direction:column}
.team-menu button{background:none;border:0;text-align:left;font:inherit;font-size:14px;padding:11px 12px;border-radius:10px;cursor:pointer;color:var(--ink)}
.team-menu button:hover,.team-menu button:focus-visible{background:var(--bg,#F3F5F4)}
.team-menu button.danger{color:var(--oxblood)}
.person-sheet{width:860px}
/* Folha da pessoa na horizontal: quem é e o que faz à esquerda, o acesso à direita; uma coluna em ecrãs estreitos. */
.person-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:4px 32px;align-items:start}
.person-col{min-width:0}
.person-col.hidden{display:none}
.person-what,.person-role{border:0;margin:0 0 14px;padding:0;display:grid;gap:8px}
.choice{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r);cursor:pointer}
.choice:has(input:checked){border-color:var(--brass);background:#F1F8F6}
.choice input{margin-top:3px;flex:0 0 auto;accent-color:var(--brass)}
.choice span{display:flex;flex-direction:column;gap:2px}
.choice small{color:var(--muted);font-size:13px;line-height:1.4}
@media (max-width:760px){
  .team-head .btn{width:100%;justify-content:center;min-height:44px}
  .team-actions{width:100%;justify-content:stretch}
  /* Os botões de cada pessoa numa só linha: «Ficha», «Acesso»/«Dar acesso» a repartir a largura e o «⋯» estreito. */
  .team-actions{flex-wrap:nowrap}
  .team-actions>.btn{flex:1 1 0;min-width:0;width:auto}
  .team-more{flex:0 0 52px}
  .team-actions .btn,.team-more>summary{min-height:44px;justify-content:center}
  .team-more>summary{width:100%}
  .team-menu{left:0;right:0}
}

/* Guia de ajuda do backoffice (ADR 0006): fundo escurecido com desfoque leve, buraco nítido no que se explica, balão sólido. */
.help-btn{display:inline-flex;align-items:center;gap:6px;height:42px;padding:0 12px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer;position:relative}
.help-btn>span[aria-hidden]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--brass);color:#fff;font-size:13px;font-weight:700}
.help-btn.has-new::after{content:'';position:absolute;top:7px;right:7px;width:8px;height:8px;border-radius:50%;background:var(--oxblood);box-shadow:0 0 0 2px var(--card)}
.help-btn:focus-visible{outline:2px solid var(--brass);outline-offset:2px}
@media (max-width:760px){.help-btn{padding:0 10px}.help-btn-text{display:none}}

.help-layer{position:fixed;inset:0;z-index:1000;pointer-events:none}
/* O desfoque fica parado (sem animar o recorte), numa camada própria do GPU: é o desfoque animado que pesava. */
.help-shade{position:absolute;inset:0;background:rgba(23,19,16,.52);backdrop-filter:blur(2.5px);-webkit-backdrop-filter:blur(2.5px);pointer-events:auto;transform:translateZ(0)}
.help-ring{position:absolute;left:0;top:0;border:2px solid var(--brass);border-radius:12px;box-shadow:0 0 0 4px rgba(15,92,84,.18);transition:transform .22s ease,width .22s ease,height .22s ease;will-change:transform;pointer-events:none}

.help-pop{position:absolute;width:340px;max-width:calc(100vw - 24px);background:var(--card);color:var(--text);border-radius:var(--r-lg);box-shadow:0 18px 50px rgba(0,0,0,.28);padding:18px 18px 14px;pointer-events:auto;outline:none;animation:helpIn .22s ease}
.help-pop.is-center{left:50% !important;top:50% !important;transform:translate(-50%,-50%);width:400px}
.help-pop.is-sheet{left:0 !important;right:0;bottom:0;top:auto !important;width:auto;max-width:none;border-radius:var(--r-lg) var(--r-lg) 0 0;padding:18px 18px calc(16px + env(safe-area-inset-bottom));transform:none}
@keyframes helpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.help-pop.is-center{animation:none}
.help-count{font-size:12px;font-weight:600;color:var(--brass);letter-spacing:.02em;margin-bottom:4px}
.help-title{font-size:17px;margin:0 0 6px;color:var(--ink)}
.help-text{font-size:14.5px;line-height:1.55;margin:0 0 10px}
.help-safe{font-size:12.5px;color:var(--muted);background:var(--sage-lt);border-radius:10px;padding:8px 10px;margin:0 0 10px}
.help-actions{display:flex;align-items:center;gap:8px}
.help-gap{flex:1}
.help-link{background:none;border:0;padding:10px 4px;font:inherit;font-size:14px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.help-pop .btn,.help-invite .btn{min-height:40px}
@media (max-width:760px){.help-pop .btn,.help-invite .btn{min-height:44px}}

.help-invite{position:fixed;right:20px;bottom:20px;z-index:1001;width:340px;max-width:calc(100vw - 24px);background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:0 18px 50px rgba(0,0,0,.22);padding:16px 16px 10px;animation:helpIn .25s ease}
.help-invite-text{margin:0 0 8px;font-size:14.5px;line-height:1.5}
.help-invite.is-welcome{left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:440px;padding:26px 24px 16px;animation:none}
.help-welcome-title{font-size:21px;margin:0 0 8px;color:var(--ink)}
.help-welcome-back{position:fixed;inset:0;z-index:1000;background:rgba(23,19,16,.45);backdrop-filter:blur(2.5px);-webkit-backdrop-filter:blur(2.5px)}
@media (max-width:760px){
  .help-invite{left:0;right:0;bottom:0;width:auto;max-width:none;border-radius:var(--r-lg) var(--r-lg) 0 0;padding:16px 16px calc(12px + env(safe-area-inset-bottom))}
  .help-invite.is-welcome{left:0;right:0;top:auto;bottom:0;transform:none;width:auto}
}

.help-panel-wrap{position:fixed;inset:0;z-index:999;background:rgba(23,19,16,.35);display:flex;justify-content:flex-end}
.help-panel-wrap.hidden{display:none}
.help-panel{width:400px;max-width:100%;height:100%;overflow:auto;background:var(--card);padding:20px 20px 28px;outline:none;animation:helpSide .22s ease;box-shadow:-10px 0 40px rgba(0,0,0,.15)}
@keyframes helpSide{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
.help-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.help-panel-head h2{font-size:18px;margin:0}
.help-panel-head .modal-close{position:static}
.help-progress{margin:0 0 16px}
.help-progress small{color:var(--muted);font-size:13px}
.help-bar{height:6px;border-radius:6px;background:var(--line);overflow:hidden;margin-bottom:6px}
.help-bar span{display:block;height:100%;background:var(--brass);border-radius:6px;transition:width .3s ease}
.help-group{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:18px 0 6px}
.help-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.help-item{display:flex;align-items:flex-start;gap:12px;width:100%;min-height:52px;padding:11px 12px;border:1px solid var(--line);border-radius:var(--r);background:none;text-align:left;font:inherit;cursor:pointer;color:var(--ink)}
.help-item:hover,.help-item:focus-visible{border-color:var(--brass);background:#F1F8F6;outline:none}
.help-visit .help-item{border-color:var(--brass);background:#F1F8F6}
.help-item-text{display:flex;flex-direction:column;gap:2px}
.help-item-text strong{font-size:14.5px}
.help-item-text small{font-size:13px;color:var(--muted)}
.help-check{flex:0 0 20px;height:20px;border-radius:50%;border:2px solid var(--line-input);margin-top:1px}
.help-item.is-done .help-check,.help-guide.is-done .help-check{border-color:var(--brass);background:var(--brass) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'><path d='M5 12l5 5L20 7'/></svg>") center/12px no-repeat}
.help-foot{font-size:13.5px;color:var(--muted);margin:20px 0 0}
.help-search{width:100%;min-height:46px;margin:0 0 4px;font-size:16px}
.help-setup{border-color:var(--brass);background:#F1F8F6;margin-top:10px}
.help-area>summary{list-style:none;position:relative;padding-right:36px}
.help-area>summary::-webkit-details-marker{display:none}
.help-area>summary:after{content:'';position:absolute;right:16px;top:50%;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:translateY(-70%) rotate(45deg);transition:transform .15s}
.help-area[open]>summary:after{transform:translateY(-30%) rotate(-135deg)}
.help-area>.help-list{margin:6px 0 8px 12px}
.help-where{font-weight:600}
.help-go{display:inline-block;margin:0 0 10px 44px;font-size:13.5px;font-weight:600;color:var(--brass)}
.help-all{text-decoration:none;margin-top:18px}
.help-empty{color:var(--muted);font-size:14px;margin:14px 0}
.feat-intro{color:var(--muted);max-width:62ch;margin:0 0 20px}
.feat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}
.feat-card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);padding:18px 20px;display:flex;flex-direction:column;gap:10px}
.feat-card.is-off{background:transparent;border-style:dashed}
.feat-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.feat-head h2{margin:0;font-size:17px;text-transform:none;letter-spacing:0}
.feat-state{font-size:12px;font-weight:700;padding:3px 10px;border-radius:999px;background:#E3F2EC;color:#0B463F;white-space:nowrap}
.feat-card.is-off .feat-state{background:var(--line);color:var(--muted)}
.feat-card ul{margin:0;padding-left:18px;display:grid;gap:5px;font-size:14px;color:var(--text);line-height:1.45}
.feat-card .btn{margin-top:auto;align-self:flex-start;min-height:44px}
@media(max-width:640px){.feat-card .btn{align-self:stretch;justify-content:center;text-align:center}}
/* «Como fazer…»: cada guia abre no painel como passos numerados */
.help-guide>summary{list-style:none}
.help-guide>summary::-webkit-details-marker{display:none}
.help-guide[open]>summary{border-color:var(--brass);background:#F1F8F6}
.help-steps{margin:8px 0 6px;padding:0 4px 0 30px;display:grid;gap:8px;font-size:14px;line-height:1.5;color:var(--text)}
.help-steps strong{display:block;color:var(--ink)}
@media (max-width:760px){
  .help-panel-wrap{align-items:flex-end}
  .help-panel{width:100%;height:auto;max-height:88vh;border-radius:var(--r-lg) var(--r-lg) 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom));animation:helpIn .22s ease}
}

/* Quem pede menos movimento no sistema vê o guia sem animações. */
@media (prefers-reduced-motion: reduce){
  .help-ring,.help-bar span{transition:none}
  .help-pop,.help-invite,.help-panel{animation:none}
}
.help-layer.no-motion .help-ring{transition:none}

/* Subscrições (docs/adr/0008): estado numa etiqueta e a página de cada cliente */
.mg-state{display:inline-block;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;white-space:nowrap;background:var(--line-2);color:var(--muted)}
.mg-state.k-ok{background:var(--mint);color:#0B463F}
.mg-state.k-trial{background:#E3EEF6;color:#1E4B6E}
.mg-state.k-due,.mg-state.k-waiting{background:#FCEFD2;color:#7A5410}
.mg-state.k-late{background:#F6D9D5;color:var(--oxblood)}
.brand .sp-head{flex-wrap:wrap;margin-bottom:18px}
.sp-state{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.sp-state p{margin:0;font-size:15px;font-weight:500;color:var(--ink)}
.sp-state.k-late{border-color:#E9A8A2;background:#FDF4F2}
.sp-state.k-trial{border-color:#C9DCEA;background:#F3F8FC}
.sp-state.k-due,.sp-state.k-waiting{border-color:#EBCB82;background:#FFFBF0}
.sp-state.k-ok{border-color:#BFE6D8;background:#F3FBF8}
.sp-cols{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:16px;margin-bottom:16px;align-items:start}
.sp-cols>.card-panel{margin:0}
.sp-contact{grid-template-columns:repeat(2,minmax(0,1fr))}
.mg-info b small{font-weight:400;color:var(--muted);font-size:12px}
.sp-months{display:flex;gap:6px;flex-wrap:wrap}
.sp-months>div{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11.5px;color:var(--muted)}
.sp-months>div.now small{color:var(--brass);font-weight:600}
.sp-danger{display:flex;gap:8px;flex-wrap:wrap;padding-top:14px;border-top:1px solid var(--line-2)}
.sp-danger+.confirm-inline,.sp-danger~.confirm-inline{margin-top:12px}
.extras-head{margin-top:28px}
@media(max-width:900px){.sp-cols{grid-template-columns:minmax(0,1fr)}}
@media(max-width:520px){.sp-contact{grid-template-columns:minmax(0,1fr)}.brand .sp-head .mg-actions{width:100%}.brand .sp-head .mg-actions .btn{flex:1}}

/* Opção ainda por terminar (ADR 0010, fases 2 e 3): guarda-se já, funciona quando chegar. */
.soon{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:var(--sage-lt);color:var(--muted);font-size:11.5px;font-weight:600}

/* Painel de gestão (Gestão → Resumo, 2026-10-31): período, totais com variação, gráficos SVG, categorias, negócios e a tabela. */
.dash{margin-bottom:26px}
.dash-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px 20px;margin-bottom:16px}
.dash-bar h2{margin:0;font-size:24px;letter-spacing:-.02em;color:var(--ink)}
.dash-bar p{margin:2px 0 0;color:var(--muted);font-size:14px}
.dash-period{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px;border-radius:12px;background:var(--card);border:1px solid var(--line)}
.dash-period button{border:none;background:none;padding:8px 12px;border-radius:9px;font:inherit;font-size:13.5px;font-weight:600;color:var(--muted);cursor:pointer;min-height:36px}
.dash-period button.active{background:var(--ink);color:#fff}
.dash-period select{border:none;background:none;font:inherit;font-size:13.5px;font-weight:600;color:var(--muted);min-height:36px;padding:0 8px;width:auto}
.dash-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:14px}
.dash-kpi{padding:16px;border-radius:14px;border:1px solid var(--line);background:var(--card);min-width:0}
.dash-kpi span{display:block;font-size:12.5px;color:var(--muted);font-weight:600}
.dash-kpi b{display:block;font-size:24px;font-weight:700;letter-spacing:-.03em;color:var(--ink);margin:6px 0 2px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-kpi small{display:block;font-size:12px;color:var(--muted);line-height:1.4}
.dash-kpi.pos b{color:var(--sage, #2F7A6B)}
.dash-kpi.neg b{color:var(--oxblood, #A8412F)}
.dash-delta{font-style:normal;font-weight:700;margin-right:4px}
.dash-delta.up{color:var(--sage, #2F7A6B)}
.dash-delta.down{color:var(--oxblood, #A8412F)}
.dash-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}
.dash-card{margin:0;padding:20px 22px}
.dash-card.wide{grid-column:1 / -1}
.dash-card-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 14px;margin-bottom:12px}
.dash-card-head h3{margin:0;font-size:16px;color:var(--ink)}
.dash-big{font-size:20px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.dash-big small{font-size:13px;font-weight:500;color:var(--muted)}
.dash-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:12.5px;color:var(--muted)}
.dash-legend span::before{content:'';display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.dash-legend .rev::before{background:#0F5C54}
.dash-legend .exp::before{background:#E3A89C}
.dash-legend .res::before{background:#C6913E;height:3px;border-radius:2px;vertical-align:3px}
.dash-legend .new::before{background:#3FA98A}
.dash-legend .out::before{background:#A8412F}
.dash-chart{display:block;width:100%;height:220px}
.dash-chart.small{height:150px}
.dash-chart .axis{stroke:var(--line);stroke-width:1}
.dash-chart rect.rev{fill:#0F5C54}
.dash-chart rect.exp{fill:#E3A89C}
.dash-chart polyline.res{fill:none;stroke:#C6913E;stroke-width:2.5;vector-effect:non-scaling-stroke}
.dash-chart circle.res{fill:#fff;stroke:#C6913E;stroke-width:2;vector-effect:non-scaling-stroke}
.dash-chart .mrr{fill:none;stroke:#0F5C54;stroke-width:2.5;vector-effect:non-scaling-stroke}
.dash-chart .mrr-area{fill:#BFE6D8;opacity:.6}
.dash-xlabels{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));padding:4px 28px 0;font-size:11.5px;color:var(--muted);text-align:center;text-transform:capitalize}
.dash-xlabels span{overflow:hidden;white-space:nowrap}
.dash-xlabels .now{color:var(--ink);font-weight:700}
.dash-moves{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));align-items:end;gap:4px;height:130px;padding:0 28px}
.dash-move{display:flex;align-items:flex-end;justify-content:center;gap:3px;height:100%}
.dash-move i{display:block;width:min(12px,40%);min-height:2px;border-radius:3px 3px 1px 1px}
.dash-move i.new{background:#3FA98A}
.dash-move i.out{background:#A8412F}
.dash-cats,.dash-clients{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.dash-cats li{display:grid;grid-template-columns:minmax(90px,1.2fr) minmax(60px,2fr) auto 38px;align-items:center;gap:10px;font-size:13.5px}
.dash-cats li span{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-cats li b{font-variant-numeric:tabular-nums;color:var(--ink);font-size:13.5px}
.dash-cats li small{color:var(--muted);text-align:right}
.dash-cat-bar{height:8px;border-radius:4px;background:var(--paper);overflow:hidden}
.dash-cat-bar i{display:block;height:100%;background:#0F5C54;border-radius:4px}
.dash-clients li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.dash-clients li:last-child{border-bottom:none;padding-bottom:0}
.dash-clients small{grid-column:1;color:var(--muted);font-size:12.5px}
.dash-clients b{grid-row:1 / span 2;grid-column:2;align-self:center;font-variant-numeric:tabular-nums;color:var(--ink)}
.dash-more{margin:10px 0 0;font-size:13px;color:var(--muted)}
.dash-table tr.now td{background:color-mix(in srgb,var(--sage-lt) 50%,transparent)}
.dash-table tfoot th{border-top:2px solid var(--ink);font-weight:700;padding-top:10px}
.brand table.data.dash-table{min-width:0;width:100%}
.dash-sub{margin-top:8px}
@media(max-width:1200px){.dash-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.dash-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){
  .dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .dash-kpi b{font-size:20px}
  .dash-card{padding:16px}
  .dash-opt{display:none}
  .dash-xlabels{font-size:10px;padding:4px 8px 0}
  .dash-moves{padding:0 8px}
  .dash-period{width:100%}
  .dash-period button{flex:1}
}

/* Integrações → Banco: os passos para ligar a Enable Banking. */
.int-steps{margin:0 0 18px;padding-left:20px;color:var(--muted);font-size:14px;line-height:1.6}
.int-steps code{font-size:12.5px;background:var(--paper);border:1px solid var(--line);border-radius:6px;padding:1px 6px;word-break:break-all;color:var(--ink)}
.integration textarea.ik-key{font-family:ui-monospace,Menlo,monospace;font-size:12.5px}

/* Gastos e banco (2026-10-31): contas com o saldo, o mês do banco (entradas, saídas, seis meses) e os movimentos. */
.mg-pos{color:var(--sage, #2F7A6B);font-weight:650}
.mg-neg{color:var(--oxblood, #A8412F);font-weight:650}
.fin-total{display:flex;align-items:baseline;gap:10px;margin:2px 0 16px}
.fin-total b{font-size:36px;font-weight:700;letter-spacing:-.03em;color:var(--ink);font-variant-numeric:tabular-nums}
.fin-total span{color:var(--muted);font-size:14px}
.fin-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.fin-card{display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--paper)}
.fin-card.warn{border-color:color-mix(in srgb,var(--brass) 60%,var(--line))}
.fin-card-top{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.fin-card-top b{display:block;font-size:15px;color:var(--ink)}
.fin-card-top small{display:block;font-size:12.5px;color:var(--muted)}
.fin-bank{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--ink);color:#fff;font-weight:700;font-size:16px;flex:0 0 auto}
.fin-balance{font-size:24px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.fin-meta{font-size:12.5px;color:var(--muted)}
.fin-alert{margin:6px 0 0;font-size:13px;color:var(--ink);background:color-mix(in srgb,var(--brass) 14%,var(--card));border-radius:8px;padding:8px 10px}
.fin-alert a{font-weight:600;color:var(--ink);text-decoration:underline}
.fin-card-actions{display:flex;gap:8px;margin-top:10px}
.fin-nav{display:flex;align-items:center;gap:10px}
.fin-nav .mg-title{margin:0;min-width:150px;text-align:center}
.fin-pill{font-size:12.5px;font-weight:600;padding:4px 10px;border-radius:999px;background:color-mix(in srgb,var(--brass) 16%,var(--card));color:var(--ink)}
.fin-kpis{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:14px}
.fin-chart{display:flex;align-items:flex-end;gap:12px;height:150px;padding:8px 0 4px;margin:0 0 18px;position:relative}
.fin-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%}
.fin-col span{font-size:12px;color:var(--muted);text-transform:capitalize}
.fin-col.now span{color:var(--ink);font-weight:700}
.fin-bars{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:4px}
.fin-bars i{display:block;width:min(18px,40%);border-radius:5px 5px 2px 2px;min-height:2px}
.fin-bars i.in{background:var(--sage, #2F7A6B)}
.fin-bars i.out{background:color-mix(in srgb,var(--oxblood, #A8412F) 75%,var(--card))}
.fin-legend{position:absolute;top:0;right:0;display:flex;gap:12px;font-size:12px;color:var(--muted)}
.fin-legend span::before{content:'';display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.fin-legend .in::before{background:var(--sage, #2F7A6B)}
.fin-legend .out::before{background:color-mix(in srgb,var(--oxblood, #A8412F) 75%,var(--card))}
.fin-filter{display:inline-flex;gap:4px;padding:4px;border-radius:12px;background:var(--paper);border:1px solid var(--line);margin:0 0 10px;flex-wrap:wrap}
.fin-filter button{border:none;background:none;padding:7px 12px;border-radius:9px;font:inherit;font-size:13.5px;font-weight:600;color:var(--muted);cursor:pointer;min-height:36px}
.fin-filter button.active{background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.fin-moves{list-style:none;margin:0;padding:0}
.fin-move{display:grid;grid-template-columns:44px minmax(0,1fr) auto auto;align-items:center;gap:6px 14px;padding:12px 4px;border-top:1px solid var(--line)}
.fin-move:first-child{border-top:none}
.fin-move.ignored{opacity:.55}
.fin-day{display:flex;flex-direction:column;align-items:center;font-weight:700;font-size:17px;color:var(--ink);line-height:1.1}
.fin-day small{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase}
.fin-what{min-width:0}
.fin-what b{display:block;font-size:15px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fin-what small{display:block;font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fin-amount{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:15px}
.fin-amount.in{color:var(--sage, #2F7A6B)}
.fin-amount.out{color:var(--ink)}
.fin-act{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:180px}
.fin-tag{font-size:12.5px;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--paper);border:1px solid var(--line);color:var(--muted);max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fin-tag.ok{background:var(--sage-lt);border-color:transparent;color:var(--sage, #2F7A6B)}
.fin-x{border:none;background:none;color:var(--muted);cursor:pointer;width:32px;height:32px;border-radius:8px}
.fin-x:hover{background:var(--paper);color:var(--ink)}
.fin-choice{display:flex;flex-wrap:wrap;gap:6px 18px;margin:4px 0 12px}
@media(max-width:700px){
  .fin-kpis{grid-template-columns:minmax(0,1fr)}
  .fin-move{grid-template-columns:40px minmax(0,1fr) auto}
  .fin-act{grid-column:2 / -1;justify-content:flex-start;min-width:0}
  .fin-act .btn{min-height:40px}
  .fin-total b{font-size:30px}
}

/* Grupos de serviços nas Definições (ADR 0010). */
.svc-groups{border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;margin:0 0 16px}
.svc-groups-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.svc-groups-head h4{margin:0}
.svc-groups-empty{color:var(--muted);font-size:14px;margin:8px 0 0}
.svc-group-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px}
.svc-group-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px}
.svc-group-name{font-weight:600;flex:1;min-width:0}
.svc-group-list small{color:var(--muted)}
.confirm-inline{margin:10px 0 0;padding:12px;border-radius:10px;background:#FBEFD9;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.confirm-inline p{margin:0;flex:1 1 100%;font-size:14px}

/* Vários serviços na «Nova marcação» (ADR 0010). */
.more-services #mMoreList{display:grid;gap:8px;margin-bottom:8px}
.more-services #mMoreList:empty{margin:0}
.more-svc{display:flex;gap:8px;align-items:center}
.more-svc select{flex:1;min-width:0}
/* Marcações da mesma visita na agenda. */
.tag.tag-visit{background:rgba(15,92,84,.14);color:var(--ink)}

/* ---------- Mensagens personalizáveis (docs/adr/0013): editor da plataforma e leitura do gestor ---------- */
.msg-page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin-bottom:18px}
.msg-page-head h1{margin:0 0 4px}
.msg-page-head .section-sub{max-width:640px;margin:0}
.msg-pick{min-width:240px}
.msg-editor{display:grid;grid-template-columns:220px minmax(0,1fr) minmax(0,1.05fr);gap:20px;align-items:start}
.msg-editor[aria-busy=true]{opacity:.6}
.msg-list{display:flex;flex-direction:column;gap:6px;position:sticky;top:16px}
.msg-item{display:flex;flex-direction:column;gap:3px;text-align:left;padding:10px 12px;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--card);font:inherit;color:var(--text);cursor:pointer;touch-action:manipulation}
.msg-item:hover{border-color:var(--muted)}
.msg-item.active{border-color:var(--brass);box-shadow:0 0 0 1px var(--brass) inset}
.msg-item-name{font-weight:600;font-size:14.5px}
.msg-item-meta{display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:var(--muted)}
.msg-chan{font-weight:700}
.msg-state.s-personalizado,.msg-status.s-personalizado{color:var(--brass)}
.msg-dirty{color:#8A4B10;font-weight:700}
.msg-form{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px;min-width:0}
.msg-form-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.msg-form-head h2{margin:0;font-size:18px}
.msg-status{font-size:12.5px;font-weight:700;color:var(--muted)}
.msg-form .section-sub{margin:4px 0 14px}
.msg-form textarea{width:100%;resize:vertical;line-height:1.5}
.msg-tokens{margin-top:6px}
.msg-token-list{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.msg-token{min-height:36px;padding:0 12px;border-radius:999px;border:1px dashed var(--line);background:var(--bg,#F3F5F4);font:inherit;font-size:13px;font-weight:600;color:var(--text);cursor:pointer;touch-action:manipulation}
.msg-token:hover{border-color:var(--brass);color:var(--brass)}
.msg-errors{margin:12px 0 0;padding:10px 12px 10px 28px;border-radius:10px;background:#FBE4DF;color:#9B2C22;font-size:14px}
.msg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.msg-form .confirm-inline{margin-top:12px}
.msg-form .phone-field{margin:8px 0}
.msg-updated{margin:12px 0 0;font-size:12.5px;color:var(--muted)}
.msg-preview{position:sticky;top:16px;min-width:0}
.msg-preview-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:8px}
.msg-counter{font-size:12.5px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.msg-counter.over{color:#9B2C22}
.msg-subject,.notif-subject{margin:0 0 8px;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.msg-subject span,.notif-subject span{font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-right:6px}
/* O email é o HTML que sai: as regras da página não lhe tocam (os estilos dele são todos em linha). */
.mail-frame,.mail-frame *{all:revert}
.mail-frame{display:block;max-height:620px;overflow:auto;overscroll-behavior:contain;border:1px solid #D9E0DD;border-radius:12px;background:#F3F5F4}
.mail-frame a{pointer-events:none}
.sms-phone{padding:18px 14px;border-radius:22px;background:#E9EDEB;border:1px solid var(--line)}
.sms-bubble{max-width:92%;padding:10px 14px;border-radius:16px 16px 16px 4px;background:#fff;color:#16211F;font-size:14.5px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 1px 1px rgba(0,0,0,.06)}
.notif-texts{margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
.notif-texts h3{margin:0 0 4px;font-size:16px}
.notif-texts .btn{margin-top:10px}
.notif-text{border:1px solid var(--line);border-radius:12px;padding:0 14px;margin-top:10px;background:var(--card)}
.notif-text summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;min-height:48px;padding:12px 0;cursor:pointer}
.notif-text summary small{flex-basis:100%;color:var(--muted)}
.notif-chan{font-size:12px;font-weight:700;color:var(--muted)}
.notif-text[open]{padding-bottom:14px}
@media(max-width:1180px){.msg-editor{grid-template-columns:200px minmax(0,1fr)}.msg-preview{grid-column:1/-1;position:static}}
@media(max-width:760px){
  .msg-editor{grid-template-columns:minmax(0,1fr)}
  .msg-list{position:static;flex-direction:row;overflow-x:auto;padding-bottom:4px}
  .msg-item{flex:0 0 auto;min-width:150px}
  .msg-actions .btn{flex:1 1 calc(50% - 8px);justify-content:center;text-align:center}
  .msg-form input,.msg-form textarea{font-size:16px}
}

/* Filtro da lista de negócios na plataforma (ativos, suspensos, todos). */
.tenant-filter{margin:4px 0 14px}
.tenant-filter .muted{margin-left:4px;font-weight:500}

/* O seu telemóvel (plataforma → Equipa): código da app com QR e os telemóveis ligados. */
.phone-link{margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
.phone-link h3{margin:0;font-size:17px}
.phone-code{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:12px 0}
.phone-code img{border-radius:12px;background:#fff;border:1px solid var(--line)}
.phone-digits{font-size:28px;font-weight:700;letter-spacing:.08em;font-variant-numeric:tabular-nums;margin:0 0 4px}
.phone-devices{list-style:none;margin:8px 0 0;padding:0}
.phone-devices li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.phone-devices li span small{display:block;color:var(--muted);font-size:13px}

/* Tema no menu do nome: três opções lado a lado, a escolhida em destaque. */
.user-menu-pop .um-theme{margin:4px 0 0;padding:8px 6px 4px;border-top:1px solid var(--line)}
.user-menu-pop .um-theme-label{display:block;font-size:12px;font-weight:600;color:var(--muted);padding:0 6px 6px}
.user-menu-pop .um-theme-label b{font-weight:600;color:var(--text)}
.user-menu-pop .um-theme-opts{display:flex;gap:4px;padding:3px;border-radius:10px;background:var(--paper)}
.user-menu-pop .um-theme-opts button{flex:1;justify-content:center;padding:8px 6px;min-height:36px;color:var(--muted);border-radius:7px}
.user-menu-pop .um-theme-opts .icon{width:18px;height:18px;margin:0;color:currentColor}
.user-menu-pop .um-theme-opts button:hover{background:var(--line-2)}
.user-menu-pop .um-theme-opts button[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:var(--shadow-sm)}

/* Lançador de produtos da plataforma (ADR 0021), como o das apps da Zoho: ícone de cor por produto e grelha para trocar. */
.prod-switch{position:relative;margin:4px 8px 12px}
.prod-switch summary{list-style:none;display:flex;align-items:center;gap:11px;padding:8px 8px 8px 8px;border:1px solid var(--line);border-radius:14px;background:var(--card);cursor:pointer;min-height:56px;transition:border-color .15s,box-shadow .15s}
.prod-switch summary::-webkit-details-marker{display:none}
.prod-switch summary:hover,.prod-switch[open] summary{border-color:var(--brass);box-shadow:0 0 0 3px rgba(var(--accent-2-rgb),.15)}
.prod-name small{display:block;font-size:11px;color:var(--muted);font-weight:600;line-height:1.1;letter-spacing:.02em}
.prod-name b{display:block;font-size:16px;line-height:1.2}
.prod-grid{margin-left:auto;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--muted)}
.prod-grid svg{width:16px;height:16px;fill:currentColor}
.prod-switch[open] .prod-grid,.prod-switch summary:hover .prod-grid{background:var(--paper-2);color:var(--ink)}
.app-tile{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;flex:none;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.12)}
.app-tile svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.app-tile.t-book{background:#0F5C54}
.app-tile.t-class{background:#C13B2B}
.prod-menu{position:absolute;left:0;top:calc(100% + 8px);z-index:30;width:300px;background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 40px -16px rgba(0,0,0,.3);padding:12px}
.prod-menu-title{margin:2px 4px 10px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.prod-apps{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.prod-apps a{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:14px 8px 12px;border-radius:12px;border:1px solid transparent;color:var(--ink);text-decoration:none}
.prod-apps a .app-tile{width:48px;height:48px;border-radius:14px}
.prod-apps a .app-tile svg{width:26px;height:26px}
.prod-apps a b{font-size:14px}
.prod-apps a small{font-size:11.5px;color:var(--muted);line-height:1.3}
.prod-apps a:hover{background:var(--paper-2)}
.prod-apps a.on{border-color:var(--line);background:var(--paper-2)}
.prod-apps a.on b::after{content:" ✓";color:var(--brass)}
.class-settings{display:grid;gap:16px;max-width:520px}
.class-settings .btn{justify-self:start;min-width:140px}
.class-settings input:not([type=checkbox]){width:100%;max-width:200px;min-height:44px;border:1px solid var(--line);border-radius:10px;padding:0 12px;font:inherit;font-size:16px;background:var(--card);color:var(--ink);display:block;margin:6px 0 4px}
.class-settings .form-field small{display:block}
#professores,#definicoes{margin-top:16px}
.class-settings .switch-row small{display:block;font-weight:400;color:var(--muted)}

/* Na barra de cima, ao lado do logótipo: sempre à vista, também no telemóvel. */
.prod-switch.prod-top{margin:0 0 0 14px;padding-left:14px;border-left:1px solid var(--line)}
.prod-top summary{min-height:40px;padding:3px 6px 3px 3px;gap:8px;border-color:transparent;background:transparent;border-radius:10px}
.prod-top summary:focus-visible{outline:2px solid var(--brass);outline-offset:2px}
.prod-top summary:focus:not(:focus-visible){outline:none;box-shadow:none}
.prod-top summary:hover,.prod-top[open] summary{background:var(--paper-2);box-shadow:none;border-color:transparent}
.prod-top .app-tile{width:28px;height:28px;border-radius:8px}
.prod-top .app-tile svg{width:16px;height:16px}
.prod-top .prod-name{display:flex;align-items:baseline;gap:5px;white-space:nowrap}
.prod-top .prod-name small{display:inline;font-size:15px;font-weight:500;color:var(--muted);letter-spacing:0}
.prod-top .prod-name b{display:inline;font-size:15px}
.prod-top .prod-grid{width:28px;height:28px}
.prod-top .prod-menu{left:14px}
@media (max-width:600px){.prod-switch.prod-top{margin-left:6px;padding-left:6px;min-width:0}.prod-top .prod-name{display:none}.prod-top summary{gap:4px}.prod-top .prod-menu{position:fixed;left:12px;right:12px;top:64px;width:auto}}
.class-row-actions{white-space:normal;text-align:right}
.class-row-actions>*{margin-left:8px}
.class-row-actions .confirm-inline{display:block;margin-top:8px}
.class-row-actions .confirm-inline.hidden,.class-row-actions .hidden{display:none}
