/* =========================================================
   NUVEM NOTIFY — Design System v3
   Tema: Ethereal Mist · Glassmorphism · Teal
   Paleta: #00838F · #546E7A · #597A9A · #F5F7FB
   ========================================================= */

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

:root {
  /* ── Brand Colors ── */
  --primary:        #00838F;
  --primary-dark:   #006670;
  --primary-light:  #e0f4f5;
  --primary-glow:   rgba(0,131,143,.18);

  --secondary:      #546E7A;
  --tertiary:       #597A9A;
  --neutral:        #F5F7FB;

  /* ── Surfaces (Glass) ── */
  --bg:             #eef1f6;
  --bg-gradient:    linear-gradient(135deg, #dfe8f0 0%, #e8edf5 50%, #dce6ef 100%);
  --glass:          rgba(255,255,255,.65);
  --glass-strong:   rgba(255,255,255,.85);
  --glass-border:   rgba(255,255,255,.9);
  --glass-shadow:   0 8px 32px rgba(84,110,122,.12);

  /* ── Sidebar ── */
  --sidebar-bg:     rgba(255,255,255,.55);
  --sidebar-border: rgba(0,131,143,.1);
  --sidebar-active: rgba(0,131,143,.12);
  --sidebar-w:      240px;

  /* ── Text ── */
  --text:           #1c2b33;
  --text-2:         #546E7A;
  --text-muted:     #8fa8b4;
  --text-inv:       #ffffff;

  /* ── Borders ── */
  --border:         rgba(84,110,122,.12);
  --border-2:       rgba(84,110,122,.2);

  /* ── Topbar ── */
  --topbar-h:       60px;

  /* ── Status colors ── */
  --green:    #00838F;
  --yellow:   #f59e0b;
  --red:      #ef4444;
  --blue:     #597A9A;
  --purple:   #7c6fcd;

  /* ── Radius ── */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs:  6px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 4px rgba(84,110,122,.08);
  --shadow:    0 4px 20px rgba(84,110,122,.1);
  --shadow-md: 0 8px 32px rgba(84,110,122,.14);
  --shadow-lg: 0 20px 60px rgba(84,110,122,.2);

  /* ── Misc ── */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --blur: blur(20px);
  --blur-sm: blur(12px);
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
table { border-collapse: collapse; width: 100%; }

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================================
   SCREENS
   ========================================================= */
.screen { display: none; }
.screen.active { display: flex; }

/* =========================================================
   LOGIN SCREEN
   ========================================================= */
#screen-login {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #000 url('/img/fundo.png') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}
#screen-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 0;
}

/* Orbs decorativos */
.login-orbs { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .25;
  animation: orbPulse 10s ease-in-out infinite;
}
.orb1 { width: 500px; height: 500px; background: var(--primary); top: -180px; right: -120px; }
.orb2 { width: 360px; height: 360px; background: var(--tertiary); bottom: -100px; left: -100px; animation-delay: -5s; }
.orb3 { width: 260px; height: 260px; background: var(--secondary); top: 40%; left: 30%; animation-delay: -2.5s; opacity: .12; }
@keyframes orbPulse {
  0%, 100% { transform: scale(1) translate(0,0); }
  33%       { transform: scale(1.05) translate(10px,-10px); }
  66%       { transform: scale(.97) translate(-8px,8px); }
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: var(--shadow-lg);
}

/* Logo nas telas */
.brand-logo-img {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.15));
}
.sidebar-logo-img {
  max-width: 140px;
  max-height: 44px;
  object-fit: contain;
  display: block;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.login-brand .brand-icon {
  width: 46px; height: 46px;
  background: var(--primary);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 6px 20px var(--primary-glow);
}
.login-brand .brand-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
}
.login-brand .brand-name span { color: var(--primary); }

.login-subtitle {
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  margin-bottom: 30px;
  font-weight: 400;
}

.login-card .field { margin-bottom: 16px; }
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85) !important;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.login-card input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14.5px;
  transition: var(--transition);
  outline: none;
  backdrop-filter: blur(8px);
}
.login-card input::placeholder { color: rgba(255,255,255,.45); }
.login-card input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.login-installed-banner {
  background: var(--primary-light);
  border: 1px solid rgba(0,131,143,.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* =========================================================
   APP SHELL
   ========================================================= */
#screen-app {
  height: 100vh;
  overflow: hidden;
  flex-direction: row;
  background: var(--bg-gradient);
  background-attachment: fixed;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition), min-width var(--transition);
  position: relative;
  z-index: 100;
  overflow: hidden;
}

