/* Shared surfaces; the company's theme is set on the HTML by the server. */
:root{--surface-raised:#22271c;--control-bg:#12180d;--control-ink:#e4ead7;--button-bg:#24291c;--sidebar-bg:#171914;--accent-ink:#23271c}
html[data-theme=light]{color-scheme:light;--bg:#f4f5f7;--panel:#fff;--gold:#78551d;--ink:#20282b;--muted:#566168;--line:#cdd4d9;--surface-raised:#eef1f4;--control-bg:#fff;--control-ink:#20282b;--button-bg:#f0f2f4;--sidebar-bg:#fff;--accent-ink:#fff}
[data-theme=light] body{background:var(--bg);color:var(--ink)}[data-theme=light] .sidebar,[data-theme=light] aside{background:var(--sidebar-bg)}[data-theme=light] .brand,[data-theme=light] header b,[data-theme=light] h1,[data-theme=light] h2,[data-theme=light] h3,[data-theme=light] strong,[data-theme=light] label,[data-theme=light] .drop strong{color:var(--ink)}[data-theme=light] p,[data-theme=light] small,[data-theme=light] footer,[data-theme=light] header,[data-theme=light] .field-note,[data-theme=light] .studio-note,[data-theme=light] .list-item small,[data-theme=light] .data-table td small,[data-theme=light] .stat small,[data-theme=light] .stat span,[data-theme=light] .nav-label,[data-theme=light] .team-badge{color:var(--muted)}
[data-theme=light] nav a,[data-theme=light] .sidebar-bottom>a,[data-theme=light] .sidebar-bottom button{color:#3c4a50}[data-theme=light] nav a.active{background:#f1e8d9;border-color:#d8bd8b;color:#62491f}[data-theme=light] .panel,[data-theme=light] .card,[data-theme=light] .event,[data-theme=light] .auth-card{background:var(--panel);border-color:var(--line)}[data-theme=light] .stat{background:linear-gradient(120deg,#fff,#eef1f4)}[data-theme=light] .stat strong{color:#25342f}[data-theme=light] button,[data-theme=light] .button{background:var(--button-bg);color:var(--ink);border-color:#abb6be}[data-theme=light] .primary,[data-theme=light] .gold{background:#805c25;color:white;border-color:#805c25}[data-theme=light] input,[data-theme=light] textarea,[data-theme=light] select{background:var(--control-bg);color:var(--control-ink);border-color:#aeb9c2}[data-theme=light] input::placeholder,[data-theme=light] textarea::placeholder{color:#65747d}[data-theme=light] dialog{background:#fff;border-color:#9aa8b1;color:var(--ink)}[data-theme=light] .signature-document,[data-theme=light] .link-box{background:#f4f6f8;color:#26353b;border-color:var(--line)}[data-theme=light] .notice{background:#fff8e9;color:#604a22;border-color:#d0b778}[data-theme=light] .notice.success{background:#edf7ef;color:#28583a;border-color:#8aad96}[data-theme=light] .error{color:#a52a1d}[data-theme=light] .danger,[data-theme=light] .badge.danger{color:#982f23;background:#fff0ed;border-color:#d5a096}[data-theme=light] .badge{color:#2a5e3e;border-color:#94b39c;background:#edf7ef}[data-theme=light] .badge.warn{color:#79551b;background:#fff5dc;border-color:#d2b776}[data-theme=light] .badge.neutral{color:#475761;background:#eef1f5;border-color:#aab7c0}[data-theme=light] .status-dot{color:#2b6540}[data-theme=light] .danger-dot{color:#a13729}[data-theme=light] .amount{color:#705020}[data-theme=light] .company-icon{background:#f0e7d7}[data-theme=light] .chat-message{background:#f0f3f7;border-color:#c4cdd6}[data-theme=light] .chat-support{background:#faf2df;border-color:#d3bc87}[data-theme=light] .support-thread.has-unread{background:#fff3d9;border-color:#a37c36}[data-theme=light] #toast{background:#2d4037;color:#fff}[data-theme=light] .empty,[data-theme=light] .list-item,[data-theme=light] .data-table td{border-color:var(--line)}
/* Photo Studio: only the interface changes; image pixels and exported colors stay intact. */
[data-theme=light] .center{background:#edf0f3}[data-theme=light] .stage{background:radial-gradient(ellipse,#fff,#e0e5e9)}[data-theme=light] .item.active{background:#e7edf2}[data-theme=light] .presets .preset-active,[data-theme=light] .retouch-selected{background:#f1e4c7;color:#57421e;border-color:#a37c36}[data-theme=light] #selected-tool{color:#6a501e}[data-theme=light] .background-removal{background:#faf4e8;border-color:#d0b888}[data-theme=light] .background-removal h2{color:#695020}[data-theme=light] .tile{background:#edf0f3}[data-theme=light] .quiet{background:transparent;color:var(--ink);border-color:#b4bec6}[data-theme=light] .bar{background:#fff;border-color:#b9c3ca;box-shadow:0 4px 18px #18212b18}[data-theme=light] dialog img{background:transparent}
/* Width containment and touch targets shared by login, contracts and embedded screens. */
html{scrollbar-gutter:stable}body{min-inline-size:0}main,section,aside,header,footer,form,label,fieldset,.workspace,.layout,.panel,.card,.stat,.event-info,.page-title>div,.panel-top>div,.company-card{min-inline-size:0}img{max-inline-size:100%}button,.button{min-block-size:44px;max-inline-size:100%;white-space:normal;overflow-wrap:anywhere}input,textarea,select{min-inline-size:0;max-inline-size:100%}input[type=file]{overflow:hidden}input[type=checkbox]{flex:none;inline-size:20px;block-size:20px;accent-color:var(--gold)}h1,h2,h3,p,strong,label,.brand,.page-title,.panel-top,.event-info{overflow-wrap:anywhere}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--gold);outline-offset:3px}.form-grid,.settings-grid,.cards,.stats,.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(4,minmax(0,1fr))}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.two-col{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
/* Modals have an independent scroll area. The close button stays reachable. */
dialog{width:min(900px,calc(100% - 28px));max-width:calc(100% - 28px);max-height:calc(var(--viewport-height,100dvh) - 32px);padding:44px 28px 24px;overflow:hidden;margin:auto}#dialog-content{max-height:calc(var(--viewport-height,100dvh) - 120px);overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding:0 8px 2px 0;min-width:0;overflow-wrap:anywhere}dialog .icon-button{position:absolute;top:5px;right:10px;min-width:44px;min-height:38px;padding:0 8px;background:transparent;z-index:2}#dialog-content .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}#dialog-content .form-actions{position:sticky;bottom:-2px;background:var(--panel);padding:14px 0 4px;flex-wrap:wrap;z-index:1;gap:8px}#dialog-content .form-actions>*{flex:0 1 auto}.form-actions{flex-wrap:wrap}.filter-group{align-items:flex-end}.filter-group label{flex:1 1 160px}.table-scroll{max-width:100%;width:100%;overscroll-behavior-inline:contain;scrollbar-gutter:auto}.panel-top{flex-wrap:wrap}.toolbar{flex-wrap:wrap}.brand span{min-width:0}.company-card .table-actions{justify-content:flex-start}.company-modules,.company-theme{border:1px solid var(--line);border-radius:8px;margin:6px 0 0;padding:18px;min-width:0}.company-modules legend,.company-theme legend{font-size:14px;padding:0 8px;color:var(--gold)}.module-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.module-choice{display:flex;align-items:center;gap:10px;min-height:48px;border:1px solid var(--line);border-radius:6px;padding:10px}.module-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.theme-samples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:15px}.theme-sample{padding:18px;border:1px solid #a9afb5;border-radius:8px;font-weight:600}.theme-sample small{display:block;margin-top:6px}.theme-sample.dark-sample{background:#151714;color:#f2f0e8}.theme-sample.dark-sample small{color:#b7b9ae}.theme-sample.light-sample{background:#fff;color:#20282b}.theme-sample.light-sample small{color:#566168}
/* Navigation on desktop remains fixed and scrollable, including short laptop screens. */
.sidebar{overflow-y:auto;overscroll-behavior:contain}.sidebar-bottom{flex-shrink:0}.menu-toggle,.menu-close,.menu-backdrop{display:none}.frame{display:block;min-height:500px;height:900px;max-width:100%}.signature-layout,.access-picker{width:min(850px,calc(100% - 24px));max-width:850px}.auth-card label{font-size:14px}.auth-card form{gap:16px}.auth-card input{font-size:16px}.support-messages{max-height:min(520px,65dvh)}.support-thread{text-align:start}.chat-message{max-width:90%;min-width:0}.support-conversation form{min-width:0}#support-send-status{overflow-wrap:anywhere;min-width:0}
@media(min-width:761px){.workspace>header{position:sticky;top:0;z-index:5;background:var(--bg)}.sidebar{padding-top:24px}.nav-label{margin-top:28px}.studio-note{font-size:18px;padding-bottom:15px}nav a{padding-block:10px}.sidebar-bottom{padding-top:16px}}
@media(max-width:1150px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.two-col,.settings-grid{grid-template-columns:minmax(0,1fr)}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.page-title{flex-wrap:wrap}.workspace>header{padding-inline:24px}}
@media(max-width:760px){body.menu-open{overflow:hidden}.menu-toggle{display:inline-flex;flex:none;gap:6px;padding:8px 12px;font-size:14px}.menu-close{display:inline-flex;align-self:flex-end;margin-bottom:12px}.sidebar{position:fixed;inset:0 auto 0 0;width:min(320px,88vw);height:var(--viewport-height,100dvh);z-index:40;padding:16px 18px 24px;border-right:1px solid var(--line);border-bottom:0;transform:translateX(-105%);transition:transform .18s ease;display:flex}.menu-open .sidebar{transform:translateX(0)}.menu-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:35;border:0;border-radius:0;background:#05090799;width:100%;height:var(--viewport-height,100dvh);padding:0}.sidebar .brand{margin-bottom:12px}.sidebar .nav-label{display:block;margin:18px 12px 10px}.sidebar nav{display:grid;gap:4px;overflow:visible}.sidebar nav a{white-space:normal;font-size:14px;padding:11px 12px;gap:12px}.sidebar nav a span{font-size:20px}.sidebar .sidebar-bottom{display:block;margin-top:auto;padding-top:18px}.sidebar .sidebar-bottom>a,.sidebar .sidebar-bottom button{font-size:13px;width:100%}.sidebar .studio-note{display:none}.workspace{margin-left:0}.workspace>header{position:sticky;top:0;z-index:10;min-height:64px;height:auto;padding:10px 14px;gap:12px;background:var(--bg)}.workspace>header>span{min-width:0;font-size:11px}.workspace>header .team-badge{display:none}main{padding:24px 14px;max-width:100%}.page-title{gap:16px;margin:14px 0 24px}.page-title h1{font-size:32px;line-height:1.15}.page-title>.button,.page-title>button{align-self:flex-start}.stats{gap:10px;margin-bottom:22px}.stat{padding:16px 12px}.stat strong{font-size:25px}.cards,.settings-grid,.two-col{grid-template-columns:minmax(0,1fr);gap:14px}.panel{padding:18px 14px;margin-bottom:16px}p{font-size:14px}label{font-size:13px}input,textarea,select{font-size:16px;padding:12px 10px}button,.button{font-size:13px}.form-grid,#dialog-content .form-grid{grid-template-columns:minmax(0,1fr);gap:16px}.form-grid>*{grid-column:1}.toolbar{gap:10px;align-items:stretch}.toolbar input,.toolbar select{width:100%;max-width:100%;min-width:0}.table-scroll{padding:10px 4px}.table-scroll::before{content:'Deslize a tabela para ver todas as colunas ↔';display:block;font-size:12px;color:var(--muted);padding:6px 10px 12px}.data-table{min-width:620px}.data-table th{font-size:11px}.data-table td{font-size:13px}.data-table td small{font-size:12px}.table-actions button,.table-actions a{font-size:12px;padding:10px 12px}.event{padding:16px 12px;gap:12px;align-items:flex-start}.event-info{flex-basis:calc(100% - 90px)}.event .table-actions{width:100%;justify-content:flex-start}dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);padding:44px 14px 18px;max-height:calc(var(--viewport-height,100dvh) - 16px)}#dialog-content{max-height:calc(var(--viewport-height,100dvh) - 92px);padding-right:5px}dialog h2{font-size:27px}.form-actions>*{flex:1 1 130px}.company-modules,.company-theme{padding:14px 10px}.theme-samples{gap:8px}.theme-sample{padding:14px 10px}.module-choice{padding:10px 8px;font-size:13px}.support-threads{grid-template-columns:minmax(0,1fr)}.chat-message{max-width:100%}.panel-top h2{font-size:23px}.signature-layout,.access-picker{margin:24px auto;padding:20px 14px}.signature-document{max-height:55dvh;padding:16px;font-size:14px}.signature-layout h1{font-size:32px}.auth-card h1{font-size:30px}.frame{min-height:400px;height:1000px}footer{gap:12px;padding:20px 14px;overflow-wrap:anywhere}#toast{width:max-content;max-width:calc(100% - 24px);padding:14px 18px}.notice{font-size:13px;padding:14px}}
@media(max-width:380px){.module-choices,.theme-samples{grid-template-columns:minmax(0,1fr)}.stats{grid-template-columns:minmax(0,1fr)}.page-title h1{font-size:29px}.workspace>header i{margin-inline:5px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
