@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --navy-950: #0b1533;
    --navy-900: #111d42;
    --navy-800: #172554;
    --blue-700: #2452a4;
    --blue-600: #2d63c8;
    --blue-500: #3b73df;
    --blue-100: #eaf1ff;
    --violet: #6264a7;
    --green: #16845b;
    --green-bg: #e9f8f1;
    --red: #c83f4f;
    --red-bg: #fff0f2;
    --amber: #b46a0b;
    --amber-bg: #fff7e7;
    --ink: #172033;
    --text: #465066;
    --muted: #7b8496;
    --line: #e4e9f1;
    --surface: #fff;
    --canvas: #f4f6fa;
    --shadow: 0 10px 35px rgba(23, 37, 84, .07);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: "DM Sans", "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a { color: var(--blue-600); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { font-family: "Manrope", sans-serif; }

/* ---------- Estrutura ---------- */
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 260px; display: flex; flex-direction: column; padding: 24px 18px 18px; color: #fff; background: linear-gradient(165deg, #172554 0%, #101a3b 58%, #0b1533 100%); }
.sidebar::before { content: ""; position: absolute; width: 220px; height: 220px; right: -120px; top: 80px; border-radius: 50%; background: rgba(77, 112, 207, .12); pointer-events: none; }
.sidebar-brand { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 8px 24px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { flex: 0 0 auto; display: inline-grid; place-items: center; width: 42px; height: 42px; color: #fff; font: 800 14px "Manrope", sans-serif; letter-spacing: -.4px; border-radius: 12px; background: linear-gradient(135deg, #4d7ce2, #7472be); box-shadow: 0 8px 18px rgba(47, 86, 177, .3); }
.sidebar-logo-wrap { width: 44px; height: 44px; padding: 5px; display: grid; place-items: center; border-radius: 11px; background: #fff; }
.sidebar-logo-wrap img { max-height: 34px; width: auto; }
.sidebar-brand-copy { min-width: 0; display: flex; flex-direction: column; }
.sidebar-brand-copy strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14px "Manrope", sans-serif; }
.sidebar-brand-copy small { margin-top: 2px; color: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .9px; text-transform: uppercase; }
.sidebar-nav { position: relative; display: flex; flex-direction: column; gap: 5px; padding-top: 25px; }
.nav-heading { padding: 0 12px 9px; color: rgba(255,255,255,.38); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 13px; color: rgba(255,255,255,.69); font-size: 14px; font-weight: 500; border-radius: 10px; transition: .2s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.is-active { color: #fff; background: linear-gradient(90deg, rgba(68, 111, 210, .4), rgba(82, 89, 164, .22)); box-shadow: inset 3px 0 #6b91e8; }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; }
.nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-bottom { position: relative; margin-top: auto; display: grid; gap: 12px; }
.sidebar-help { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: rgba(255,255,255,.045); }
.sidebar-help div { display: flex; flex-direction: column; }
.sidebar-help strong { font-size: 11px; }
.sidebar-help small { margin-top: 2px; color: rgba(255,255,255,.45); font-size: 10px; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #e8ad46; box-shadow: 0 0 0 4px rgba(232,173,70,.12); }
.status-dot.is-online { background: #4bd19a; box-shadow: 0 0 0 4px rgba(75,209,154,.12); }
.logout-button { width: 100%; padding: 9px; color: rgba(255,255,255,.55); border: 0; background: none; cursor: pointer; font-size: 12px; }
.logout-button:hover { color: #fff; }

.app-main { min-width: 0; width: calc(100% - 260px); margin-left: 260px; }
.topbar { position: sticky; top: 0; z-index: 30; height: 76px; display: flex; align-items: center; padding: 0 34px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-title { display: flex; flex-direction: column; }
.topbar-title span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; }
.topbar-title strong { margin-top: 2px; font: 700 15px "Manrope", sans-serif; }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.avatar, .mini-avatar, .contact-avatar, .profile-avatar { display: grid; place-items: center; color: var(--blue-700); background: var(--blue-100); border-radius: 10px; font-weight: 700; }
.avatar { width: 38px; height: 38px; font-size: 12px; }
.user-copy { display: flex; flex-direction: column; }
.user-copy strong { font-size: 12px; }
.user-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.mobile-menu { display: none; padding: 5px; border: 0; background: none; cursor: pointer; }
.mobile-menu span { display: block; width: 22px; height: 2px; margin: 4px; background: var(--ink); }
.content { max-width: 1500px; margin: 0 auto; padding: 32px 34px 50px; }

/* ---------- Cabecalho de pagina ---------- */
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { margin: 4px 0 5px; font: 800 28px/1.2 "Manrope", sans-serif; letter-spacing: -.7px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.eyebrow--blue { color: var(--blue-600); }
.heading-actions { display: flex; gap: 10px; }
.back-link { display: inline-block; margin-bottom: 7px; color: var(--blue-600); font-size: 12px; font-weight: 700; }

/* ---------- Botoes ---------- */
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { color: #fff; background: linear-gradient(135deg, var(--blue-600), #3e58a9); box-shadow: 0 7px 18px rgba(45,99,200,.2); }
.btn--primary:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(45,99,200,.3); }
.btn--secondary { color: #34415a; background: #fff; border-color: #d9e0eb; }
.btn--secondary:hover { background: #f8faff; border-color: #c3ccda; }
.btn--white { color: var(--blue-700); background: #fff; }
.btn--danger-text { color: var(--red); background: transparent; }
.btn--block { width: 100%; }
.btn--small { min-height: 35px; padding: 0 13px; font-size: 11px; }
.btn--large { min-height: 50px; }
.btn-icon { font-size: 18px; font-weight: 400; }
.text-link { color: var(--blue-600); font-size: 12px; font-weight: 700; }

/* ---------- Alertas ---------- */
.alert { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 13px 16px; border: 1px solid; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.alert button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 20px; line-height: 1; }
.alert ul { margin: 5px 0 0; padding-left: 20px; }
.alert--success { color: #126344; background: var(--green-bg); border-color: #bde8d5; }
.alert--error { color: #9d2d3a; background: var(--red-bg); border-color: #f1c2c8; }
.alert--warning { color: #8a570e; background: var(--amber-bg); border-color: #eed59f; }
.alert--warning a, .alert--error a { color: inherit; font-weight: 700; text-decoration: underline; }

/* ---------- Paineis ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font: 700 16px "Manrope", sans-serif; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 24px; }
.panel-footer { display: flex; justify-content: flex-end; padding: 18px 24px; border-top: 1px solid var(--line); }
.setup-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 23px; padding: 17px 19px; color: #fff; background: linear-gradient(110deg, #234e9c, #4c5195); border-radius: 12px; box-shadow: 0 10px 25px rgba(36,82,164,.18); }
.setup-banner-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.1); font-weight: 700; }
.setup-banner div:nth-child(2) { flex: 1; }
.setup-banner strong { font-size: 13px; }
.setup-banner p { margin: 3px 0 0; color: rgba(255,255,255,.7); font-size: 11px; }

/* ---------- Dashboard ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 25px rgba(23,37,84,.045); }
.stat-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; font-size: 18px; font-weight: 700; }
.stat-icon--blue { color: var(--blue-600); background: var(--blue-100); }
.stat-icon--violet { color: #6664a8; background: #efeffa; }
.stat-icon--green { color: var(--green); background: var(--green-bg); }
.stat-icon--amber { color: var(--amber); background: var(--amber-bg); }
.stat-card div { min-width: 0; display: flex; flex-direction: column; }
.stat-card small { color: var(--muted); font-size: 10px; font-weight: 600; }
.stat-card strong { margin: 3px 0 1px; font: 800 23px "Manrope", sans-serif; letter-spacing: -.6px; }
.stat-card span:last-child { color: #9aa2b1; font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 20px; }
.recent-list { padding: 4px 22px 13px; }
.recent-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; color: var(--ink); border-bottom: 1px solid #edf0f5; }
.recent-item:last-child { border-bottom: 0; }
.recent-date { width: 42px; height: 45px; flex: 0 0 auto; display: grid; place-content: center; text-align: center; background: #f1f5fc; border-radius: 9px; }
.recent-date b { font: 700 15px "Manrope", sans-serif; }
.recent-date small { color: var(--blue-600); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.recent-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.recent-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.recent-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.quick-links { padding: 8px 18px 18px; }
.quick-links a { display: flex; align-items: center; gap: 11px; padding: 13px 5px; color: var(--ink); border-bottom: 1px solid #edf0f5; }
.quick-links a:last-child { border-bottom: 0; }
.quick-links a > b { margin-left: auto; color: #a1a9b7; font-size: 20px; font-weight: 400; }
.quick-links div { display: flex; flex-direction: column; }
.quick-links strong { font-size: 11px; }
.quick-links small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); border-radius: 9px; }
.empty-state { display: grid; justify-items: center; padding: 45px 20px; text-align: center; }
.empty-state > span { width: 48px; height: 48px; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); border-radius: 50%; font-size: 20px; }
.empty-state h3 { margin: 13px 0 4px; font-size: 14px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: 11px; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; color: #39445a; font-size: 12px; font-weight: 600; }
.field > span:first-child b { color: var(--red); }
.field input, .field textarea, .field select, .search-form input, .smtp-test input { width: 100%; color: var(--ink); background: #fff; border: 1px solid #dbe1eb; border-radius: 8px; outline: none; transition: border .15s, box-shadow .15s; }
.field input, .field select, .search-form input, .smtp-test input { height: 42px; padding: 0 12px; }
.field textarea { min-height: 85px; padding: 11px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus, .search-form input:focus, .smtp-test input:focus { border-color: #7ba0e9; box-shadow: 0 0 0 3px rgba(59,115,223,.1); }
.field input::placeholder, .field textarea::placeholder { color: #adb4c0; }
.field small { color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.4; }
.field .field-error { color: var(--red); font-size: 10px; font-weight: 600; }
.field input.is-invalid, .field textarea.is-invalid { border-color: #e4a1aa; }
.form-grid { display: grid; gap: 15px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 66px; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); color: var(--blue-600); border: 0; background: none; font-size: 10px; font-weight: 700; cursor: pointer; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon input { padding-left: 45px; }
.teams-icon { position: absolute; left: 11px; z-index: 1; width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: #6264a7; border-radius: 5px; font-size: 11px; font-weight: 800; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; cursor: pointer; }
.check-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue-600); }
.check-row span { flex: 1; display: flex; flex-direction: column; }
.check-row strong { font-size: 11px; }
.check-row small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.check-row--compact { padding: 3px 0 18px; }
.align-end { padding-top: 25px; }
.form-divider { margin: 6px 0 22px; border: 0; border-top: 1px solid var(--line); }

/* ---------- Novo disparo ---------- */
.dispatch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.dispatch-main { display: grid; gap: 18px; }
.section-header { display: flex; align-items: center; gap: 12px; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.section-header h2 { margin: 0; font: 700 14px "Manrope", sans-serif; }
.section-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.step-number { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; color: var(--blue-700); background: var(--blue-100); border-radius: 8px; font-size: 11px; font-weight: 800; }
.section-body { padding: 21px; }
.dispatch-aside { position: sticky; top: 96px; display: grid; gap: 10px; }
.summary-card { padding: 19px; }
.summary-card h3 { margin: 0 0 15px; font: 700 13px "Manrope", sans-serif; }
.summary-preview { display: grid; justify-items: center; gap: 9px; margin-bottom: 14px; padding: 20px; background: #f2f5fa; border: 1px dashed #cfd7e4; border-radius: 9px; }
.summary-logo { width: 32px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--navy-800); border-radius: 5px; font-size: 7px; font-weight: 800; }
.summary-line { width: 70%; height: 5px; background: #d7deea; border-radius: 10px; }
.summary-line--title { width: 86%; height: 7px; background: #b9c5d8; }
.summary-button { margin-top: 4px; padding: 7px 14px; color: #fff; background: var(--violet); border-radius: 5px; font-size: 7px; font-weight: 700; }
.security-note { display: flex; gap: 8px; margin-top: 8px; padding: 10px; color: #536078; background: #f8fafc; border-radius: 8px; }
.security-note span { color: var(--green); font-weight: 800; }
.security-note p { margin: 0; font-size: 9px; line-height: 1.5; }
.contact-picker { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.contact-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; }
.contact-picker-head input { width: 170px; height: 30px; padding: 0 9px; border: 1px solid #dbe1eb; border-radius: 6px; outline: none; font-size: 10px; }
.contact-options { max-height: 150px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-y: auto; }
.contact-options label { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid #f0f2f6; cursor: pointer; }
.contact-options label:hover { background: #fafbfe; }
.contact-options input { accent-color: var(--blue-600); }
.contact-options label > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.contact-options strong, .contact-options small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-options strong { font-size: 9px; }
.contact-options small { color: var(--muted); font-size: 8px; }
.mini-avatar { width: 26px; height: 26px; flex: 0 0 auto; font-size: 8px; }

/* ---------- Editor de texto ---------- */
.rich-editor { overflow: hidden; border: 1px solid #dbe1eb; border-radius: 9px; }
.rich-editor:focus-within { border-color: #7ba0e9; box-shadow: 0 0 0 3px rgba(59,115,223,.1); }
.editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 7px 9px; background: #f6f8fb; border-bottom: 1px solid #dfe4ec; }
.editor-toolbar button, .editor-toolbar select { min-width: 29px; height: 29px; padding: 0 7px; color: #465066; background: transparent; border: 1px solid transparent; border-radius: 5px; font-size: 11px; cursor: pointer; }
.editor-toolbar button:hover, .editor-toolbar button.is-active { color: var(--blue-700); background: #fff; border-color: #d6deea; }
.editor-toolbar select { width: 105px; background: #fff; border-color: #d6deea; font-size: 10px; }
.editor-toolbar input[type="color"] { width: 29px; height: 29px; padding: 2px; border: 1px solid #d6deea; border-radius: 5px; background: #fff; cursor: pointer; }
.toolbar-divider { width: 1px; height: 19px; margin: 0 4px; background: #d8dee8; }
.editor-content { min-height: 240px; max-height: 520px; overflow-y: auto; padding: 17px; outline: none; color: #384358; font-size: 13px; line-height: 1.7; }
.editor-content p { margin: 0 0 12px; }
.editor-content h2, .editor-content h3 { color: var(--ink); }
.editor-content blockquote { margin: 12px 0; padding: 9px 13px; background: #f5f7fb; border-left: 3px solid var(--violet); }
.editor-content:empty::before { content: attr(data-placeholder); color: #adb4c0; }
.rich-editor--small .editor-content { min-height: 120px; }

/* ---------- Configuracoes ---------- */
.settings-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { position: sticky; top: 96px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.settings-nav button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px; color: #596478; text-align: left; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.settings-nav button:hover, .settings-nav button.is-active { color: var(--blue-700); background: var(--blue-100); }
.settings-nav button > span { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; font-size: 14px; }
.settings-nav div { display: flex; flex-direction: column; }
.settings-nav strong { font-size: 10px; }
.settings-nav small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.settings-content { min-width: 0; display: grid; gap: 15px; }
.settings-section { display: none; }
.settings-section.is-active { display: block; }
.settings-actions { position: sticky; z-index: 4; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 16px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 10px 30px rgba(23,37,84,.12); backdrop-filter: blur(12px); }
.settings-actions span { color: var(--muted); font-size: 10px; }
.logo-upload-row { display: flex; align-items: center; gap: 17px; margin-bottom: 24px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.logo-preview {
    width: 108px;
    height: 76px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    /* Xadrez deixa a transparencia do PNG evidente. */
    background-color: #f4f6f9;
    background-image:
        linear-gradient(45deg, #e4e9f1 25%, transparent 25%),
        linear-gradient(-45deg, #e4e9f1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e4e9f1 75%),
        linear-gradient(-45deg, transparent 75%, #e4e9f1 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    border: 1px dashed #c7d0dd;
    border-radius: 9px;
}
.logo-preview img { max-width: 90px; max-height: 55px; }
.logo-preview span { color: var(--blue-700); font: 800 22px "Manrope", sans-serif; background: #f4f6f9; padding: 4px 8px; border-radius: 6px; }
.logo-upload-copy { flex: 1; }
.logo-upload-copy strong { font-size: 12px; }
.logo-upload-copy p { max-width: 500px; margin: 4px 0 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.color-field > span:last-child { display: grid; grid-template-columns: 55px 1fr; }
.color-field input[type="color"] { padding: 4px; border-radius: 8px 0 0 8px; }
.color-field input[type="text"] { border-left: 0; border-radius: 0 8px 8px 0; text-transform: uppercase; }
.smtp-grid { grid-template-columns: minmax(200px, 1fr) 100px 150px; }
.connection-pill { padding: 6px 10px; flex: 0 0 auto; color: var(--amber); background: var(--amber-bg); border-radius: 20px; font-size: 9px; font-weight: 700; }
.connection-pill.is-ready { color: var(--green); background: var(--green-bg); }
.info-box { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px; color: #526079; background: #f2f6fd; border: 1px solid #dae5f6; border-radius: 8px; }
.info-box > span { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--blue-500); border-radius: 50%; font-size: 10px; font-weight: 700; }
.info-box p { margin: 1px 0 0; font-size: 9px; line-height: 1.5; }
.smtp-test { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 5px; padding: 15px; background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; }
.smtp-test strong { font-size: 11px; }
.smtp-test p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.smtp-test > div:last-child { display: flex; gap: 7px; }
.smtp-test input { width: 220px; }

/* ---------- Tabelas e listas ---------- */
.panel-header--toolbar { min-height: 68px; }
.search-form { display: flex; align-items: center; gap: 7px; }
.search-form input { width: 280px; height: 36px; font-size: 11px; }
.result-count { color: var(--muted); font-size: 10px; }
.toolbar-actions { display: flex; align-items: center; gap: 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 18px; color: #7c8596; text-align: left; background: #f8fafc; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 18px; color: #4b566a; border-bottom: 1px solid #edf0f5; font-size: 10px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td > strong, .data-table td > small { display: block; }
.data-table td > strong { color: var(--ink); font-size: 11px; }
.data-table td > small { max-width: 320px; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; border-radius: 20px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.badge--concluido, .badge--enviado { color: var(--green); background: var(--green-bg); }
.badge--falhou { color: var(--red); background: var(--red-bg); }
.badge--parcial, .badge--pendente, .badge--enviando { color: var(--amber); background: var(--amber-bg); }
.badge--large { padding: 8px 14px; font-size: 10px; }
.delivery-result { display: flex; flex-direction: column; gap: 2px; }
.delivery-result b { font-size: 9px; font-weight: 600; }
.is-success, .text-success { color: var(--green) !important; }
.is-error, .text-error { color: var(--red) !important; }
.icon-link { width: 29px; height: 29px; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); border-radius: 7px; font-size: 20px; }
.error-detail { color: var(--red) !important; white-space: normal !important; }
.detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.detail-stats article { padding: 16px 19px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.detail-stats small { display: block; color: var(--muted); font-size: 9px; }
.detail-stats strong { display: block; margin-top: 4px; font: 800 20px "Manrope", sans-serif; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.meeting-detail-card dl { margin: 0; padding: 10px 20px 18px; }
.meeting-detail-card dl div { padding: 10px 0; border-bottom: 1px solid #edf0f5; }
.meeting-detail-card dt { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .5px; }
.meeting-detail-card dd { margin: 3px 0 0; font-size: 10px; font-weight: 600; line-height: 1.4; word-break: break-word; }
.meeting-detail-card > .btn { width: calc(100% - 40px); margin: 0 20px 20px; }
.pagination-wrap { padding: 14px 20px; border-top: 1px solid var(--line); }
.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.pagination-pages { display: flex; flex-wrap: wrap; gap: 5px; }
.pagination-link { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; color: #4b566a; background: #fff; border: 1px solid #dbe1eb; border-radius: 7px; font-size: 11px; font-weight: 600; }
.pagination-link:hover { color: var(--blue-700); background: #f8faff; border-color: #b9c9e6; }
.pagination-link.is-current { color: #fff; background: var(--blue-600); border-color: var(--blue-600); }
.pagination-link.is-disabled { color: #b3bac6; background: #f7f9fc; pointer-events: none; }
.pagination-summary { margin-left: auto; color: var(--muted); font-size: 10px; }

/* ---------- Contatos ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.contact-card { position: relative; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 17px; background: #fff; }
.contact-avatar { width: 40px; height: 40px; flex: 0 0 auto; font-size: 10px; }
.contact-card > div { min-width: 0; display: flex; flex-direction: column; }
.contact-card strong, .contact-card a, .contact-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-card strong { font-size: 11px; }
.contact-card a { margin-top: 3px; font-size: 9px; }
.contact-card small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.delete-button { position: absolute; top: 8px; right: 8px; width: 25px; height: 25px; color: #a4acb9; border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.delete-button:hover { color: var(--red); }
.file-drop { display: grid; justify-items: center; padding: 27px; text-align: center; border: 1px dashed #bfc9d8; border-radius: 9px; cursor: pointer; }
.file-drop input { max-width: 100%; margin-bottom: 12px; font-size: 10px; }
.file-drop span { font-size: 11px; font-weight: 700; }
.file-drop small { margin-top: 3px; color: var(--muted); font-size: 9px; }

/* ---------- Perfil ---------- */
.profile-layout { display: grid; grid-template-columns: 280px minmax(0, 650px); gap: 20px; }
.profile-card { display: flex; flex-direction: column; align-items: center; padding: 28px; text-align: center; }
.profile-avatar { width: 74px; height: 74px; margin-bottom: 13px; border-radius: 20px; font: 800 20px "Manrope", sans-serif; }
.profile-card h2 { margin: 0; font: 700 16px "Manrope", sans-serif; }
.profile-card > p { margin: 4px 0 12px; color: var(--muted); font-size: 10px; }
.profile-card dl { width: 100%; margin: 24px 0 0; text-align: left; }
.profile-card dl div { padding: 10px 0; border-top: 1px solid var(--line); }
.profile-card dt { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .5px; }
.profile-card dd { margin: 3px 0 0; font-size: 10px; font-weight: 600; }

/* ---------- Modais ---------- */
.modal { position: fixed; z-index: 100; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 16, 39, .6); backdrop-filter: blur(4px); }
.modal.is-open { display: flex; }
.modal-dialog { width: min(470px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 13px; box-shadow: 0 25px 80px rgba(5,12,31,.3); }
.modal-dialog > header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.modal-dialog > header div { display: flex; flex-direction: column; }
.modal-dialog > header strong { font: 700 14px "Manrope", sans-serif; }
.modal-dialog > header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.modal-dialog > header button { width: 30px; height: 30px; flex: 0 0 auto; color: #778195; border: 0; background: #f2f4f7; border-radius: 7px; cursor: pointer; font-size: 20px; }
.modal-body { padding: 20px; }
.modal-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.modal-dialog--preview { width: min(1000px, 100%); height: calc(100vh - 50px); display: flex; flex-direction: column; }
.preview-frame-wrap { flex: 1; padding: 14px; overflow: hidden; background: #e8edf4; }
.preview-frame-wrap iframe { width: 100%; height: 100%; background: #fff; border: 0; border-radius: 7px; }

/* ---------- Autenticacao ---------- */
.auth-page { min-height: 100vh; background: #fff; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.05fr) minmax(440px, .95fr); }
.auth-visual { position: relative; overflow: hidden; padding: 55px 65px; color: #fff; background: linear-gradient(145deg, #101d44 0%, #1d3979 60%, #565aa1 125%); }
.auth-visual::before, .auth-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
.auth-visual::before { width: 540px; height: 540px; right: -230px; top: -180px; }
.auth-visual::after { width: 340px; height: 340px; left: -170px; bottom: -120px; }
.auth-visual-content { position: relative; z-index: 1; min-height: calc(100vh - 110px); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; font: 700 15px "Manrope", sans-serif; }
.auth-copy { max-width: 560px; margin: auto 0; }
.auth-copy .eyebrow { color: #9db7ef; }
.auth-copy h1 { margin: 13px 0 18px; font: 800 clamp(32px, 4vw, 52px)/1.13 "Manrope", sans-serif; letter-spacing: -1.7px; }
.auth-copy p { max-width: 510px; margin: 0; color: rgba(255,255,255,.65); font-size: 15px; line-height: 1.75; }
.auth-features { display: flex; flex-wrap: wrap; gap: 20px; color: rgba(255,255,255,.55); font-size: 10px; }
.auth-features span::before { content: "✓"; margin-right: 6px; color: #7bd6b1; font-weight: 700; }
.auth-form-wrap { display: grid; place-items: center; padding: 50px; background: #fff; }
.auth-card { width: min(400px, 100%); }
.auth-card h2 { margin: 8px 0 5px; font: 800 26px "Manrope", sans-serif; letter-spacing: -.6px; }
.auth-card > .muted { margin: 0 0 26px; color: var(--muted); font-size: 12px; }
.auth-card .btn { margin-top: 5px; min-height: 47px; }
.auth-mobile-brand { display: none; }
.setup-steps { display: flex; flex-wrap: wrap; gap: 18px; color: rgba(255,255,255,.45); font-size: 10px; }
.setup-steps span { display: flex; align-items: center; gap: 6px; }
.setup-steps b { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; font-size: 9px; }
.setup-steps .is-active { color: #fff; }
.setup-steps .is-active b { background: #fff; color: var(--blue-700); }
.sidebar-backdrop { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dispatch-layout { grid-template-columns: minmax(0, 1fr) 265px; }
    .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    body.menu-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(8,16,39,.5); }
    body.menu-open .sidebar-backdrop { display: block; }
    .app-main { width: 100%; margin-left: 0; }
    .mobile-menu { display: block; margin-right: 14px; }
    .content { padding: 25px 22px 40px; }
    .dispatch-layout, .detail-grid { grid-template-columns: 1fr; }
    .dispatch-aside { position: static; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; overflow-x: auto; }
    .settings-nav button { min-width: 150px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 35px; font: 700 15px "Manrope", sans-serif; }
}

@media (max-width: 650px) {
    .topbar { height: 66px; padding: 0 17px; }
    .topbar-title span, .user-copy { display: none; }
    .content { padding: 20px 14px 35px; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
    .page-heading h1 { font-size: 23px; }
    .heading-actions { width: 100%; }
    .heading-actions .btn { flex: 1; }
    .stats-grid, .detail-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-icon { width: 36px; height: 36px; }
    .stat-card strong { font-size: 18px; }
    .setup-banner { align-items: flex-start; flex-wrap: wrap; }
    .setup-banner .btn { width: 100%; }
    .form-grid--2, .form-grid--3, .smtp-grid { grid-template-columns: 1fr; gap: 0; }
    .contact-options, .contact-grid { grid-template-columns: 1fr; }
    .contact-picker-head { align-items: flex-start; flex-direction: column; }
    .contact-picker-head input { width: 100%; }
    .panel-header--toolbar { align-items: flex-start; flex-direction: column; }
    .search-form { width: 100%; flex-wrap: wrap; }
    .search-form input { width: 100%; }
    .toolbar-actions { width: 100%; justify-content: space-between; }
    .smtp-test { align-items: stretch; flex-direction: column; }
    .smtp-test > div:last-child { flex-direction: column; }
    .smtp-test input { width: 100%; }
    .settings-actions span { display: none; }
    .settings-actions .btn { width: 100%; }
    .profile-layout { grid-template-columns: 1fr; }
    .logo-upload-row { align-items: flex-start; }
    .auth-form-wrap { padding: 32px 22px; }
    .modal { padding: 8px; }
    .modal-dialog--preview { height: calc(100vh - 16px); }
}