.sidebar-brand {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .brand-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.sidebar-brand .brand-text {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.sidebar-brand .brand-text span { color: var(--primary); }

/* ── BLOCO DA LOJA NA SIDEBAR ────────────────────────────── */
.sidebar-loja-block {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-loja-foto-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-loja-foto-wrap img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.sidebar-loja-nome {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ── UPLOAD FOTO LOJA (CONFIG) ──────────────────────────── */
.loja-foto-config-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--glass);
  border: 1.5px dashed var(--glass-border);
  border-radius: var(--radius);
}
.loja-foto-upload-area {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px dashed var(--primary);
  background: var(--primary-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  transition: var(--transition);
}
.loja-foto-upload-area:hover { border-style: solid; background: rgba(0,131,143,.15); }
.loja-foto-info { flex: 1; }

.sidebar-nav {
  flex: 1;
  padding: 10px 10px;
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 12px 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: rgba(0,131,143,.07);
  color: var(--primary);
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.3);
}
.sidebar-avatar {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 3px 10px var(--primary-glow);
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role { color: var(--text-muted); font-size: 11px; }
.btn-logout {
  width: 30px; height: 30px;
  border: none;
  background: rgba(0,131,143,.08);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-logout:hover { background: var(--red); color: #fff; }

/* ── MAIN AREA ──────────────────────────────────────────── */
.main {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--glass);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 10;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 20px;
  padding: 4px;
  display: none;
}
.page-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
  flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.notif-btn {
  position: relative;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--border);
  font-size: 17px;
  color: var(--text-2);
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.notif-btn:hover { background: var(--primary-light); color: var(--primary); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid white;
}

/* ── CONTENT ────────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── PAGE ───────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* =========================================================
   COMPONENTS
   ========================================================= */

/* ── GLASS CARD ─────────────────────────────────────────── */
.card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.4);
}
.card-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.card-body { padding: 20px; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .1px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(84,110,122,.1);
  color: var(--secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(84,110,122,.18);
}

.btn-outline {
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; transform: translateY(-1px); }

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 7px;
  font-size: 16px;
  border-radius: var(--radius-xs);
}
.btn-ghost:hover { background: var(--border); color: var(--text-2); }

.btn-sm  { padding: 6px 13px; font-size: 12.5px; }
.btn-xs  { padding: 5px 10px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-danger  { background: var(--red); color: #fff; border: none; }
.btn-danger:hover  { background: #c0392b; color: #fff; }
.btn-archive { background: rgba(84,110,122,.12); color: var(--secondary); border: 1.5px solid rgba(84,110,122,.25); }
.btn-archive:hover { background: rgba(84,110,122,.22); color: var(--secondary); }
.btn-icon { padding: 7px; }

.btn-wa {
  background: #00838F;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,131,143,.3);
}
.btn-wa:hover { background: #006670; transform: translateY(-1px); }

/* ── STAT CARDS ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  border-top: 3px solid var(--primary);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: var(--primary-glow);
  border-radius: 50%;
  pointer-events: none;
}
.stat-card.accent-yellow { border-top-color: var(--yellow); }
.stat-card.accent-yellow::after { background: rgba(245,158,11,.1); }
.stat-card.accent-red    { border-top-color: var(--red); }
.stat-card.accent-red::after { background: rgba(239,68,68,.1); }
.stat-card.accent-blue   { border-top-color: var(--blue); }
.stat-card.accent-blue::after { background: rgba(89,122,154,.1); }

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}
.stat-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-sub { font-size: 12px; color: var(--text-2); }

/* ── TABLE ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; font-size: 13.5px; }
.data-table thead tr {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(8px);
}
.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(84,110,122,.07);
  vertical-align: middle;
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(0,131,143,.04); }

/* Client cell */
.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.client-name  { font-weight: 600; font-size: 13.5px; }
.client-email { font-size: 11.5px; color: var(--text-muted); }

/* ── STATUS BADGES ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}
.badge-novo           { background: rgba(245,158,11,.12); color: #92690a; border: 1px solid rgba(245,158,11,.2); }
.badge-em_atendimento { background: rgba(89,122,154,.12); color: var(--tertiary); border: 1px solid rgba(89,122,154,.25); }
.badge-recuperado     { background: rgba(0,131,143,.12);  color: var(--primary-dark); border: 1px solid rgba(0,131,143,.2); }
.badge-convertido     { background: rgba(16,185,129,.12); color: #065f46; border: 1px solid rgba(16,185,129,.2); }
.badge-perdido        { background: rgba(239,68,68,.1);   color: #991b1b; border: 1px solid rgba(239,68,68,.2); }
.badge-admin          { background: var(--primary-light); color: var(--primary-dark); border: 1px solid rgba(0,131,143,.2); }
.badge-atendente      { background: rgba(124,111,205,.12);color: #5b21b6; border: 1px solid rgba(124,111,205,.2); }
.badge-ativo          { background: rgba(0,131,143,.1);   color: var(--primary-dark); border: 1px solid rgba(0,131,143,.2); }
.badge-inativo        { background: rgba(239,68,68,.1);   color: #991b1b; border: 1px solid rgba(239,68,68,.2); }

/* ── ACTIONS ────────────────────────────────────────────── */
.actions-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.atendendo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(89,122,154,.1);
  color: var(--tertiary);
  border: 1px solid rgba(89,122,154,.2);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

/* ── PRODUCT CELL ───────────────────────────────────────── */
.product-cell { display: flex; flex-direction: column; gap: 1px; }
.product-name  { font-size: 13px; font-weight: 500; color: var(--text); }
.product-count { font-size: 11.5px; color: var(--text-muted); }

/* ── TEMPO ──────────────────────────────────────────────── */
.tempo-cell   { font-size: 13px; color: var(--text-2); font-weight: 500; }
.tempo-urgent { color: var(--red) !important; font-weight: 700; }
.tempo-warn   { color: var(--yellow) !important; font-weight: 600; }

/* ── FORMS ──────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field > label:not(.toggle-wrap):not(.resultado-opt) {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
/* Garante que o toggle não herde o estilo de label de campo */
.field label.toggle-wrap {
  display: flex;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  cursor: pointer;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-wrap input { display: none; }
.toggle-sw {
  width: 44px; height: 24px;
  background: #b0bec5;
  border-radius: 99px;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
}
.toggle-sw::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.toggle-wrap input:checked + .toggle-sw { background: var(--primary); }
.toggle-wrap input:checked + .toggle-sw::after { left: 23px; }
.toggle-label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  text-transform: none !important;
  letter-spacing: 0;
}
.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── PAGE CONTROLS ──────────────────────────────────────── */
.page-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-controls-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.filter-group { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; }

.input-search {
  padding: 9px 14px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
  min-width: 200px;
}
.input-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); background: rgba(255,255,255,.85); }
.input-search::placeholder { color: var(--text-muted); }

.select-filter {
  padding: 9px 14px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.select-filter:focus { border-color: var(--primary); }

.date-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.date-filter-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500;
}
.input-date {
  padding: 8px 10px;
  background: var(--glass);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  width: 140px;
}
.input-date:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-glow); }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,43,51,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .22s;
}
.modal-overlay.open { opacity: 1; }
.modal-box {
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(.95) translateY(10px);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }
.modal-box-lg { max-width: 700px; }

.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.4);
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.6);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,.1); color: var(--red); border-color: var(--red); }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(255,255,255,.3);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── CARRINHO DETAILS ───────────────────────────────────── */
.detail-section { margin-bottom: 22px; }
.detail-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(84,110,122,.06);
  font-size: 13.5px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: var(--text-2); font-weight: 500; }
