/* v0.3: modo CLARO permanece padrão. Preferência do usuário fica somente neste navegador. */
.theme-toggle{border:1px solid var(--line);border-radius:10px;background:#f7f8fc;color:#303c53;min-width:116px;height:34px;padding:0 11px;font-weight:800;font-size:10px;cursor:pointer;white-space:nowrap;transition:background .2s,color .2s}
.theme-toggle:hover{border-color:#18b778}.login-theme{position:fixed;right:24px;top:20px;z-index:100}
.inbox-grid{display:grid;grid-template-columns:365px minmax(0,1fr);gap:18px}.ticket-list{display:flex;flex-direction:column;gap:8px;margin-top:18px;max-height:440px;overflow-y:auto}.ticket-item{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:#fff}.ticket-item.selected{background:#fff2f4;border-color:#1bbd7b}.ticket-item small{color:var(--muted)}.subheading{margin:26px 0 14px!important}.ticket-detail .ticket-content{padding:20px}.ticket-status{flex-wrap:wrap!important;margin-bottom:20px}.ticket-status input,.ticket-status select{max-width:250px}.note-feed{display:flex;flex-direction:column;gap:12px;max-height:500px;min-height:140px;overflow:auto}.note-entry{background:#f5f7fb;border:1px solid var(--line);border-radius:12px;padding:14px;max-width:800px}.note-entry span{font-size:10px;color:#8a94a6}.note-entry p{white-space:pre-wrap;line-height:1.7;margin:7px 0 0;overflow-wrap:anywhere}.message-form{margin-top:20px;display:flex;flex-direction:column;gap:12px}.message-form label{font-weight:700}.message-form textarea,.form-panel textarea{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;font:inherit;resize:vertical;background:#fff;color:var(--ink)}.message-form .btn{align-self:flex-end}.chat-panel .chat-feed{padding:20px;max-height:550px;min-height:320px}.chat-panel .message-form{padding:0 20px 20px}.empty-small{padding:20px;color:var(--muted)}.metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.metrics-grid .stat-card{display:flex;flex-direction:column;gap:12px}.metrics-grid .stat-card span{font-weight:700;color:var(--muted)}.metrics-grid .stat-card strong{font-size:30px;letter-spacing:-1px}
html[data-theme="dark"]{color-scheme:dark;--bg:#101624;--ink:#e7ebf3;--muted:#98a4b9;--line:#303a51;--blue:#8897ff}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .main-wrap,html[data-theme="dark"] .content{background:#101624;color:#e7ebf3}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .ticket-item,html[data-theme="dark"] .flow-tile,html[data-theme="dark"] .kanban-column,html[data-theme="dark"] .kanban-colhead,html[data-theme="dark"] .deal-card,html[data-theme="dark"] .company-filter,html[data-theme="dark"] .form-panel,html[data-theme="dark"] .notice,html[data-theme="dark"] .toolstrip,html[data-theme="dark"] .setting-row,html[data-theme="dark"] .flow-editor,html[data-theme="dark"] .login-card{background:#1b2435!important;border-color:#303a51!important;color:#e7ebf3!important}
html[data-theme="dark"] .ticket-item.selected,html[data-theme="dark"] .flow-tile.chosen{background:#3b2637!important;border-color:#16935f!important}
html[data-theme="dark"] .note-entry,html[data-theme="dark"] .empty-icon,html[data-theme="dark"] .check-dot,html[data-theme="dark"] .little-badge{background:#242f43!important;color:#d4dced!important;border-color:#35435a!important}
html[data-theme="dark"] .crumb strong,html[data-theme="dark"] td strong,html[data-theme="dark"] .small-title,html[data-theme="dark"] .setting-row strong,html[data-theme="dark"] .panel h3,html[data-theme="dark"] .section-heading h1,html[data-theme="dark"] .stat-num,html[data-theme="dark"] .deal-card strong{color:#e7ebf3!important}
html[data-theme="dark"] td,html[data-theme="dark"] th,html[data-theme="dark"] .check-row,html[data-theme="dark"] .panel-head{border-color:#303a51!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .btn.secondary{background:#111b2b!important;color:#eff3fa!important;border:1px solid #3c4962!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#8793a9}
html[data-theme="dark"] .top-actions,html[data-theme="dark"] .crumb,html[data-theme="dark"] .section-heading p{color:#aebbd0}
html[data-theme="dark"] .login-wrap,html[data-theme="dark"] .login-right,html[data-theme="dark"] .login-side,html[data-theme="dark"] .login-main{background:#101624!important;color:#e7ebf3!important}
html[data-theme="dark"] .login-card h1,html[data-theme="dark"] .login-card h2,html[data-theme="dark"] .login-card label{color:#e7ebf3!important}
@media(max-width:1020px){.inbox-grid{grid-template-columns:1fr}.metrics-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.metrics-grid{grid-template-columns:1fr 1fr}.theme-toggle{min-width:36px;padding:0 7px}.top-actions .system-status{display:none}.login-theme{right:12px;top:12px}}

html[data-theme="dark"] .login-panel{background:#111827!important;color:#e7ebf3!important}
html[data-theme="dark"] .login-panel h2,html[data-theme="dark"] .login-panel label{color:#e7ebf3!important}
html[data-theme="dark"] .login-panel .login-card{background:transparent!important;border:0!important}
html[data-theme="dark"] .login-panel input{background:#1b2435!important;color:#e7ebf3!important;border-color:#38465f!important}
