/* ================================================================
   WATTS RASTREIO — Design System v2
   ================================================================ */

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-50:  #f0fdf4; --blue-100: #dcfce7; --blue-200: #bbf7d0;
  --blue-300: #86efac; --blue-400: #4ade80; --blue-500: #22c55e;
  --blue-600: #16a34a; --blue-700: #15803d; --blue-800: #166534; --blue-900: #14532d;

  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
  --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
  --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;

  --ink-950: #05090f; --ink-900: #0a0f1e; --ink-800: #0f172a; --ink-700: #131e30;

  --green-100: #dcfce7; --green-500: #22c55e; --green-600: #16a34a; --green-700: #15803d;
  --red-100:   #fee2e2; --red-500:   #ef4444; --red-600:   #dc2626; --red-700:   #b91c1c;
  --amber-100: #fef3c7; --amber-500: #f59e0b; --amber-700: #b45309;
  --violet-100:#ede9fe; --violet-500:#8b5cf6; --violet-700:#6d28d9;
  --sky-100:   #e0f2fe; --sky-500:   #0ea5e9; --sky-700:   #0369a1;

  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px; --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -3px rgba(0,0,0,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.18);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color: var(--slate-900); background: #fff;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── BOTÕES ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius); font-weight: 600;
  font-size: 13px; border: none; cursor: pointer; transition: all .15s ease;
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn svg { flex-shrink: 0; }

.btn-primary  { background: var(--blue-600); color: #fff; box-shadow: 0 2px 8px rgba(22,163,74,.35); }
.btn-primary:hover  { background: var(--blue-700); box-shadow: 0 4px 14px rgba(22,163,74,.45); text-decoration: none; }
.btn-secondary{ background: var(--slate-100); color: var(--slate-700); }
.btn-secondary:hover{ background: var(--slate-200); text-decoration: none; }
.btn-danger   { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: var(--red-700); }
.btn-ghost    { background: transparent; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.15); }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.btn-outline  { background: transparent; color: var(--blue-600); border: 1.5px solid var(--blue-200); }
.btn-outline:hover { background: var(--blue-50); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ── INPUTS ───────────────────────────────────────────────── */
.input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--slate-200); border-radius: var(--radius);
  background: #fff; color: var(--slate-900); font-size: 14px;
  font-family: inherit; outline: none; transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.input::placeholder { color: var(--slate-400); }