.detail-row .value { font-weight: 600; color: var(--text); }
.product-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  backdrop-filter: blur(8px);
}
.product-img {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--primary-light);
  flex-shrink: 0;
}
.product-info .p-name   { font-size: 13.5px; font-weight: 600; color: var(--text); }
.product-info .p-detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── DASHBOARD GRID ─────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.dash-list { display: flex; flex-direction: column; }
.dash-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(84,110,122,.07);
  transition: var(--transition);
}
.dash-list-item:hover { background: rgba(0,131,143,.03); }
.dash-list-item:last-child { border-bottom: none; }
.dash-item-info { flex: 1; min-width: 0; }
.dash-item-name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-item-sub  { font-size: 12px; color: var(--text-muted); }
.dash-item-right { text-align: right; flex-shrink: 0; }
.dash-item-val  { font-size: 13.5px; font-weight: 700; color: var(--primary); }
.dash-item-time { font-size: 11.5px; color: var(--text-muted); }

/* ── CHAT LAYOUT ────────────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 1fr;
  height: calc(100vh - var(--topbar-h) - 48px);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.chat-sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255,255,255,.35);
}
.chat-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.4);
  color: var(--text);
}
.chat-contact-list { flex: 1; overflow-y: auto; }
.chat-contact {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(84,110,122,.07);
  cursor: pointer;
  transition: var(--transition);
}
.chat-contact:hover  { background: rgba(0,131,143,.05); }
.chat-contact.active { background: rgba(0,131,143,.1); border-left: 3px solid var(--primary); }
.chat-contact-avatar {
  width: 40px; height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.chat-contact-info  { flex: 1; min-width: 0; }
.chat-contact-name  { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-contact-last  { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-contact-meta  { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.chat-contact-time  { font-size: 11px; color: var(--text-muted); }
.unread-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Chat main */
.chat-main { display: flex; flex-direction: column; background: rgba(255,255,255,.25); overflow: hidden; min-height: 0; height: 100%; position: relative; }
.chat-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 13px;
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(8px);
}
.chat-header-avatar {
  width: 38px; height: 38px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.chat-header-info { flex: 1; }
.chat-header-name { font-size: 14.5px; font-weight: 700; color: var(--text); }
.chat-header-sub  { font-size: 12px; color: var(--text-muted); }
.chat-header-actions { display: flex; align-items: center; gap: 8px; }

/* Mensagens */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(238,241,246,.6);
}
.msg-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  backdrop-filter: blur(8px);
}
.msg-bubble.sent {
  background: var(--primary);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 10px var(--primary-glow);
}
.msg-bubble.received {
  background: rgba(255,255,255,.85);
  color: var(--text);
  margin-right: auto;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}
