:root{font-family:system-ui,sans-serif;color:#1d2234;background:#f5f4f9;--purple:#6240b7;--purple-dark:#301d59;--plum:#181329;--muted:#5c6175;--line:#dedbea;--white:#fff}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:#523596}button:focus-visible,a:focus-visible{outline:3px solid #b79bea;outline-offset:3px}h1,h2,h3,p{margin:0}p{line-height:1.55}h1{font-size:clamp(1.9rem,4vw,2.85rem);letter-spacing:-.035em}h2{font-size:1.25rem}h3{font-size:1.05rem}
.gate{min-height:100vh;min-height:100svh;background:radial-gradient(ellipse at 85% 5%,#422c66 0,transparent 45%),linear-gradient(155deg,#171329,#26183e 70%,#171329);display:grid;place-items:center;padding:24px}
.gate-wrap{width:min(100%,510px)}.brand{display:flex;align-items:center;gap:.65rem;color:#fff;font-weight:660;font-size:1.25rem;letter-spacing:-.025em}.brand b{color:#dbbeff}.gate .brand{justify-content:center;margin-bottom:18px}.mark{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#ad8af2;color:#22183e;font-size:22px}.login-card{border-radius:23px;overflow:hidden;background:white;box-shadow:0 20px 64px #08051099}.castle{height:180px;position:relative;isolation:isolate;background:#271c42}.castle img{width:100%;height:100%;object-fit:cover;object-position:50% 44%}.castle::after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 40%,#171329af)}.castle span{position:absolute;bottom:15px;left:25px;color:white;z-index:1;font-size:.75rem;font-weight:750;letter-spacing:.16em}.login-body{padding:23px 30px 26px}.login-body h1{font-size:1.65rem}.login-body>p{margin:4px 0 16px;color:var(--muted)}label{display:grid;gap:5px;font-size:.9rem;font-weight:620}input,textarea,select{width:100%;padding:.65rem .75rem;min-height:42px;border:1px solid #c8c4d8;border-radius:9px;background:#fff;color:inherit}textarea{min-height:100px;resize:vertical}input:focus,textarea:focus,select:focus{outline:2px solid #8865d4;outline-offset:1px}#auth{display:grid;gap:10px}.primary,.secondary,.text-btn{border-radius:9px;padding:.63rem .92rem;font-weight:650}.primary{background:var(--purple);border:1px solid var(--purple);color:white}.primary:hover{background:#4c2f9a}.secondary{background:white;border:1px solid #c9c2dd;color:var(--purple-dark)}.text-btn{border:0;background:none;color:#513990;padding:0}.photo-credit{color:#d3c8e9;font-size:.75rem;text-align:center;margin-top:12px}.photo-credit a{color:inherit}
#gate-message,#editor-status,#status{color:#a1254e;min-height:1em}#gate-message:empty,#editor-status:empty,#status:empty{display:none}#status{position:fixed;bottom:1rem;right:1rem;z-index:9;background:#fff;max-width:min(420px,90vw);padding:.8rem 1rem;border:1px solid var(--line);border-radius:10px;box-shadow:0 6px 20px #20154120}
.workspace{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:100vh}.workspace aside{background:var(--plum);padding:20px 16px;color:#eee;display:flex;flex-direction:column;gap:22px}.workspace .brand{font-size:1.07rem}.workspace nav{display:grid;gap:.28rem}.workspace nav button{display:flex;align-items:center;gap:.6rem;text-align:left;padding:.62rem .65rem;background:none;color:#dfd6ef;border:1px solid transparent;border-radius:9px}.workspace nav button[aria-current]{background:#423066;color:#fff;border-color:#634c8e}.workspace nav button:hover{background:#34274e}.sidebar-user{margin-top:auto;display:grid;gap:8px;font-size:.85rem}.sidebar-user .secondary{justify-self:start}.top{display:flex;justify-content:space-between;gap:1rem;min-height:54px;padding:15px 28px;background:white;border-bottom:1px solid var(--line);color:var(--muted);font-size:.9rem}.top span:first-child{color:var(--purple-dark);font-weight:650}#screen{max-width:1260px;margin:auto;padding:30px}.section-title{display:flex;justify-content:space-between;align-items:end;gap:1rem;margin:0 0 22px}.section-title p,.muted{color:var(--muted)}.section-title p{margin-top:6px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(255px,100%),1fr));gap:14px}.card,.panel,.empty{padding:18px;background:white;border:1px solid var(--line);border-radius:15px;overflow-wrap:anywhere}.card img{width:100%;height:145px;object-fit:cover;border-radius:9px;margin-bottom:10px}.card p,.panel p{margin:.45rem 0}.card .row{margin-top:10px}.row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.pill{display:inline-block;border-radius:999px;background:#eee6fb;color:#492b84;padding:.25rem .6rem;font-size:.79rem;font-weight:660}.metrics .card strong{display:block;font-size:2rem;color:var(--purple-dark)}.panel+.panel,.cards+.panel,.panel+.cards{margin-top:16px}.grid-form,#editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.wide{grid-column:1/-1}dialog{width:min(660px,calc(100% - 24px));max-height:88vh;border:1px solid var(--line);border-radius:16px;padding:22px;background:white;color:inherit}dialog::backdrop{background:#1a1236a0}dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px}.summary{padding:20px;border-radius:15px;background:#e9dffb;margin:0 0 18px;color:#36235e}.section-title button{flex-shrink:0}canvas{max-width:100%}
@media(max-width:760px){.workspace{display:block}.workspace aside{padding:13px;gap:10px}.workspace nav{display:flex;overflow:auto}.workspace nav button{white-space:nowrap}.sidebar-user{display:flex;align-items:center;justify-content:space-between}.top,#screen{padding:15px}.section-title{align-items:start;flex-wrap:wrap}.gate{padding:14px}.castle{height:150px}}
@media(max-width:400px){.grid-form,#editor-fields{grid-template-columns:1fr}.login-body{padding:18px}}

#theme-logo{max-width:85px;max-height:40px;object-fit:contain}
#theme-phrase{margin:0 0 14px;padding:.65rem .85rem;border-left:3px solid #9974e1;background:#f7f2fe;color:#392764;font-size:.88rem}
#theme-phrase small{display:block;margin-top:.24rem}
.login-actions{display:flex;align-items:center;gap:.55rem .95rem;flex-wrap:wrap;margin-top:16px;font-size:.82rem}
.login-actions .text-btn{font-size:inherit}.login-body .summary{font-size:.88rem;margin:0 0 12px;padding:9px 12px}
.theme-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin-bottom:12px}
.stock-table{overflow:auto}.stock-table table{width:100%;border-collapse:collapse;font-size:.9rem}.stock-table th,.stock-table td{text-align:left;vertical-align:top;border-bottom:1px solid var(--line);padding:.7rem}.stock-table th{color:var(--purple-dark);background:#f1edf9}.photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.photo-grid img{height:95px}
.gate{background:radial-gradient(ellipse at 70% 0,#2f245a 0,transparent 46%),#100f22}
.login-card{color:#f8f4ff;background:#17162c;border:1px solid #413653}
.castle{height:clamp(180px,33vw,235px)}
.login-body h1{color:#e3cdfb}
.login-body>p,.login-actions a{color:#d8cee9}
#auth input,#auth select{background:#121124;border-color:#514864;color:#fff}
#auth input::placeholder{color:#ada6be}.login-actions .text-btn{color:#dabcff}
#theme-phrase{background:#26213e;color:#e8dbfa}#theme-phrase a{color:#dfbdff}
.gate #gate-message{color:#ff9bb8}
.metric-chart{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:12px}
.metric-chart div{display:grid;gap:.4rem}.metric-chart meter{width:100%}
.chart-title{margin-top:20px}.metric-chart{grid-template-columns:repeat(auto-fit,minmax(min(100px,100%),1fr))}.metric-chart .received{accent-color:#7853c2}.metric-chart .expected{accent-color:#3d9c6c}.metric-chart span{font-size:.85rem}
.presence{margin-bottom:16px}.presence-counts{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:10px}.presence-counts strong{margin-left:5px;color:var(--purple-dark)}.presence-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#369476}
.chat-panel{max-width:850px}.chat-feed{max-height:360px;min-height:145px;overflow:auto;display:flex;flex-direction:column;gap:.55rem;padding:12px;border:1px solid var(--line);border-radius:12px;background:#faf8fe}.chat-bubble{align-self:flex-start;max-width:82%;display:grid;gap:.25rem;padding:.55rem .8rem;border-radius:10px;background:#f0edf7;overflow-wrap:anywhere}.chat-bubble p{white-space:pre-wrap;margin:0}.chat-bubble time{font-size:.72rem;color:var(--muted)}.chat-bubble img{width:min(125px,100%);height:auto}.chat-mine{align-self:flex-end;background:#e6d9f7}.chat-panel form{display:grid;gap:.6rem;margin-top:14px}.chat-picker{padding:.5rem 0}.chat-picker button{min-width:40px}.chat-picker img{display:block;width:64px}.chat-picker button[aria-pressed=true]{outline:2px solid var(--purple);background:#ede3fa}#chat-status{color:var(--muted);min-height:1em}
#contract-preview{width:min(820px,calc(100% - 24px));padding:clamp(16px,4vw,36px)}
.contract-preview-header{align-items:flex-start;margin-bottom:18px}.contract-preview-header h2{margin-top:7px;font-size:clamp(1.3rem,3vw,1.8rem);overflow-wrap:anywhere}
#contract-preview-content section{border-top:1px solid var(--line);padding:14px 0;overflow-wrap:anywhere}
#contract-preview-content section p{margin:.3rem 0;white-space:pre-wrap}
.contract-gap{height:.6rem}.contract-preview-actions{justify-content:flex-end;margin-top:12px}

.workspace nav .nav-group summary{cursor:pointer;color:#dfd6ef;padding:.62rem .65rem;border-radius:.55rem;white-space:nowrap}
.workspace nav .nav-group summary:hover,.workspace nav .nav-group[open]>summary{background:#34274e}
.workspace nav .nav-group>div{display:grid;gap:.2rem;margin:.18rem 0 .28rem .85rem;border-left:1px solid #634c8e;padding-left:.4rem}

.presence-dot.ausente{background:#f59e0b}
#chat-code{overflow-wrap:anywhere}
#shortcut-drop>button{width:100%}
.sidebar-user select{max-width:100%}

.workspace .urgency-strip{display:flex;flex-direction:row;align-items:center;min-height:0;gap:.75rem;padding:.5rem 1rem;background:#fff0db;color:#653710}
#urgent-items{display:flex;align-items:center;gap:1rem;overflow:auto}
#urgent-items>span{flex:none;white-space:nowrap}

.contract-highlight{color:inherit;padding:.12em .35em;border-radius:.25em;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.contract-highlight-cliente{background:#ffe7e8}
.contract-highlight-evento{background:#e2f4ea}

#dialog:has(#event-preview){width:min(1100px,calc(100% - 24px))}
.event-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;margin-top:.75rem}
.event-preview-grid>section{min-width:0;border:1px solid var(--line);border-radius:14px;padding:.8rem;background:#f8f5fc}
.event-preview-grid .card{margin-top:.45rem;overflow-wrap:anywhere}
@media(max-width:720px){.event-preview-grid{grid-template-columns:1fr}}

.mobile-menu{display:none}
@media(max-width:760px){
 .workspace>aside{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding-top:max(13px,env(safe-area-inset-top))}
 .workspace .mobile-menu{display:block;min-height:44px}
 .workspace #nav{grid-column:1/-1;display:none;overflow:visible}
 .workspace #mobile-menu[aria-expanded="true"]+#nav{display:grid}
 .workspace #nav button,.workspace #nav summary{min-height:44px;white-space:normal}
 .workspace .sidebar-user{grid-column:1/-1;flex-wrap:wrap;justify-content:flex-start;gap:.6rem}
 .workspace main,.section-title>*{min-width:0}
 .grid-form,#editor-fields{grid-template-columns:minmax(0,1fr)}
 input,select,textarea{font-size:16px}
 #screen .row>button,.login-actions button,dialog footer button{min-height:44px}
 .contract-preview-actions{flex-wrap:wrap}
 body{overflow-wrap:anywhere}
}

.agenda-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:.45rem;margin:.75rem 0}
.agenda-grid label{display:flex;gap:.45rem;align-items:center;min-height:44px;padding:.5rem;border:1px solid var(--line);border-radius:.5rem}
.agenda-grid label:has(input:checked){background:#ffe7e8;border-color:#b44c59}
.agenda-grid input{width:auto}

.registration-check{display:flex!important;align-items:center;gap:.5rem}
.registration-check input{width:auto}
.pix-demo{display:block;width:min(240px,100%);height:auto;margin:.6rem auto}

#presence-mode {
 min-height:44px;
 color:#342657;
 background:#f0eafa;
 border-color:#b9a7d8;
 font-weight:600;
 color-scheme:light;
}
#presence-mode:has(option[value="online"]:checked) {
 color:#145339;
 background:#e4f7ed;
 border-color:#78be9b;
}
#presence-mode:has(option[value="ausente"]:checked) {
 color:#713600;
 background:#fff0da;
 border-color:#e0aa67;
}
#presence-mode option {
 color:#261b3e;
 background:#fff;
}
#presence-mode:focus-visible {
 outline:3px solid #cbb4ff;
 outline-offset:2px;
}

.rental-overdue{background:#ffe7e8;color:#7a2233}

.company-book-hero{display:flex;align-items:flex-start;gap:clamp(1rem,4vw,2rem);padding:clamp(1rem,3vw,1.75rem);border:1px solid #ded6ee;border-radius:16px;background:#f6f2fc;color:#27203b}
.company-book-hero>div{flex:1;min-width:0}
.company-book-hero h2{margin:0 0 .5rem;font-size:clamp(1.4rem,4vw,2rem)}
.company-book-hero figure{flex:0 1 38%;margin:0}
.company-book-hero figure img{display:block;width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:12px}
.company-book-hero figcaption{margin-top:.5rem}
.company-book-ratings{padding:0;list-style:none}
.company-book-ratings li{display:flex;justify-content:space-between;gap:.8rem;padding:.65rem .25rem;border-bottom:1px solid #ded6ee}
.company-book-ratings strong{white-space:nowrap}
@media(max-width:480px){.company-book-hero{flex-direction:column}.company-book-hero figure{width:min(100%,15rem)}}