.input-dark {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1);
  color: #e2e8f0;
}
.input-dark:focus { border-color: rgba(34,197,94,.6); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.input-dark::placeholder { color: var(--slate-500); }
.input-dark option { background: #1e293b; }

label { display: block; font-size: 12px; font-weight: 600; color: var(--slate-600); margin-bottom: 5px; letter-spacing: .02em; text-transform: uppercase; }
.dark-label { color: var(--slate-400) !important; }
.form-row { margin-bottom: 16px; }
.form-help { font-size: 11px; color: var(--slate-500); margin-top: 4px; }

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.badge::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0; }

.badge-sky    { background:var(--sky-100);    color:var(--sky-700); }
.badge-amber  { background:var(--amber-100);  color:var(--amber-700); }
.badge-violet { background:var(--violet-100); color:var(--violet-700); }
.badge-emerald{ background:var(--green-100);  color:var(--green-700); }
.badge-rose   { background:var(--red-100);    color:var(--red-700); }

/* dark badges */
.dark-badges .badge-sky    { background:rgba(14,165,233,.15); color:#7dd3fc; }
.dark-badges .badge-amber  { background:rgba(245,158,11,.15);  color:#fcd34d; }
.dark-badges .badge-violet { background:rgba(139,92,246,.15);  color:#c4b5fd; }
.dark-badges .badge-emerald{ background:rgba(34,197,94,.15);   color:#86efac; }
.dark-badges .badge-rose   { background:rgba(239,68,68,.15);   color:#fca5a5; }

/* ── ALERTAS ──────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; border: 1px solid transparent; }
.alert-error   { background:var(--red-100);   color:var(--red-700);   border-color:#fecaca; }
.alert-success { background:var(--green-100); color:var(--green-700); border-color:#bbf7d0; }
.alert-info    { background:var(--sky-100);   color:var(--sky-700);   border-color:#bae6fd; }
.alert-warning { background:var(--amber-100); color:var(--amber-700); border-color:#fde68a; }

/* ================================================================
   HEADER PÚBLICO — sticky glassmorphism
   ================================================================ */
.header-pub {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}
.header-pub.dark {
  background: rgba(10,15,30,.85);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo:hover { text-decoration:none; }
.logo-mark {
  width:36px; height:36px; border-radius:9px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 4px 12px rgba(22,163,74,.4);
}
.logo-name { font-weight:800; font-size:13px; letter-spacing:.04em; color:var(--slate-900); }
.dark .logo-name { color:#fff; }
.logo-tag  { font-size:10px; font-weight:500; color:var(--slate-400); letter-spacing:.08em; text-transform:uppercase; }

.header-right { display:flex; align-items:center; gap:10px; }
.user-pill {
  display:flex; align-items:center; gap:10px;
  background:var(--slate-100); border-radius:999px; padding:4px 14px 4px 4px;
}
.dark .user-pill { background:rgba(255,255,255,.06); }
.user-av {
  width:28px; height:28px; border-radius:50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color:#fff; font-weight:700; font-size:11px;
  display:flex; align-items:center; justify-content:center;
}
.user-pill .nome { font-size:13px; font-weight:600; color:var(--slate-800); }
.dark .user-pill .nome { color:#e2e8f0; }
.btn-sair {
  display:inline-flex; align-items:center; gap:5px;
  font-size:12px; color:var(--slate-500); padding:6px 10px; border-radius:var(--radius-sm);
  background:transparent; border:none; cursor:pointer; font-family:inherit; font-weight:500;
}
.btn-sair:hover { color:var(--red-600); background:var(--red-100); }
.dark .btn-sair { color:var(--slate-400); }
.dark .btn-sair:hover { color:#fca5a5; background:rgba(239,68,68,.12); }

/* ================================================================
   LANDING — hero
   ================================================================ */
.hero {
  background: linear-gradient(160deg, var(--blue-700) 0%, var(--blue-900) 100%);
  color: #fff; padding: 100px 24px 80px; position: relative; overflow: hidden;
}
.hero::before {
  content:''; position:absolute; top:-200px; right:-200px;
  width:600px; height:600px; border-radius:50%;
  background: radial-gradient(circle, rgba(74,222,128,.25) 0%, transparent 70%);
}
.hero::after {
  content:''; position:absolute; bottom:-150px; left:-100px;
  width:400px; height:400px; border-radius:50%;
  background: radial-gradient(circle, rgba(22,163,74,.3) 0%, transparent 70%);
}
.hero-inner { max-width: 760px; margin: 0 auto; text-align: center; position: relative; z-index:1; }
.hero-badge {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.2);
  border-radius:999px; padding:5px 14px; font-size:12px; font-weight:600;
  color:var(--blue-100); margin-bottom:24px; backdrop-filter:blur(8px);
}
.hero h1 { font-size: clamp(32px,6vw,56px); font-weight:900; line-height:1.08; letter-spacing:-.02em; margin-bottom:16px; }
.hero h1 span { background:linear-gradient(90deg,#86efac,#bbf7d0); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p { font-size:18px; color:var(--blue-100); opacity:.9; max-width:500px; margin:0 auto 40px; line-height:1.5; }

.busca-card {
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15);
  border-radius:var(--radius-xl); padding:28px; backdrop-filter:blur(12px);
  max-width:560px; margin:0 auto; box-shadow:var(--shadow-xl);
}
.busca-card p { font-size:13px; color:var(--blue-200); margin-bottom:14px; font-weight:500; }
.busca-row { display:flex; gap:8px; }
.busca-row .input {
  background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.2);
  color:#fff; font-size:15px; padding:13px 18px; border-radius:var(--radius);
}
.busca-row .input::placeholder { color:rgba(255,255,255,.4); }
.busca-row .input:focus { border-color:rgba(255,255,255,.5); box-shadow:0 0 0 3px rgba(255,255,255,.1); }
.busca-row .btn { padding:13px 22px; font-size:14px; }
@media(max-width:500px){ .busca-row { flex-direction:column; } }

/* ── FEATURES ─────────────────────────────────────────────── */
.features-section { max-width:1280px; margin:0 auto; padding:70px 24px; }
.section-tag { font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--blue-500); margin-bottom:10px; }
.section-title { font-size:clamp(24px,4vw,36px); font-weight:800; color:var(--slate-900); margin-bottom:6px; letter-spacing:-.02em; }
.section-subtitle { font-size:16px; color:var(--slate-500); margin-bottom:48px; }

.features-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:20px; }
.feature-card {
  background:#fff; border:1.5px solid var(--slate-200);
  border-radius:var(--radius-lg); padding:28px; transition:all .2s ease;
  position:relative; overflow:hidden;
}
.feature-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--blue-400), var(--blue-600));
  opacity:0; transition:.2s;
}
.feature-card:hover { border-color:var(--blue-200); box-shadow:var(--shadow-lg); transform:translateY(-3px); }
.feature-card:hover::before { opacity:1; }
.feature-icon {
  width:48px; height:48px; border-radius:12px;
  background:var(--blue-50); color:var(--blue-600);
  display:flex; align-items:center; justify-content:center; margin-bottom:18px;
}
.feature-card h3 { font-size:16px; font-weight:700; color:var(--slate-900); margin-bottom:8px; }
.feature-card p { font-size:13px; color:var(--slate-500); line-height:1.6; }

.rodape {
  background:var(--slate-900); color:var(--slate-500);
  padding:32px 24px; text-align:center; font-size:13px;
}
.rodape a { color:var(--slate-400); }
.rodape a:hover { color:#fff; }

/* ================================================================
   AUTH — login / cadastro
   ================================================================ */
.auth-page {
  min-height:100vh; display:flex;
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--ink-900) 60%, var(--ink-950) 100%);
}
.auth-left {
  flex:1; display:flex; align-items:center; justify-content:center;
  padding:60px 40px;
}
.auth-visual {
  display:flex; flex-direction:column; max-width:460px; width:100%;
  color:#fff;
}
.auth-logo { display:flex; align-items:center; gap:12px; margin-bottom:64px; text-decoration:none; }
.auth-logo:hover { text-decoration:none; }
.auth-logo .logo-mark { width:40px; height:40px; border-radius:10px; }
.auth-logo span { font-weight:800; font-size:14px; letter-spacing:.04em; color:#fff; }
.auth-headline { font-size:clamp(28px,4vw,40px); font-weight:900; letter-spacing:-.02em; line-height:1.1; margin-bottom:16px; }
.auth-headline span { background:linear-gradient(90deg,#86efac,#4ade80); -webkit-background-clip:text; background-clip:text; color:transparent; }
.auth-desc { font-size:15px; color:var(--blue-200); line-height:1.6; margin-bottom:40px; }
.auth-steps { display:flex; flex-direction:column; gap:16px; }
.auth-step { display:flex; gap:14px; align-items:flex-start; }
.auth-step .num {
  width:28px; height:28px; border-radius:50%; flex-shrink:0;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2);
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:var(--blue-200);
}
.auth-step .text { font-size:13px; color:var(--slate-400); line-height:1.5; }
.auth-step .text strong { color:var(--slate-200); display:block; margin-bottom:2px; }

.auth-right {
  width:460px; flex-shrink:0;
  background: rgba(255,255,255,0.03);
  border-left: 1px solid rgba(255,255,255,0.07);
  display:flex; align-items:center; justify-content:center;
  padding:40px;
}
.auth-form-box { width:100%; max-width:380px; }
.auth-form-box h2 { font-size:24px; font-weight:800; color:#fff; margin-bottom:6px; }
.auth-form-box .sub { font-size:13px; color:var(--slate-500); margin-bottom:28px; }
.auth-form-box label { color:var(--slate-400); }
.auth-form-box .input { background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.1); color:#fff; }
.auth-form-box .input:focus { border-color:rgba(34,197,94,.6); }
.auth-footer-link { text-align:center; font-size:13px; color:var(--slate-500); margin-top:20px; }
.auth-footer-link a { color:var(--blue-300); font-weight:600; }

.role-toggle {
  display:grid; grid-template-columns:1fr 1fr; gap:4px;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius); padding:4px; margin-bottom:20px;
}
.role-toggle button {
  padding:9px; border-radius:var(--radius-sm); border:none;
  background:transparent; color:var(--slate-400); font-weight:600;
  font-size:13px; cursor:pointer; font-family:inherit; transition:all .15s;
}
.role-toggle button.active { background:rgba(255,255,255,.12); color:#fff; }

@media(max-width:860px){
  .auth-left { display:none; }
  .auth-right { width:100%; border-left:none; background:var(--ink-900); min-height:100vh; }
}

/* ================================================================
   PAINEL VENDEDOR — dark
   ================================================================ */
.dark-theme {
  background: var(--ink-900);
  color: var(--slate-200);
  min-height:100vh;
}
.dark-theme a { color: var(--blue-300); }

.painel-wrap { max-width:1280px; margin:0 auto; padding:32px 24px; }

/* ── STATS ────────────────────────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin-top:28px; }
.stat-card {
  background: linear-gradient(135deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.02) 100%);
  border:1px solid rgba(255,255,255,.07); border-radius:var(--radius-lg); padding:22px;
  position:relative; overflow:hidden; transition:.2s;
}
.stat-card::after {
  content:''; position:absolute; top:0; right:0;
  width:80px; height:80px; border-radius:50%;
  background:radial-gradient(circle, rgba(34,197,94,.12), transparent);
  transform:translate(20px,-20px);
}
.stat-card:hover { border-color:rgba(34,197,94,.2); }
.stat-card.alerta { border-color:rgba(239,68,68,.25); }
.stat-card.alerta::after { background:radial-gradient(circle, rgba(239,68,68,.12), transparent); }
.stat-label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:var(--slate-500); margin-bottom:12px; display:flex; justify-content:space-between; align-items:center; }
.stat-valor { font-size:38px; font-weight:800; color:#fff; line-height:1; }
.stat-sub { font-size:11px; color:var(--slate-600); margin-top:6px; }

/* ── ABAS ─────────────────────────────────────────────────── */
.tabs-bar {
  display:flex; gap:2px; background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.07); border-radius:var(--radius-lg);
  padding:5px; margin-top:28px; overflow-x:auto;
}
.tab-link {
  display:inline-flex; align-items:center; gap:7px; padding:9px 16px;
  border-radius:var(--radius); color:var(--slate-500); font-weight:600;
  font-size:13px; text-decoration:none; white-space:nowrap; transition:all .15s;
}
.tab-link:hover { background:rgba(255,255,255,.05); color:var(--slate-200); text-decoration:none; }
.tab-link.ativo { background:rgba(255,255,255,.09); color:#fff; }
.tab-badge {
  background:var(--red-500); color:#fff; font-size:10px; font-weight:700;
  padding:2px 7px; border-radius:999px;
}

/* ── SECÇÃO DO PAINEL ─────────────────────────────────────── */
.painel-sec {
  background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius-lg); padding:24px; margin-top:20px;
}
.painel-sec-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.painel-sec-header h2 { font-size:17px; font-weight:700; color:#fff; }
.painel-sec-header p  { font-size:12px; color:var(--slate-500); margin-top:3px; }

/* ── TABELA ───────────────────────────────────────────────── */
.table-wrap { overflow-x:auto; border-radius:var(--radius); border:1px solid rgba(255,255,255,.06); }
.t { width:100%; border-collapse:collapse; font-size:13px; min-width:580px; }
.t thead { background:rgba(255,255,255,.03); }
.t th {
  padding:11px 14px; font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:.08em; color:var(--slate-500); text-align:left; white-space:nowrap;
}
.t td { padding:12px 14px; border-top:1px solid rgba(255,255,255,.04); color:var(--slate-300); vertical-align:middle; }
.t tbody tr:hover td { background:rgba(255,255,255,.03); }
.mono { font-family:'Courier New',monospace; color:var(--blue-300); font-size:12px; font-weight:600; }

/* ── AÇÕES NA TABELA ──────────────────────────────────────── */
.ac { display:flex; gap:5px; align-items:center; }
.ac-btn {
  display:inline-flex; align-items:center; gap:4px; padding:4px 10px;
  border-radius:var(--radius-sm); font-size:11px; font-weight:600;
  border:1px solid transparent; cursor:pointer; text-decoration:none; font-family:inherit; transition:.15s;
}
.ac-edit  { background:rgba(22,163,74,.12);  color:var(--blue-300);  border-color:rgba(22,163,74,.25); }
.ac-edit:hover { background:rgba(22,163,74,.22); text-decoration:none; }
.ac-del   { background:rgba(239,68,68,.12);  color:#fca5a5; border-color:rgba(239,68,68,.25); }
.ac-del:hover { background:rgba(239,68,68,.22); }
.ac-view  { background:rgba(255,255,255,.05); color:var(--slate-400); border-color:rgba(255,255,255,.1); }
.ac-view:hover { background:rgba(255,255,255,.1); color:var(--slate-200); text-decoration:none; }

/* ── FORMULÁRIO CRIAR ENCOMENDA ──────────────────────────── */
.form-criar { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:10px; align-items:end; }
@media(max-width:820px){ .form-criar { grid-template-columns:1fr; } }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.6); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center; padding:24px; z-index:60;
}
.modal {
  background: var(--ink-800); border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius-xl); padding:28px; width:100%; max-width:520px;
  max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-xl);
}
.modal-hd { display:flex; justify-content:space-between; align-items:start; margin-bottom:20px; }
.modal-hd h3 { font-size:18px; font-weight:700; color:#fff; }
.modal-close { background:none; border:none; color:var(--slate-500); cursor:pointer; padding:4px; border-radius:var(--radius-sm); }
.modal-close:hover { color:#fff; background:rgba(255,255,255,.08); }
.modal-ft { margin-top:22px; display:flex; justify-content:flex-end; gap:10px; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty {
  text-align:center; padding:56px 24px;
  border:1.5px dashed rgba(255,255,255,.08); border-radius:var(--radius-lg);
  color:var(--slate-600); font-size:13px;
}
.empty .empty-icon {
  width:52px; height:52px; border-radius:50%;
  background:rgba(255,255,255,.04); color:var(--slate-600);
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 14px;
}
.empty strong { display:block; color:var(--slate-400); font-size:14px; margin-bottom:4px; }

/* ── SENHA REVEAL ────────────────────────────────────────── */
.senha-reveal {
  display:inline-flex; align-items:center; gap:6px;
  font-family:'Courier New',monospace; font-size:12px;
}
.senha-reveal .senha-dots { letter-spacing:2px; color:var(--slate-500); }
.senha-reveal .senha-real { display:none; color:#86efac; font-weight:600; }
.senha-reveal .toggle-senha {
  background:none; border:none; cursor:pointer; color:var(--slate-500);
  padding:2px 4px; border-radius:4px; display:inline-flex;
}
.senha-reveal .toggle-senha:hover { color:var(--blue-300); background:rgba(34,197,94,.1); }
.senha-reveal.visible .senha-dots { display:none; }
.senha-reveal.visible .senha-real { display:inline; }

/* ================================================================
   CHAT
   ================================================================ */
.chat-layout {
  display:grid; grid-template-columns:300px 1fr; gap:0;
  height:580px; border:1px solid rgba(255,255,255,.07); border-radius:var(--radius-lg); overflow:hidden;
}
@media(max-width:780px){ .chat-layout { grid-template-columns:1fr; height:auto; } }

.chat-sidebar {
  background:rgba(0,0,0,.15); border-right:1px solid rgba(255,255,255,.06);
  display:flex; flex-direction:column; overflow:hidden;
}
.chat-sid-hd {
  padding:16px; border-bottom:1px solid rgba(255,255,255,.06);
  font-size:13px; font-weight:700; color:#fff; display:flex; justify-content:space-between; align-items:center;
}
.conv-list { flex:1; overflow-y:auto; }
.conv-item {
  width:100%; display:flex; gap:10px; padding:13px 14px;
  background:transparent; border:none; border-top:1px solid rgba(255,255,255,.04);
  text-align:left; cursor:pointer; color:inherit; transition:.15s;
}
.conv-item:hover { background:rgba(255,255,255,.04); }
.conv-item.ativo { background:rgba(34,197,94,.1); border-left:3px solid var(--blue-500); }
.conv-av {
  width:36px; height:36px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,var(--blue-700),var(--blue-500));
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:13px; color:#fff;
}
.conv-info { flex:1; min-width:0; }
.conv-info .topo { display:flex; justify-content:space-between; gap:4px; }
.conv-nome { font-size:13px; font-weight:600; color:#e2e8f0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-quando { font-size:10px; color:var(--slate-500); flex-shrink:0; }
.conv-preview { font-size:11px; color:var(--slate-500); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-nao-lida {
  background:var(--red-500); color:#fff; font-size:10px; font-weight:700;
  padding:2px 7px; border-radius:999px; align-self:center; flex-shrink:0;
}

.chat-main { display:flex; flex-direction:column; }
.chat-empty {
  flex:1; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  color:var(--slate-600); text-align:center; padding:32px;
}
.chat-empty .ci {
  width:56px; height:56px; border-radius:50%;
  background:rgba(255,255,255,.04); color:var(--slate-600);
  display:flex; align-items:center; justify-content:center; margin-bottom:12px;
}
.chat-window { display:flex; flex-direction:column; flex:1; overflow:hidden; }
.chat-hd {
  padding:14px 18px; border-bottom:1px solid rgba(255,255,255,.06);
  display:flex; align-items:center; gap:12px;
}
.chat-hd .nome { font-weight:700; color:#fff; font-size:14px; }
.chat-hd .cod  { font-size:11px; color:var(--blue-300); font-family:'Courier New',monospace; }

.chat-msgs { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.msg { display:flex; }
.msg.minha { justify-content:flex-end; }
.bolha {
  max-width:72%; padding:9px 14px; border-radius:16px;
  font-size:13px; white-space:pre-wrap; word-break:break-word; line-height:1.5;
}
.msg.deles .bolha { background:rgba(255,255,255,.08); color:#e2e8f0; border-top-left-radius:4px; }
.msg.minha .bolha { background:var(--blue-600); color:#fff; border-top-right-radius:4px; box-shadow:0 2px 8px rgba(22,163,74,.35); }
.bolha .meta { font-size:10px; margin-top:5px; opacity:.55; }
.chat-input-bar {
  display:flex; gap:10px; padding:14px 16px;
  border-top:1px solid rgba(255,255,255,.06); background:rgba(0,0,0,.1);
}
.chat-input-bar textarea {
  flex:1; resize:none; max-height:100px; padding:10px 14px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius); color:#fff; font-family:inherit; font-size:13px; outline:none;
}
.chat-input-bar textarea:focus { border-color:rgba(34,197,94,.5); }
.chat-input-bar textarea::placeholder { color:var(--slate-600); }

/* ================================================================
   PAINEL CLIENTE — light
   ================================================================ */
.cliente-bg { background:var(--slate-50); min-height:100vh; }
.cliente-wrap { max-width:1000px; margin:0 auto; padding:36px 24px; }
.page-title { font-size:26px; font-weight:800; color:var(--slate-900); letter-spacing:-.02em; }
.page-sub   { font-size:14px; color:var(--slate-500); margin-top:4px; }

.enc-list { margin-top:24px; display:flex; flex-direction:column; gap:10px; }
.enc-row {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  background:#fff; border:1.5px solid var(--slate-200); border-radius:var(--radius-lg);
  padding:16px 20px; text-decoration:none; transition:all .15s;
}
.enc-row:hover { border-color:var(--blue-300); box-shadow:var(--shadow-lg); transform:translateY(-1px); text-decoration:none; }
.enc-token { font-family:'Courier New',monospace; font-weight:700; color:var(--blue-600); font-size:14px; }
.enc-rota { font-size:13px; color:var(--slate-600); margin-top:3px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.enc-rota .de  { color:var(--green-700); font-weight:500; }
.enc-rota .ate { color:var(--red-700); font-weight:500; }
.enc-rota .arr { color:var(--slate-400); }
.enc-data { font-size:11px; color:var(--slate-400); margin-top:3px; }

.enc-empty {
  background:#fff; border:2px dashed var(--slate-200);
  border-radius:var(--radius-xl); padding:60px 24px; text-align:center; margin-top:24px;
}
.enc-empty .ei { width:60px; height:60px; background:var(--slate-100); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; color:var(--slate-400); }
.enc-empty h2 { font-size:16px; font-weight:700; color:var(--slate-900); margin-bottom:6px; }
.enc-empty p  { font-size:13px; color:var(--slate-500); }

/* ── DETALHE ENCOMENDA ────────────────────────────────────── */
.detalhe-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:20px; margin-top:24px; }
@media(max-width:780px){ .detalhe-grid { grid-template-columns:1fr; } }

.card-light {
  background:#fff; border:1.5px solid var(--slate-200); border-radius:var(--radius-lg); padding:24px;
}
.card-light h2 { font-size:15px; font-weight:700; color:var(--slate-800); margin-bottom:16px; display:flex; align-items:center; gap:8px; }

.rota-strip {
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
  background:var(--slate-50); border:1px solid var(--slate-200);
  border-radius:var(--radius); padding:16px; margin-top:18px;
}
.rota-strip .label-r { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; margin-bottom:4px; }
.de-label  { color:var(--green-600); }
.ate-label { color:var(--red-600); }
.rota-strip .val { font-size:14px; font-weight:600; color:var(--slate-900); }

/* ── MAPA ─────────────────────────────────────────────────── */
.mapa-box {
  width:100%; height:380px; border-radius:var(--radius); overflow:hidden;
  border:1.5px solid var(--slate-200); position:relative; background:var(--slate-100);
}
.mapa-box > div:first-child { width:100% !important; height:100% !important; }
.mapa-loading {
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  background:rgba(248,250,252,.85); color:var(--slate-500); font-size:13px; gap:8px;
}
.mapa-sem-coords {
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; padding:24px;
  background:#fff;
}
.mapa-sem-coords p { font-size:13px; color:var(--slate-600); font-weight:500; }
.mapa-sem-coords .sub { font-size:11px; color:var(--slate-500); margin-top:4px; }
.mapa-legenda {
  display:flex; flex-wrap:wrap; gap:14px; margin-top:10px;
  font-size:11px; color:var(--slate-600);
}
.mapa-legenda span { display:inline-flex; align-items:center; gap:5px; }
.dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.dot-from { background:var(--green-500); }
.dot-now  { background:var(--blue-600); }
.dot-to   { background:var(--red-500); }

/* ── TIMELINE ─────────────────────────────────────────────── */
.timeline { list-style:none; position:relative; padding-left:26px; }
.timeline::before {
  content:''; position:absolute; left:5px; top:6px; bottom:6px;
  width:2px; background:var(--slate-200); border-radius:2px;
}
.timeline li { position:relative; padding-bottom:22px; }
.timeline li:last-child { padding-bottom:0; }
.timeline li::before {
  content:''; position:absolute; left:-22px; top:5px;
  width:12px; height:12px; border-radius:50%;
  background:var(--blue-500); border:2px solid #fff;
  box-shadow:0 0 0 2px var(--blue-200);
}
.tl-quando { font-size:10px; color:var(--slate-500); font-weight:500; }
.tl-desc   { font-size:13px; color:var(--slate-800); margin-top:3px; font-weight:500; }
.tl-local  { font-size:11px; color:var(--slate-500); margin-top:3px; display:flex; align-items:center; gap:4px; }

/* ── RASTREAMENTO PÚBLICO ─────────────────────────────────── */
.rastrear-wrap { max-width:1000px; margin:0 auto; padding:30px 24px; }
.rastrear-card {
  background:#fff; border:1.5px solid var(--slate-200); border-radius:var(--radius-xl); padding:28px;
  display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:16px;
  box-shadow:var(--shadow);
}
.rastrear-token { font-family:'Courier New',monospace; font-size:20px; font-weight:800; color:var(--blue-600); }
.rastrear-card h1 { font-size:22px; font-weight:700; color:var(--slate-900); margin-top:8px; }
.rastrear-card .updated { font-size:12px; color:var(--slate-400); margin-top:4px; }

/* ── VOLTAR ───────────────────────────────────────────────── */
.voltar { display:inline-flex; align-items:center; gap:6px; color:var(--slate-500); font-size:13px; font-weight:500; }
.voltar:hover { color:var(--blue-600); text-decoration:none; }

/* ── BTN SAIR LIGHT ──────────────────────────────────────── */
.sair-btn {
  display:inline-flex; align-items:center; gap:5px;
  border:1.5px solid var(--slate-200); color:var(--slate-600);
  padding:6px 12px; border-radius:var(--radius-sm); font-size:12px;
  background:#fff; cursor:pointer; text-decoration:none; font-weight:500; font-family:inherit;
}
.sair-btn:hover { background:var(--slate-100); text-decoration:none; color:var(--slate-800); }
.dark .sair-btn {
  background:transparent; color:var(--slate-400);
  border-color:rgba(255,255,255,.1);
}
.dark .sair-btn:hover { background:rgba(255,255,255,.06); color:#fff; }

/* ── HERO PAINEL ──────────────────────────────────────────── */
.painel-titulo {
  font-size:clamp(24px,4vw,34px); font-weight:900; letter-spacing:-.02em;
  background:linear-gradient(90deg,var(--blue-300),var(--blue-500));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.painel-sub { font-size:13px; color:var(--slate-500); margin-top:4px; }
.codigo-tag {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(34,197,94,.1); border:1px solid rgba(34,197,94,.2);
  border-radius:999px; padding:3px 12px; font-size:12px; color:var(--blue-300);
  font-family:'Courier New',monospace; font-weight:700; margin-top:8px;
}

/* ── CHAT CLIENTE (LIGHT) ─────────────────────────────────── */
.chat-light {
  background:#fff; border:1.5px solid var(--slate-200); border-radius:var(--radius-lg);
  overflow:hidden; display:flex; flex-direction:column;
  height:calc(100vh - 180px); min-height:520px;
}
.chat-light-hd {
  padding:16px 20px; border-bottom:1px solid var(--slate-200);
  display:flex; align-items:center; gap:12px;
}
.chat-light-hd .av {
  width:40px; height:40px; border-radius:50%;
  background:linear-gradient(135deg,var(--blue-500),var(--blue-700));
  color:#fff; font-weight:700; font-size:15px;
  display:flex; align-items:center; justify-content:center;
}
.chat-light-hd .nome { font-weight:700; color:var(--slate-900); font-size:15px; }
.chat-light-hd .cod  { font-size:11px; color:var(--blue-600); font-family:'Courier New',monospace; }
.status-dot { width:9px; height:9px; background:var(--green-500); border-radius:50%; flex-shrink:0; margin-left:auto; }
.chat-msgs-light {
  flex:1; overflow-y:auto; background:var(--slate-50);
  padding:16px; display:flex; flex-direction:column; gap:10px;
}
.msg-light { display:flex; }
.msg-light.minha { justify-content:flex-end; }
.bolha-light {
  max-width:72%; padding:10px 14px; border-radius:16px;
  font-size:13px; white-space:pre-wrap; word-break:break-word;
  box-shadow:var(--shadow-sm);
}
.msg-light.deles .bolha-light { background:#fff; color:var(--slate-800); border-top-left-radius:4px; border:1px solid var(--slate-200); }
.msg-light.minha .bolha-light { background:var(--blue-600); color:#fff; border-top-right-radius:4px; box-shadow:0 2px 8px rgba(22,163,74,.3); }
.bolha-light .meta { font-size:10px; margin-top:5px; opacity:.55; }
.chat-input-light {
  display:flex; gap:10px; padding:14px 16px;
  border-top:1px solid var(--slate-200); background:#fff;
}
.chat-input-light textarea {
  flex:1; resize:none; max-height:100px; padding:10px 14px;
  border:1.5px solid var(--slate-200); border-radius:var(--radius);
  font-family:inherit; font-size:13px; outline:none; color:var(--slate-900);
}
.chat-input-light textarea:focus { border-color:var(--blue-400); box-shadow:0 0 0 3px rgba(34,197,94,.12); }

/* ── SPINNER ──────────────────────────────────────────────── */
@keyframes spin { to { transform:rotate(360deg); } }
.spinner {
  width:20px; height:20px; border:2px solid var(--slate-300);
  border-top-color:var(--blue-500); border-radius:50%;
  animation:spin .7s linear infinite;
}

/* ================================================================
   WATTS RASTREIO — Refinamentos v3 (profissional + prático)
   ================================================================ */

/* Botão primário com leve profundidade e brilho verde */
.btn-primary {
  background: linear-gradient(180deg, var(--green-500) 0%, var(--green-600) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 16px -4px rgba(22,163,74,.45);
  letter-spacing:.01em;
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--green-600) 0%, var(--green-700) 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,.1), 0 10px 24px -6px rgba(22,163,74,.55);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* Marca mais nítida e logo com destaque suave */
.logo-name { letter-spacing:.06em; }
.logo-mark {
  box-shadow: 0 4px 14px rgba(22,163,74,.45), inset 0 1px 0 rgba(255,255,255,.25);
}

/* Cartões de recurso com elevação ao passar o mouse */
.feature-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-200, #bbf7d0);
}

/* Foco acessível e consistente (teclado) */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(34,197,94,.45);
  outline-offset: 2px;
}

/* Campo de chat que cresce com o texto (prático, sem limite) */
.chat-input-bar textarea,
.chat-input-light textarea {
  max-height: 160px;
  resize: none;
  line-height: 1.45;
  overflow-y: auto;
}

/* Ponto de status "online" com pulso discreto */
.status-dot {
  box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: wattsPulse 2s infinite;
}
@keyframes wattsPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Barra de rolagem mais discreta no chat */
.chat-msgs::-webkit-scrollbar, .chat-msgs-light::-webkit-scrollbar { width:8px; }
.chat-msgs::-webkit-scrollbar-thumb, .chat-msgs-light::-webkit-scrollbar-thumb {
  background: rgba(100,116,139,.35); border-radius:999px;
}

/* ── RODAPÉ com logo Watts Multi ───────────────────────────────── */
.rodape { padding: 40px 24px 32px; }
.rodape-logo { display:block; height:44px; width:auto; margin:0 auto 14px; opacity:.95; }
@media (max-width: 640px) { .rodape-logo { height:36px; } }

/* ── PÁGINA INICIAL: foto de fundo (formato stories) cobrindo a página toda + filtro preto 70% ── */
body.landing-bg { background:#06110b; color:#fff; }
body.landing-bg::before {          /* a foto, fixa, cobrindo toda a tela (funciona também no iPhone) */
  content:''; position:fixed; inset:0; z-index:-2;
  background:#06110b url('fundo-watts.jpg') center 42% / cover no-repeat;
}
body.landing-bg::after {           /* filtro preto com 70% de opacidade */
  content:''; position:fixed; inset:0; z-index:-1; background:rgba(0,0,0,.70);
}
.landing-bg .header-pub.dark { background:rgba(6,17,11,.72); border-bottom:1px solid rgba(255,255,255,.08); }
.landing-bg .hero { background:transparent; padding:110px 24px 90px; }
.landing-bg .hero::before, .landing-bg .hero::after { display:none; }
.landing-bg .hero p { color:rgba(255,255,255,.84); }
.landing-bg .hero-badge { color:#bbf7d0; background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.22); }
.hero-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:36px; }
.landing-bg .features-section { background:transparent; }
.landing-bg .section-tag { color:#86efac; }
.landing-bg .section-title { color:#fff; }
.landing-bg .section-subtitle { color:rgba(255,255,255,.70); }
.landing-bg .feature-card {
  background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.12);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
}
.landing-bg .feature-card:hover { border-color:rgba(134,239,172,.55); background:rgba(255,255,255,.09); }
.landing-bg .feature-card h3 { color:#fff; }
.landing-bg .feature-card p { color:rgba(255,255,255,.72); }
.landing-bg .feature-icon { background:rgba(34,197,94,.18); color:#86efac; }
.landing-bg .rodape { background:rgba(0,0,0,.35); border-top:1px solid rgba(255,255,255,.08); color:rgba(255,255,255,.62); }
@media (max-width: 640px) { .landing-bg .hero { padding:84px 20px 72px; } }

/* ── MODO APP (PWA): toque, área segura, sensação de aplicativo ─────────── */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
.btn, button, .tab-btn, .conv-item { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
@media (display-mode: standalone) {
  .header-pub { padding-top: env(safe-area-inset-top); }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 640px) {
  .btn { min-height: 44px; }           /* alvo de toque confortável */
  .input { font-size: 16px; }          /* evita zoom automático no iPhone ao focar */
}

/* ================================================================
   LEITURA FÁCIL (público 35+): letras maiores, botões grandes, contraste
   ================================================================ */
body { font-size: 16px; line-height: 1.6; }
label { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--slate-700); margin-bottom: 7px; }
.dark-label { color: var(--slate-300) !important; }
.input { font-size: 16px; padding: 13px 16px; min-height: 50px; border-radius: 12px; }
.btn { font-size: 15px; padding: 13px 22px; border-radius: 12px; }
.btn-sm { font-size: 14px; padding: 10px 16px; min-height: 42px; }
.badge { font-size: 13px; padding: 5px 12px; }
.alert { font-size: 15px; padding: 14px 18px; }

.page-title { font-size: 28px; }
.page-sub { font-size: 16px; color: var(--slate-600); }
.enc-list { gap: 12px; }
.enc-row { padding: 18px 20px; border-radius: 16px; }
.enc-token { font-size: 17px; }
.enc-rota { font-size: 15px; margin-top: 6px; }
.enc-data { font-size: 13px; color: var(--slate-500); margin-top: 4px; }
.enc-empty h2 { font-size: 19px; }
.enc-empty p { font-size: 15px; }

.rastrear-token { font-size: 22px; }
.rastrear-card .updated { font-size: 14px; color: var(--slate-500); }
.card-light h2 { font-size: 18px; }
.tl-quando { font-size: 13px; }
.tl-desc { font-size: 15px; }
.tl-local { font-size: 13px; }

.bolha-light, .bolha { font-size: 16px; line-height: 1.5; max-width: 82%; }
.bolha-light .meta, .bolha .meta { font-size: 12px; opacity: .65; }
.chat-input-light textarea, .chat-input-bar textarea { font-size: 16px; }
.chat-light-hd .nome { font-size: 17px; }
.conv-nome { font-size: 15px; }
.conv-preview { font-size: 14px; }

.auth-desc { font-size: 17px; }
.auth-step .text { font-size: 15px; }
.auth-form-box h2 { font-size: 26px; }
.tab-link { font-size: 15px; padding: 11px 18px; }
.tab-badge { font-size: 12px; }
.feature-card h3 { font-size: 18px; }
.feature-card p { font-size: 15px; }
.rodape { font-size: 14px; }


/* ================================================================
   BARRA INFERIOR ESTILO APP (celular)
   ================================================================ */
.app-nav { display: none; }
@media (max-width: 768px) {
  /* Cliente: barra fixa com ícone grande + nome */
  .app-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,255,255,.97); border-top: 1px solid var(--slate-200);
    box-shadow: 0 -6px 20px rgba(15,23,42,.08);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .app-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 60px; border-radius: 14px; color: var(--slate-500);
    font-size: 13px; font-weight: 700; text-decoration: none;
  }
  .app-nav a.ativo { color: var(--green-700); background: var(--green-100); }
  .app-nav a:active { transform: scale(.96); }
  .app-nav-ic { position: relative; display: inline-flex; }
  .app-nav-badge {
    position: absolute; top: -6px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px;
    background: var(--red-500); color: #fff; border-radius: 999px; border: 2px solid #fff;
    font-size: 11px; font-weight: 800; line-height: 16px; text-align: center;
  }
  body.tem-app-nav { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* no celular o "Sair" e o "Voltar" do topo ficam na barra de baixo */
  .cliente-wrap { padding: 22px 16px; }

  /* Vendedor: as abas viram a barra inferior */
  body.dark-theme { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .dark-theme .tabs-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; gap: 4px;
    border-radius: 0; border: 0; border-top: 1px solid rgba(255,255,255,.10);
    background: rgba(8,14,24,.97); overflow: visible;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .dark-theme .tab-link {
    flex: 1; flex-direction: column; justify-content: center; gap: 3px; position: relative;
    min-height: 60px; padding: 6px 2px; font-size: 12px; border-radius: 14px;
  }
  .dark-theme .tab-link svg { width: 24px; height: 24px; }
  .dark-theme .tab-link.ativo { background: rgba(34,197,94,.16); color: #86efac; }
  .dark-theme .tab-link .tab-badge { position: absolute; top: 4px; right: 18%; }
}

/* Chat do cliente no celular: ocupa a tela, campo de mensagem sempre visível (como app de mensagens) */
@media (max-width: 768px) {
  .tela-chat { padding-top: 12px; padding-bottom: 0; }
  .tela-chat > .page-title, .tela-chat > .page-sub { display: none; }
  .tela-chat .chat-light {
    height: calc(100vh - 62px - 84px - 24px);
    height: calc(100dvh - 62px - 84px - 24px - env(safe-area-inset-bottom));
    min-height: 380px; border-radius: 18px;
  }
  .tela-chat .chat-input-light { padding: 10px 12px; }
  .tela-chat .chat-input-light textarea { min-height: 48px; }
  .tela-chat .chat-input-light .btn { min-height: 48px; padding: 10px 16px; }
  /* o atalho "Chat com…" da lista de encomendas já está na barra de baixo */
  body.tem-app-nav .cliente-wrap a.btn[href$="/cliente/suporte.php"] { display: none; }
}
/* barra de rolagem do campo de mensagem só aparece quando o texto passa do limite de altura */
.chat-input-bar textarea, .chat-input-light textarea { overflow-y: hidden; padding-left: 14px; padding-right: 12px; }

/* Celular: topo em uma linha e números do painel lado a lado */
.logo-name { white-space: nowrap; }
@media (max-width: 768px) {
  .header-inner { padding: 0 14px; gap: 10px; }
  .logo-tag { display: none; }
  .user-pill { padding: 4px; }
  .user-pill .nome { display: none; }
  .painel-wrap { padding: 20px 14px; }
  .painel-titulo { font-size: 24px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; margin-top: 18px; }
  .stat-card { padding: 12px 10px; border-radius: 14px; min-width: 0; }
  .stat-card::before, .stat-card::after { display: none; }
  .stat-label { font-size: 11px; letter-spacing: .02em; line-height: 1.25; min-height: 28px; }
  .stat-label svg { display: none; }
  .stat-valor { font-size: 28px; margin-top: 4px; }
  .stat-sub { display: none; }
}
/* botão voltar do chat do vendedor (só no celular) */
.chat-voltar { display:none; align-items:center; justify-content:center; width:34px; height:34px; border:none; background:transparent; color:#fff; cursor:pointer; margin-right:2px; flex-shrink:0; border-radius:8px; }
.chat-voltar:active { background:rgba(255,255,255,.08); }
@media (max-width: 768px) {
  .chat-empty { display: none !important; }            /* "lista ao lado" não se aplica no celular */
  .conv-item { min-height: 64px; }
  .chat-voltar { display:inline-flex; }
  /* conversa em tela cheia (como um app de mensagens) */
  body.chat-aberto { overflow:hidden; }
  body.chat-aberto .app-nav,
  body.chat-aberto.dark-theme .tabs-bar { display:none !important; }   /* esconde a barra de abas enquanto conversa */
  .chat-window {
    position:fixed; inset:0; z-index:80; height:auto; min-height:0;
    background:var(--ink-900); border-radius:0;
  }
  .chat-window .chat-hd { padding-top: calc(14px + env(safe-area-inset-top)); }
  .chat-window .chat-input-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ── LOGO "WATTS RASTREIO" (imagem) e ícone de radar ─────────────────── */
.logo-img { display:block; height:40px; width:auto; }
.logo-img-sm { height:30px; }
.logo .logo-tag { border-left:1px solid rgba(255,255,255,.18); padding-left:10px; line-height:1.3; }
.auth-logo img { display:block; height:48px; width:auto; }
.auth-marca-mobile { display:none; }
@media (max-width: 860px) {
  .auth-marca-mobile { display:flex; flex-direction:column; align-items:center; gap:14px; margin-bottom:30px; }
  .auth-marca-mobile img:last-child { height:52px; width:auto; }
  .auth-app-icon { border-radius:18px; box-shadow:0 12px 30px -10px rgba(34,197,94,.65); }
}
@media (max-width: 768px) { .logo-img { height:34px; } .logo-img-sm { height:28px; } }
/* logo maior (leitura fácil) e centralizado no topo das telas de rastreio no celular */
.logo-img { height:48px; }
.logo-img-sm { height:36px; }
@media (max-width: 768px) {
  .logo-img { height:42px; }
  .logo-img-sm { height:36px; }
  body.tem-app-nav .header-inner { position:relative; }
  body.tem-app-nav .header-inner > .logo-img-sm { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
}
.auth-logo img { height:64px; }
/* foto do Suporte no cabeçalho do chat do cliente */
.chat-light-hd .av { overflow:hidden; background:var(--slate-100); }
.chat-light-hd .av img { width:100%; height:100%; object-fit:cover; display:block; }

/* ── Correção de rolagem do chat (bug flexbox: sem min-height:0 a mensagem longa
      estica a área e esconde o campo de enviar) ──────────────────────────────── */
.chat-main   { min-width:0; min-height:0; }
.chat-window { min-height:0; }
.chat-msgs   { min-height:0; }
.chat-light       { min-height:0; }
.chat-msgs-light  { min-height:0; }
.bolha, .bolha-light { overflow-wrap:anywhere; }   /* não deixa texto gigante empurrar a largura */

/* ── Fundo com foto nas telas de login e cadastro (filtro preto 75%) ──────── */
.auth-page {
  background:
    linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,.75)),
    url('fundo-login.jpg') center center / cover no-repeat;
}
.auth-right { background: transparent; border-left: 1px solid rgba(255,255,255,.08); }
.auth-form-box {
  background: rgba(8,12,22,.62);   /* módulo ~7% mais escuro */
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.10); border-radius: 20px;
  padding: 28px 24px;
}
@media (max-width: 860px) {
  .auth-right { border-left: none; }
}

/* ── QR Code de entrega (no card de rastreio) ─────────────────────────────── */
.rastrear-right { display:flex; flex-direction:column; align-items:flex-end; gap:12px; flex-shrink:0; }
.qr-mini { position:relative; border:none; background:transparent; cursor:pointer; padding:0; display:flex; flex-direction:column; align-items:center; gap:5px; font-family:inherit; }
.qr-mini-tag { font-size:11px; font-weight:800; color:var(--green-700); background:var(--green-100); padding:3px 14px; border-radius:999px; text-transform:uppercase; letter-spacing:.05em; }
.qr-canvas { position:relative; box-sizing:border-box; width:112px; height:112px; max-width:40vw; border-radius:14px; overflow:hidden; border:2px solid var(--green-200); background:#fff; padding:6px; box-shadow:0 2px 10px rgba(16,100,55,.12); transition:border-color .15s,box-shadow .15s; }
.qr-canvas canvas, .qr-canvas img { display:block; width:100% !important; height:100% !important; filter:blur(5px); }
/* Trava visual: borra forte + camada fosca com cadeado (parece bloqueado de propósito, não bugado) */
.qr-canvas::after { content:"🔒"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:24px; background:rgba(255,255,255,.4); backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); }
.qr-mini:hover .qr-canvas, .qr-mini:focus-visible .qr-canvas { border-color:var(--green-500); box-shadow:0 4px 14px rgba(16,100,55,.22); }
.qr-canvas.liberado canvas, .qr-canvas.liberado img { filter:none; }
.qr-canvas.liberado::after { display:none; }

/* Tela (modal) do QR */
.qr-modal { display:none; position:fixed; inset:0; z-index:200; background:rgba(2,6,12,.62);
  -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); align-items:center; justify-content:center; padding:20px; }
.qr-modal-box { background:#fff; border-radius:22px; padding:30px 26px 26px; max-width:360px; width:100%; text-align:center; position:relative; box-shadow:var(--shadow-xl); }
.qr-modal-close { position:absolute; top:10px; right:14px; border:none; background:transparent; font-size:28px; line-height:1; color:var(--slate-400); cursor:pointer; }
.qr-modal-close:hover { color:var(--slate-700); }
.qr-modal-emoji { font-size:34px; margin-bottom:4px; }
.qr-modal-box h3 { font-size:18px; font-weight:800; color:var(--slate-900); margin-bottom:18px; line-height:1.3; }
.qr-canvas-grande { position:relative; box-sizing:border-box; width:220px; height:220px; max-width:72vw; margin:0 auto 18px; border-radius:16px; overflow:hidden; border:1.5px solid var(--slate-200); background:#fff; padding:8px; }
.qr-canvas-grande canvas, .qr-canvas-grande img { display:block; width:100% !important; height:100% !important; filter:blur(11px); }
.qr-canvas-grande::after { content:"🔒"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:52px; background:rgba(255,255,255,.34); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
.qr-canvas-grande.liberado canvas, .qr-canvas-grande.liberado img { filter:none; }
.qr-canvas-grande.liberado::after { display:none; }
.qr-aviso { display:flex; align-items:center; justify-content:center; gap:7px; font-size:14px; font-weight:600; color:var(--amber-700); background:var(--amber-100); padding:12px 14px; border-radius:12px; line-height:1.4; }
.qr-aviso.qr-aviso-ok { color:var(--green-700); background:var(--green-100); }
@media (max-width:480px){ .qr-canvas { width:96px; height:96px; } }