.msg-time { font-size: 10.5px; margin-top: 4px; opacity: .7; text-align: right; }
.msg-auto { font-size: 10.5px; font-style: italic; opacity: .6; }

.chat-input-area {
  position: relative;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.chat-input-wrap { flex: 1; }

/* ── TEMPLATE PICKER ─────────────────────────────────────── */
.template-picker {
  position: absolute;
  bottom: 80px;
  right: 16px;
  left: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}
.template-picker-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.template-picker-item {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.template-picker-item:hover { background: var(--primary-glow); }
.tpi-nome { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.tpi-preview { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.chat-input {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255,255,255,.7);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  font-size: 14px;
  outline: none;
  resize: none;
  max-height: 120px;
  transition: var(--transition);
  color: var(--text);
}
.chat-input:focus { border-color: var(--primary); background: rgba(255,255,255,.95); box-shadow: 0 0 0 3px var(--primary-glow); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}
.chat-empty-icon { font-size: 52px; opacity: .25; }
.chat-empty p { font-size: 14px; font-weight: 500; }

/* ── TEMPLATES ──────────────────────────────────────────── */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.template-card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}
.template-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.template-card-head  { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.template-name  { font-size: 14px; font-weight: 700; color: var(--text); }
.template-body  { font-size: 13px; color: var(--text-2); line-height: 1.5; max-height: 70px; overflow: hidden; }
.template-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.template-vars   { font-size: 11px; color: var(--text-muted); }
.template-actions { display: flex; gap: 6px; }

/* ── EMPTY / LOADING ────────────────────────────────────── */
.empty-state { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.empty-state .es-icon  { font-size: 44px; margin-bottom: 12px; opacity: .35; }
.empty-state .es-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-state .es-sub   { font-size: 13.5px; }

.loading-state { padding: 40px; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(28,43,51,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  padding: 12px 22px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.1);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: rgba(0,102,112,.9); border-color: rgba(0,131,143,.4); }
.toast.error   { background: rgba(220,38,38,.9); border-color: rgba(239,68,68,.3); }
.toast.warning { background: rgba(180,120,0,.9); border-color: rgba(245,158,11,.3); }

/* ── ERROR / SUCCESS MESSAGES ───────────────────────────── */
.msg-error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  color: #991b1b;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 4px;
  backdrop-filter: blur(8px);
}
.msg-success {
  background: rgba(0,131,143,.08);
  border: 1px solid rgba(0,131,143,.2);
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 4px;
  backdrop-filter: blur(8px);
}
.hidden { display: none !important; }

/* ── CONFIG SECTIONS ────────────────────────────────────── */
.config-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.config-section:last-of-type { border-bottom: none; }
.config-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text); }

/* ── MODAL FINALIZAR ────────────────────────────────────── */
.resultado-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}
.resultado-opt { cursor: pointer; }
.resultado-opt input[type="radio"] { display: none; }
.resultado-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(8px);
  transition: var(--transition);
  text-align: center;
}
.resultado-opt input:checked + .resultado-card.recuperado-card {
  border-color: var(--primary);
  background: rgba(0,131,143,.1);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.resultado-opt input:checked + .resultado-card.perdido-card {
  border-color: var(--red);
  background: rgba(239,68,68,.07);
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}
.resultado-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.resultado-icon { font-size: 28px; }
.resultado-label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.resultado-sub   { font-size: 11.5px; color: var(--text-muted); }

/* ── RANKING ────────────────────────────────────────────── */
.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(84,110,122,.07);
  transition: var(--transition);
}
.ranking-item:last-child { border-bottom: none; }
.ranking-item:hover { background: rgba(0,131,143,.03); }

