/* ═══ Suporte ════════════════════════════════════════════════════════════════
   Central de tickets do site. Lista à esquerda, conversa ou formulário à direita; em ecrãs
   estreitos mostra um painel de cada vez. Mesmo vocabulário visual do resto do site. */
:root { --sp-acc: #00e599; --sp-acc-2: #2af0b0; --sp-ink: #f3f5f7; --sp-muted: #9aa3ad; --sp-panel: #10151b; --sp-panel-2: #141a21; --sp-line: rgba(255,255,255,.08); --sp-gold: #e6c27a; --sp-warn: #ffb84d; --sp-bad: #ff7b7b; }
body.sp-page { min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--sp-ink); background: #080b10; font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif; }
body.sp-page::before { background: radial-gradient(60vw 40vw at 85% -5%, rgba(0,229,153,.07), transparent 65%), radial-gradient(50vw 35vw at 0% 30%, rgba(90,120,160,.05), transparent 70%) !important; }
.sp-page *, .sp-page *::before, .sp-page *::after { box-sizing: border-box; }
.sp-page [hidden] { display: none !important; }
.sp-main { padding: 44px 28px 80px; }
.sp-shell { width: min(1180px, 100%); margin: 0 auto; }
.sp-page button, .sp-page input, .sp-page textarea { font-family: inherit; }

/* ── Botões ───────────────────────────────────────────────────────────── */
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 10px; color: #e6ebf0; background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); font: 650 13.5px/1 inherit; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s, opacity .15s; }
.sp-btn:hover { background: rgba(255,255,255,.1); }
.sp-btn:focus-visible, .sp-cat:focus-within, .sp-back:focus-visible, .sp-item:focus-visible, .sp-jump:focus-visible, .sp-attach:focus-within, .sp-drop:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.sp-btn-primary { color: #04110f; background: var(--sp-acc); box-shadow: none; font-weight: 750; }
.sp-btn-primary:hover { background: var(--sp-acc-2); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,229,153,.3); }
.sp-btn-sm { padding: 9px 13px; font-size: 12.5px; }
.sp-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.sp-btn[data-confirm="true"] { color: #fff; background: #b3412f; box-shadow: none; }

/* ── Topo ─────────────────────────────────────────────────────────────── */
.sp-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; gap: 36px;
  padding: 50px 52px 46px; border-radius: 18px; background: linear-gradient(120deg, #0d1218 0%, #0b1016 55%, #0c1a17 100%); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.4); }
.sp-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sp-grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(70% 90% at 80% 40%, #000, transparent 75%); mask-image: radial-gradient(70% 90% at 80% 40%, #000, transparent 75%); }
.sp-glow { position: absolute; right: -4%; top: -30%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,229,153,.2), transparent); filter: blur(12px); }
.sp-kicker { margin: 0 0 16px; color: var(--sp-acc); font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.sp-title { margin: 0; font-size: clamp(36px, 4.6vw, 58px); font-weight: 750; line-height: 1.04; letter-spacing: -.05em; color: #fff; }
.sp-title mark { position: relative; z-index: 0; padding: 0 .08em; margin: 0 -.02em; color: #04110f; background: none; }
.sp-title mark::before { content: ''; position: absolute; z-index: -1; inset: .08em 0 .02em; border-radius: 8px; background: linear-gradient(100deg, var(--sp-acc), #7cf5cf); box-shadow: 0 10px 30px rgba(0,229,153,.3); }
.sp-lead { max-width: 520px; margin: 20px 0 0; color: #b6bec8; font-size: 15px; line-height: 1.75; }
.sp-lead b { color: #fff; font-weight: 700; }
.sp-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sp-steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sp-steps span { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; color: #04110f; background: var(--sp-acc); font-size: 13px; font-weight: 800; }
.sp-steps strong { display: block; color: #fff; font-size: 13.5px; font-weight: 700; }
.sp-steps small { display: block; margin-top: 2px; color: #8f99a5; font-size: 12px; }

/* ── Sem sessão ───────────────────────────────────────────────────────── */
.sp-guest { margin-top: 28px; }
.sp-guest-card { max-width: 640px; margin: 0 auto; padding: 36px 32px; text-align: center; border-radius: 16px; background: var(--sp-panel); box-shadow: inset 0 0 0 1px var(--sp-line); }
.sp-lock { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: rgba(0,229,153,.12); box-shadow: inset 0 0 0 1px rgba(0,229,153,.3); }
.sp-lock svg, .sp-ph-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--sp-acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-guest-card h2 { margin: 16px 0 8px; font-size: 22px; letter-spacing: -.03em; }
.sp-guest-card p { margin: 0 auto; max-width: 460px; color: #a8b1bb; font-size: 14px; line-height: 1.7; }
.sp-guest-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

/* ── Aplicação ────────────────────────────────────────────────────────── */
.sp-app { margin-top: 28px; }
.sp-priority { display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-bottom: 14px; border-radius: 12px; color: #aab3bd; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); font-size: 13px; line-height: 1.55; }
.sp-priority:empty { display: none; }
.sp-priority a { color: var(--sp-acc); text-underline-offset: 3px; }
.sp-priority[data-vip="true"] { color: #e9d9b0; background: linear-gradient(100deg, rgba(230,194,122,.14), rgba(230,194,122,.04)); box-shadow: inset 0 0 0 1px rgba(230,194,122,.4); }
.sp-vip-badge { flex: none; padding: 4px 9px; border-radius: 6px; color: #1a1305; background: var(--sp-gold); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sp-workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-side, .sp-pane { border-radius: 16px; background: var(--sp-panel); box-shadow: inset 0 0 0 1px var(--sp-line); }
.sp-side { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); min-height: 280px; overflow: hidden; }
.sp-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--sp-line); }
.sp-side-head h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.sp-count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.08); color: #b8c0ca; font-size: 11px; font-weight: 700; text-align: center; }
.sp-list { margin: 0; padding: 8px; overflow-y: auto; list-style: none; }
.sp-empty { padding: 28px 14px; color: #8993a0; font-size: 13px; text-align: center; line-height: 1.6; }
.sp-item { position: relative; display: block; width: 100%; padding: 12px 13px; margin-bottom: 4px; border: 0; border-radius: 11px; color: inherit; background: transparent; text-align: left; cursor: pointer; transition: background .15s; }
.sp-item:hover { background: rgba(255,255,255,.04); }
.sp-item[aria-current="true"] { background: rgba(0,229,153,.09); box-shadow: inset 0 0 0 1px rgba(0,229,153,.35); }
.sp-item-top { display: flex; align-items: center; gap: 8px; color: #8993a0; font-size: 11px; }
.sp-item-top time { margin-left: auto; white-space: nowrap; }
.sp-item strong { display: -webkit-box; margin: 6px 0 4px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #fff; font-size: 13.5px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.sp-item-preview { display: block; overflow: hidden; color: #8f99a5; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sp-item[data-unread="true"]::after { content: ''; position: absolute; top: 14px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--sp-acc); box-shadow: 0 0 10px var(--sp-acc); }
.sp-item[data-unread="true"] time { margin-right: 16px; }
.sp-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; color: #b8c0ca; background: rgba(255,255,255,.06); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.sp-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.sp-status[data-tone="staff"] { color: #dfc287; background: rgba(172,123,40,.14); }
.sp-status[data-tone="user"] { color: var(--sp-acc); background: rgba(0,229,153,.12); }
.sp-status[data-tone="closed"] { color: #9a9fa8; background: rgba(144,145,150,.1); }
.sp-vip-chip { padding: 2px 7px; border-radius: 5px; color: #1a1305; background: var(--sp-gold); font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* ── Painel direito ───────────────────────────────────────────────────── */
.sp-pane { min-height: 480px; padding: 0; overflow: hidden; }
.sp-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 480px; padding: 40px 28px; text-align: center; }
.sp-ph-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(0,229,153,.1); box-shadow: inset 0 0 0 1px rgba(0,229,153,.28); }
.sp-placeholder h3 { margin: 18px 0 8px; font-size: 19px; letter-spacing: -.02em; }
.sp-placeholder p { max-width: 380px; margin: 0 0 22px; color: #a0a9b4; font-size: 13.5px; line-height: 1.7; }
.sp-back { display: none; align-self: flex-start; padding: 8px 4px; border: 0; color: var(--sp-acc); background: none; font: 650 13px/1 inherit; cursor: pointer; }

/* Formulário */
.sp-form { display: flex; flex-direction: column; gap: 20px; padding: 28px 30px 30px; }
.sp-h { margin: 0; font-size: 22px; font-weight: 720; letter-spacing: -.03em; }
.sp-field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.sp-field > span, .sp-field > legend { padding: 0; color: #d4dae1; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.sp-field > span em { float: right; color: #7d8794; font-size: 11.5px; font-style: normal; font-weight: 500; font-variant-numeric: tabular-nums; }
.sp-field small { color: #7d8794; font-size: 11.5px; font-weight: 500; }
.sp-field input[type="text"], .sp-field textarea, .sp-reply textarea { width: 100%; padding: 12px 14px; border: 0; border-radius: 10px; color: #fff; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.11); font: 500 14px/1.55 inherit; resize: vertical; }
.sp-field input::placeholder, .sp-field textarea::placeholder, .sp-reply textarea::placeholder { color: #727c88; }
.sp-field input:focus, .sp-field textarea:focus, .sp-reply textarea:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(0,229,153,.65), 0 0 0 3px rgba(0,229,153,.13); }
.sp-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sp-cat { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 13px; border-radius: 12px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); cursor: pointer; transition: background .15s, box-shadow .15s; }
.sp-cat:hover { background: rgba(255,255,255,.055); }
.sp-cat input { position: absolute; opacity: 0; pointer-events: none; }
.sp-cat svg { width: 20px; height: 20px; fill: none; stroke: #9aa5b1; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sp-cat b { color: #fff; font-size: 13.5px; font-weight: 700; }
.sp-cat small { color: #8f99a5; font-size: 11.5px; line-height: 1.45; }
.sp-cat:has(input:checked) { background: rgba(0,229,153,.09); box-shadow: inset 0 0 0 1px var(--sp-acc); }
.sp-cat:has(input:checked) svg { stroke: var(--sp-acc); }
.sp-drop { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; color: #c4ccd5; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); cursor: pointer; transition: background .15s, box-shadow .15s; }
.sp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sp-drop svg { width: 20px; height: 20px; fill: none; stroke: var(--sp-acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-drop b { font-size: 13px; }
.sp-drop small { margin-left: auto; }
.sp-drop.is-over, .sp-drop:hover { background: rgba(0,229,153,.06); box-shadow: inset 0 0 0 1px rgba(0,229,153,.5); }
.sp-files { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-files:empty { display: none; }
.sp-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 10px; border-radius: 8px; color: #cdd5de; background: rgba(255,255,255,.06); font-size: 12px; }
.sp-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.sp-chip small { color: #8993a0; }
.sp-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; color: #b8c0ca; background: rgba(255,255,255,.08); font-size: 14px; line-height: 1; cursor: pointer; }
.sp-chip button:hover { color: #fff; background: rgba(255,123,123,.3); }
.sp-privacy { margin: 0; color: #8993a0; font-size: 12px; line-height: 1.6; }
.sp-error { margin: 0; color: var(--sp-bad); font-size: 12.5px; line-height: 1.5; }
.sp-error:empty { display: none; }
.sp-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.sp-note { color: #8993a0; font-size: 12px; }
.sp-note[data-warn="true"] { color: var(--sp-warn); }

/* Conversa */
.sp-thread { display: flex; flex-direction: column; position: relative; min-height: 480px; max-height: calc(100vh - 110px); }
.sp-thread-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--sp-line); }
.sp-thread-title { flex: 1; min-width: 180px; }
.sp-t-meta { display: block; color: #8f99a5; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.sp-thread-title h2 { margin: 4px 0 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; overflow-wrap: anywhere; }
.sp-thread-tools { display: flex; align-items: center; gap: 10px; }
.sp-messages { flex: 1; min-height: 220px; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.sp-messages:focus { outline: none; }
.sp-day { align-self: center; margin: 8px 0 2px; padding: 3px 10px; border-radius: 999px; color: #8993a0; background: rgba(255,255,255,.04); font-size: 11px; font-weight: 600; }
.sp-msg { max-width: min(560px, 86%); padding: 11px 14px 9px; border-radius: 14px; color: #e3e8ee; background: var(--sp-panel-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sp-msg.is-mine { align-self: flex-end; border-bottom-right-radius: 5px; color: #e6fff6; background: rgba(0,229,153,.11); box-shadow: inset 0 0 0 1px rgba(0,229,153,.3); }
.sp-msg.is-staff { align-self: flex-start; border-bottom-left-radius: 5px; }
.sp-msg.is-system { align-self: center; max-width: 90%; padding: 6px 12px; border-radius: 999px; color: #8f99a5; background: transparent; box-shadow: none; font-size: 12px; text-align: center; }
.sp-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: #9aa5b1; font-size: 11px; font-weight: 700; }
.sp-msg.is-staff .sp-msg-head { color: var(--sp-acc); }
.sp-msg p { margin: 0; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-msg time { display: block; margin-top: 4px; color: #7d8794; font-size: 10.5px; text-align: right; font-variant-numeric: tabular-nums; }
.sp-msg.is-system time { display: none; }
.sp-att { margin-top: 8px; }
.sp-att img, .sp-att video { display: block; max-width: 100%; max-height: 260px; border-radius: 9px; background: #000; }
.sp-att a { display: inline-block; margin-top: 6px; color: var(--sp-acc); font-size: 12.5px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.sp-jump { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); padding: 8px 14px; border: 0; border-radius: 999px; color: #04110f; background: var(--sp-acc); box-shadow: 0 8px 22px rgba(0,0,0,.45); font: 700 12px/1 inherit; cursor: pointer; }
.sp-reply { padding: 14px 22px 18px; border-top: 1px solid var(--sp-line); background: rgba(0,0,0,.12); }
.sp-reply textarea { min-height: 62px; max-height: 180px; }
.sp-reply .sp-files { margin-top: 8px; }
.sp-reply-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.sp-reply-bar .sp-error { flex: 1; }
.sp-reply-bar .sp-btn { margin-left: auto; }
.sp-attach { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 9px; color: #c4ccd5; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sp-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sp-attach svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-closed { margin: 0; padding: 18px 22px; border-top: 1px solid var(--sp-line); color: #9aa3ad; font-size: 13px; text-align: center; background: rgba(0,0,0,.12); }

/* Contactos */
.sp-legal a { color: var(--sp-acc); text-underline-offset: 3px; }
.sp-legal { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--sp-line); color: #7d8794; font-size: 12px; line-height: 1.7; }

/* Aviso */
.sp-toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; max-width: min(92vw, 440px); padding: 12px 18px; border-radius: 11px; color: #04110f; background: var(--sp-acc); box-shadow: 0 14px 40px rgba(0,0,0,.5); font-size: 13.5px; font-weight: 700; transform: translateX(-50%); }
.sp-toast[data-error="true"] { color: #fff; background: #b3412f; }

@media (max-width: 960px) {
  .sp-workspace { grid-template-columns: 1fr; }
  .sp-side { position: static; max-height: none; }
  .sp-workspace[data-view="detail"] .sp-side { display: none; }
  .sp-workspace[data-view="list"] .sp-pane { display: none; }
  .sp-back { display: inline-flex; }
  .sp-form { padding: 22px 18px 24px; }
  .sp-thread { max-height: none; min-height: 70vh; }
  .sp-thread-head { padding: 14px 16px; }
  .sp-messages { padding: 16px; max-height: 56vh; }
  .sp-reply { padding: 12px 16px 16px; }
  .sp-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sp-main { padding: 28px 16px 60px; }
  .sp-hero { grid-template-columns: 1fr; padding: 34px 22px 26px; gap: 24px; }
  .sp-msg { max-width: 94%; }
}
@media (max-width: 420px) { .sp-cats { grid-template-columns: 1fr; } .sp-drop small { display: none; } }
@media (prefers-reduced-motion: reduce) { .sp-btn, .sp-item, .sp-cat, .sp-drop { transition: none; } .sp-messages { scroll-behavior: auto; } }
