:root { --ink:#16243a; --muted:#64748b; --line:#dfe7f1; --canvas:#f5f8fc; --surface:#fff; --blue:#1769e0; --blue-dark:#1054b5; --blue-soft:#eaf3ff; --green:#137a53; --amber:#a66300; --radius:14px; }
* { box-sizing:border-box; } body { margin:0; min-width:320px; background:var(--canvas); color:var(--ink); font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; } a { color:var(--blue); } .shell { width:min(1120px,calc(100% - 40px)); margin:0 auto; }
.site-header { background:var(--surface); border-bottom:1px solid var(--line); } .header-content { min-height:72px; display:flex; align-items:center; gap:28px; } .brand { display:inline-flex; align-items:center; gap:10px; color:var(--ink); font-weight:750; text-decoration:none; white-space:nowrap; } .brand-mark { width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:var(--blue); color:#fff; font-size:20px; font-weight:800; } .main-nav { display:flex; gap:20px; align-items:center; margin-left:auto; } .main-nav > a:not(.button) { color:var(--muted); text-decoration:none; font-weight:650; } .user-menu { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.9rem; } .user-menu form { margin:0; } .page-content { padding-top:42px; padding-bottom:56px; }
h1,h2,p { margin-top:0; } h1 { margin-bottom:8px; font-size:clamp(1.65rem,3vw,2.2rem); line-height:1.2; letter-spacing:-.025em; } h2 { font-size:1.1rem; line-height:1.3; } .page-heading,.ticket-header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:28px; } .page-heading p,.ticket-header p,.form-intro p,.login-intro p { color:var(--muted); } .eyebrow,.ticket-number { color:var(--blue); font-size:.78rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.button { display:inline-flex; justify-content:center; align-items:center; min-height:42px; padding:0 18px; border:1px solid transparent; border-radius:8px; font:inherit; font-weight:750; text-decoration:none; cursor:pointer; } .button-primary { background:var(--blue); color:#fff; } .button-primary:hover { background:var(--blue-dark); } .button-ghost { background:transparent; border-color:var(--line); color:var(--ink); } .button-ghost:hover { background:#f0f5fb; } .button-compact { min-height:36px; padding:0 12px; font-size:.9rem; } .button-full { width:100%; } .card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 8px 20px rgb(33 53 79 / 4%); }
.ticket-list { display:grid; gap:12px; } .ticket-card { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:20px 22px; color:inherit; background:var(--surface); border:1px solid var(--line); border-radius:11px; text-decoration:none; } .ticket-card:hover { border-color:#b7cce9; box-shadow:0 8px 24px rgb(31 76 128 / 8%); } .ticket-card h2 { margin:3px 0; font-size:1.05rem; } .ticket-card p { margin:0; color:var(--muted); font-size:.9rem; } .status { display:inline-flex; align-items:center; white-space:nowrap; padding:4px 9px; border-radius:999px; background:#edf2f7; color:#425466; font-size:.8rem; font-weight:750; } .status-open,.status-new { color:var(--blue-dark); background:var(--blue-soft); } .status-in_progress,.status-pending { color:var(--amber); background:#fff3d7; } .status-resolved,.status-closed { color:var(--green); background:#e5f7ee; }
.empty-state { max-width:600px; margin:56px auto; padding:42px 30px; text-align:center; } .empty-icon { margin:0 auto 14px; width:42px; height:42px; display:grid; place-items:center; border-radius:50%; color:var(--blue); background:var(--blue-soft); } .empty-state p { color:var(--muted); } .breadcrumb { display:flex; gap:8px; align-items:center; margin-bottom:22px; color:var(--muted); font-size:.9rem; } .breadcrumb a { text-decoration:none; }
.form-layout { display:grid; grid-template-columns:minmax(240px,.75fr) minmax(0,1.25fr); align-items:start; gap:52px; max-width:1040px; margin:20px auto; } .form-intro { padding-top:20px; } .ticket-form,.login-card,.reply-card { padding:28px; } .form-field { margin-bottom:22px; } .form-field > label { display:block; margin-bottom:7px; color:#27384f; font-size:.92rem; font-weight:750; } .form-field > label span { color:#c32d2d; } .form-control,input[type="file"],.login-card input { width:100%; border:1px solid #bdcad9; border-radius:8px; background:#fff; color:var(--ink); font:inherit; } .form-control,.login-card input { min-height:43px; padding:10px 12px; } textarea.form-control { min-height:130px; resize:vertical; } input[type="file"] { padding:9px; } .form-control:focus,.login-card input:focus,.rich-editor-content:focus { outline:3px solid rgb(23 105 224 / 17%); border-color:var(--blue); } .field-hint { margin:6px 0 0; color:var(--muted); font-size:.82rem; } .field-error,.form-errors { color:#b42318; font-size:.88rem; } .field-error { margin:6px 0 0; } .form-errors { margin-bottom:18px; padding:10px 12px; background:#fff0ef; border-radius:8px; } .form-actions { display:flex; justify-content:flex-end; gap:12px; padding-top:4px; }
.portal-enhanced .rich-text-input { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; opacity:0; pointer-events:none; } .rich-editor { border:1px solid #bdcad9; border-radius:8px; overflow:hidden; background:#fff; } .rich-editor:focus-within { border-color:var(--blue); box-shadow:0 0 0 3px rgb(23 105 224 / 17%); } .rich-editor-toolbar { display:flex; flex-wrap:wrap; gap:4px; padding:7px; background:#f6f9fc; border-bottom:1px solid var(--line); } .rich-editor-toolbar button { min-height:30px; padding:2px 8px; border:0; border-radius:5px; background:transparent; color:#3d5068; font:inherit; cursor:pointer; } .rich-editor-toolbar button:hover,.rich-editor-toolbar button:focus-visible { background:#e2ebf6; } .rich-editor-content { min-height:178px; padding:12px; outline:0; } .rich-editor-content:empty::before { content:"Descreva a sua solicitação com o máximo de detalhes possível."; color:#8795a8; }
.detail-grid { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:24px; } .detail-main { min-width:0; } .ticket-description,.message-card { padding:24px; } .rich-text { overflow-wrap:anywhere; } .rich-text > *:last-child { margin-bottom:0; } .rich-text a { overflow-wrap:anywhere; } .conversation { margin-top:30px; } .conversation > h2 { margin-bottom:14px; } .message-card { margin-bottom:12px; } .message-card p { margin-bottom:0; overflow-wrap:anywhere; } .message-meta { display:flex; justify-content:space-between; gap:16px; margin-bottom:12px; color:var(--muted); font-size:.87rem; } .message-meta strong { color:var(--ink); } .detail-sidebar { display:grid; align-content:start; gap:16px; } .attachments-card { padding:20px; } .attachment-list { display:grid; gap:8px; padding:0; margin:0; list-style:none; } .attachment-list li { display:flex; flex-direction:column; gap:1px; padding-left:13px; border-left:2px solid #d4e4f9; } .attachment-list a { font-size:.9rem; overflow-wrap:anywhere; } .attachment-list span { color:var(--muted); font-size:.78rem; } .empty-inline { padding:20px; color:var(--muted); background:#fff; border:1px dashed #cbd7e5; border-radius:10px; }
.login-layout { display:grid; grid-template-columns:1fr minmax(300px,410px); align-items:center; gap:82px; min-height:calc(100vh - 180px); max-width:930px; margin:0 auto; } .login-intro h1 { max-width:510px; font-size:clamp(2rem,4vw,3rem); } .login-card h2 { margin-bottom:22px; font-size:1.35rem; }
@media (max-width:760px) { .shell { width:min(100% - 28px,1120px); } .header-content { min-height:auto; flex-wrap:wrap; gap:10px 16px; padding:13px 0; } .main-nav { order:3; width:100%; margin:0; justify-content:space-between; } .user-menu { margin-left:auto; } .user-menu > span { display:none; } .page-content { padding-top:28px; } .page-heading,.ticket-header { align-items:stretch; flex-direction:column; gap:14px; } .page-heading .button { width:100%; } .ticket-header .status { align-self:flex-start; } .ticket-card { align-items:flex-start; flex-direction:column; gap:10px; padding:17px; } .form-layout,.detail-grid,.login-layout { grid-template-columns:1fr; gap:22px; } .form-layout { margin-top:0; } .form-intro { padding-top:0; } .ticket-form,.login-card,.reply-card,.ticket-description,.message-card { padding:20px; } .login-layout { min-height:auto; padding-top:32px; } }
@media (max-width:420px) { .brand { font-size:.92rem; } .main-nav { gap:10px; } .main-nav > a:not(.button) { font-size:.88rem; } .button { padding:0 14px; } .form-actions { justify-content:stretch; flex-direction:column-reverse; } .form-actions .button { width:100%; } }
.main-nav > a.area-ativa:not(.button) { color:var(--ink); box-shadow:0 2px 0 var(--blue); }
.areas-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.area-card { display:block; padding:26px; color:inherit; text-decoration:none; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.area-card:hover { border-color:#b7cce9; box-shadow:0 8px 24px rgb(31 76 128 / 8%); }
.area-card h2 { margin:0 0 6px; font-size:1.25rem; } .area-card p { margin:0; color:var(--muted); font-size:.92rem; }
.filtros { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; margin-bottom:20px; }
.filtros label { display:block; font-size:.78rem; font-weight:700; color:var(--muted); margin-bottom:3px; }
.filtros input[type=text], .filtros select { min-height:38px; padding:0 10px; border:1px solid #bdcad9; border-radius:8px; font:inherit; background:#fff; }
.filtros .busca { flex:1 1 220px; } .filtros .busca input { width:100%; }
.tabela-wrap { overflow-x:auto; } .tabela { width:100%; border-collapse:collapse; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.tabela th, .tabela td { padding:10px 14px; text-align:left; border-bottom:1px solid var(--line); font-size:.92rem; vertical-align:top; }
.tabela th { color:var(--muted); font-size:.76rem; text-transform:uppercase; letter-spacing:.05em; }
.tabela td.num { white-space:nowrap; } .tabela .urgente { color:#b42318; font-weight:750; }
.nota-interna { border-left:4px solid var(--amber); }
.resumo-cards { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:22px; }
.resumo-cards a { padding:12px 20px; border:1px solid var(--line); border-radius:10px; background:var(--surface); text-decoration:none; color:inherit; text-align:center; min-width:120px; }
.resumo-cards a.ativo { border-color:var(--blue); } .resumo-cards .n { display:block; font-size:1.6rem; font-weight:750; color:var(--blue); line-height:1.2; } .resumo-cards .l { font-size:.74rem; text-transform:uppercase; color:var(--muted); }

/* Subnav */
.subnav { display:flex; gap:4px; padding-bottom:0; overflow-x:auto; }
.subnav a { padding:10px 14px; color:var(--muted); text-decoration:none; font-weight:650; border-bottom:3px solid transparent; white-space:nowrap; }
.subnav a:hover { color:var(--ink); }
.subnav a.ativo { color:var(--blue); border-bottom-color:var(--blue); }

/* Dashboard Styles */
.dashboard-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:24px; }
.dashboard-kpi { display:block; padding:18px 20px; text-decoration:none; color:inherit; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); transition:border-color .15s,box-shadow .15s; }
.dashboard-kpi:hover { border-color:#b7cce9; box-shadow:0 6px 18px rgb(31 76 128 / 7%); }
.dashboard-kpi .kpi-label { font-size:.74rem; text-transform:uppercase; letter-spacing:.05em; font-weight:700; color:var(--muted); }
.dashboard-kpi .kpi-num { font-size:2rem; font-weight:800; line-height:1.15; margin:4px 0 2px; color:var(--blue); }
.dashboard-kpi .kpi-sub { font-size:.8rem; color:var(--muted); }
.dashboard-kpi.kpi-alerta .kpi-num { color:#dc2626; }
.dashboard-kpi.kpi-sucesso .kpi-num { color:#16a34a; }
.dashboard-kpi.kpi-amber .kpi-num { color:#d97706; }
.dashboard-kpi.kpi-purple .kpi-num { color:#7c3aed; }

.dashboard-section { margin-bottom:28px; }
.dashboard-section-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:12px; }
.dashboard-section-head h2 { margin:0; font-size:1.15rem; font-weight:750; }
.dashboard-section-head .sub { font-size:.84rem; color:var(--muted); }
.dashboard-charts-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:20px; margin-bottom:24px; }

/* Barra de progresso / estatística */
.stat-bar-container { margin-bottom:12px; }
.stat-bar-label { display:flex; justify-content:space-between; font-size:.84rem; margin-bottom:4px; }
.stat-bar-bg { width:100%; height:8px; background:#e2e8f0; border-radius:999px; overflow:hidden; }
.stat-bar-fill { height:100%; border-radius:999px; transition:width .3s; }

/* Alertas de mensagens */
.alerta { padding:10px 16px; border-radius:8px; margin-bottom:16px; font-size:.9rem; }
.alerta-success { background:#e6f9ed; border:1px solid #a3e6b8; color:#146c36; }
.alerta-error { background:#fee2e2; border:1px solid #fca5a5; color:#991b1b; }
.alerta-warning { background:#fef3c7; border:1px solid #fde68a; color:#92400e; }
.alerta-info { background:#eaf3ff; border:1px solid #bfdbfe; color:#1e40af; }

/* Botões adicionais */
.button-danger { background:#dc2626; color:#fff; }
.button-danger:hover { background:#b91c1c; }
.button-warning { background:#f59e0b; color:#fff; }
.button-success { background:#16a34a; color:#fff; }
.badge { display:inline-block; padding:3px 8px; border-radius:6px; font-size:.76rem; font-weight:700; }
.badge-urgent { background:#fee2e2; color:#b91c1c; }
.badge-high { background:#ffedd5; color:#c2410c; }
.badge-normal { background:#e0f2fe; color:#0369a1; }
.badge-low { background:#dcfce7; color:#15803d; }

/* Linha do tempo de mensagens e distinção Cliente vs Equipe */
.message-card { position:relative; border-left:4px solid #cbd5e1; }
.message-card.message-inbound { border-left-color:#0284c7; background:#ffffff; }
.message-card.message-outbound { border-left-color:#16a34a; background:#f8fdf9; }
.message-card.nota-interna { border-left-color:var(--amber); background:#fffdf5; }
.message-step { display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:22px; padding:0 7px; border-radius:999px; background:#f1f5f9; color:#334155; font-size:.75rem; font-weight:800; margin-right:6px; }
.badge-role-equipe { background:#dcfce7; color:#166534; }
.badge-role-cliente { background:#e0f2fe; color:#0369a1; }

/* Tabelas e citações dentro do texto rico de e-mails */
.rich-text table { width:100%; border-collapse:collapse; margin:12px 0; font-size:.9rem; background:#fff; }
.rich-text th, .rich-text td { border:1px solid #cbd5e1; padding:8px 12px; text-align:left; vertical-align:top; }
.rich-text th { background:#f1f5f9; font-weight:700; color:var(--ink); }
.rich-text blockquote { margin:10px 0; padding:8px 14px; border-left:3px solid #cbd5e1; color:var(--muted); background:#f8fafc; border-radius:0 6px 6px 0; }
details.quoted-email { margin-top:12px; border:1px dashed #cbd5e1; border-radius:8px; background:#f8fafc; padding:6px 12px; }
details.quoted-email > summary { cursor:pointer; font-size:.8rem; font-weight:650; color:var(--muted); user-select:none; }
details.quoted-email > summary:hover { color:var(--blue); }
details.quoted-email .quoted-email-body { margin-top:8px; padding-top:8px; border-top:1px solid #e2e8f0; font-size:.86rem; color:#475569; }

/* Indicadores de Prazo / SLA */
.sla-badge { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px; font-size:.75rem; font-weight:750; white-space:nowrap; }
.sla-overdue { background:#fee2e2; color:#b91c1c; }
.sla-today { background:#ffedd5; color:#c2410c; }
.sla-paused { background:#f1f5f9; color:#475569; }
.sla-ontime { background:#dcfce7; color:#15803d; }