.ranking-pos {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.ranking-pos.gold   { background: linear-gradient(135deg,#f6d365,#fda085); color: #7a4500; }
.ranking-pos.silver { background: linear-gradient(135deg,#d3dce6,#a8b5c2); color: #3a4a56; }
.ranking-pos.bronze { background: linear-gradient(135deg,#e8a87c,#c47a4e); color: #5a2800; }
.ranking-pos.other  { background: rgba(84,110,122,.1); color: var(--text-2); font-size: 12px; }

.ranking-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.ranking-info { flex: 1; min-width: 0; }
.ranking-nome { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ranking-sub  { font-size: 12px; color: var(--text-muted); }
.ranking-stats { text-align: right; flex-shrink: 0; }
.ranking-count { font-size: 18px; font-weight: 800; color: var(--primary); line-height: 1; }
.ranking-pct   { font-size: 11.5px; color: var(--text-muted); }

/* Barra de progresso ranking */
.ranking-bar-wrap { width: 100%; margin-top: 4px; }
.ranking-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.ranking-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--tertiary));
  border-radius: 99px;
  transition: width .6s ease;
}

/* Motivos de perda */
.motivo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid rgba(84,110,122,.07);
}
.motivo-item:last-child { border-bottom: none; }
.motivo-label { font-size: 13px; color: var(--text-2); flex: 1; }
.motivo-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  min-width: 28px;
  text-align: right;
}
.motivo-bar-mini {
  width: 60px; height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.motivo-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), #f97316);
  border-radius: 99px;
  transition: width .6s ease;
}

/* ── UPLOAD PRINT ────────────────────────────────────────── */
/* ── RESUMO FINALIZAÇÃO (modal carrinho) ─────────────────── */
.finalizacao-resumo {
  border: 1.5px solid var(--primary-light);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(0,131,143,.04), rgba(0,131,143,.08));
}
.finalizacao-resumo h4 {
  margin-bottom: 10px;
  font-size: .95rem;
  color: var(--primary-dark);
}

/* ── UPLOAD PRINT ────────────────────────────────────────── */
.upload-print-area {
  border: 2px dashed rgba(0,131,143,.35);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(0,131,143,.04);
  transition: border-color .2s, background .2s;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-print-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-print-area p {
  margin: 6px 0 2px;
  font-size: .9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.upload-print-area small {
  font-size: .75rem;
  color: var(--text-muted);
}
.btn-remove-print {
  background: none;
  border: none;
  color: var(--red);
  font-size: .8rem;
  cursor: pointer;
  margin-top: 6px;
  padding: 0;
  display: block;
}
.btn-remove-print:hover { text-decoration: underline; }
.upload-print-area.has-image { border-style: solid; border-color: var(--primary); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -270px; z-index: 200; transition: left .25s; }
  .sidebar.open { left: 0; }
  .sidebar-toggle { display: block; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .fields-row { grid-template-columns: 1fr; }
  .content { padding: 14px; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-controls { flex-direction: column; align-items: stretch; }
  .page-controls-right { margin-left: 0; }
  .stat-value { font-size: 26px; }
}
