﻿/* ============================================================
   OMS â€” Premium 2026 Dashboard Design System
   Palette: soft off-white canvas, emerald primary, honey-gold accent
   Fonts: Cairo (display) + IBM Plex Sans Arabic (body)
   ============================================================ */

html,
body {
  overflow-x: hidden;
}

:root {
  /* Canvas & surfaces */
  --bg: #eef1f6;
  --bg-grad-1: #e8eef7;
  --bg-grad-2: #f2eef7;
  --bg-grad-3: #eaf4ef;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-stroke: rgba(148, 163, 184, 0.18);

  /* Brand */
  --primary: #0f9d6e;
  --primary-600: #0b8a60;
  --primary-700: #097552;
  --primary-soft: rgba(15, 157, 110, 0.12);
  --primary-grad: linear-gradient(135deg, #10b981 0%, #0d9488 50%, #6366f1 130%);
  --accent: #e8a317;
  --accent-soft: rgba(232, 163, 23, 0.14);

  /* Semantic */
  --danger: #e23b3b;
  --danger-soft: #fdeaea;
  --success: #16a34a;
  --success-soft: #e8f7ee;
  --warning: #e0a800;
  --warning-soft: #fcf6e1;

  /* Text */
  --ink: #0f1b2d;
  --ink-2: #475569;
  --ink-3: #8a98ab;
  --line: rgba(148, 163, 184, 0.22);

  /* Effects */
  --radius: 20px;
  --radius-sm: 13px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 3px rgba(17, 34, 64, 0.05), 0 2px 8px rgba(17, 34, 64, 0.04);
  --shadow: 0 6px 22px rgba(17, 34, 64, 0.08), 0 2px 6px rgba(17, 34, 64, 0.05);
  --shadow-lg: 0 22px 60px rgba(17, 34, 64, 0.16), 0 8px 22px rgba(17, 34, 64, 0.08);
  --shadow-glow: 0 8px 30px rgba(15, 157, 110, 0.28);

  --sidebar-w: 268px;
  --font-display: 'Cairo', system-ui, sans-serif;
  --font-body: 'Cairo', system-ui, sans-serif;
}

body.night {
  --bg: #0f172a;
  --bg-grad-1: #172554;
  --bg-grad-2: #111827;
  --bg-grad-3: #0f2f2b;
  --surface: rgba(15, 23, 42, 0.78);
  --surface-solid: #111827;
  --surface-2: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(148, 163, 184, 0.16);
  --glass-stroke: rgba(148, 163, 184, 0.18);
  --ink: #f8fafc;
  --ink-2: #cbd5e1;
  --ink-3: #94a3b8;
  --line: rgba(148, 163, 184, 0.24);
  --primary-soft: rgba(20, 184, 166, 0.16);
  --danger-soft: rgba(127, 29, 29, 0.42);
  --success-soft: rgba(22, 101, 52, 0.36);
  --warning-soft: rgba(113, 63, 18, 0.38);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.34), 0 2px 8px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.46), 0 8px 22px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 90% -10%, var(--bg-grad-2), transparent 55%),
    radial-gradient(1100px 800px at -10% 20%, var(--bg-grad-3), transparent 50%),
    radial-gradient(900px 600px at 50% 120%, var(--bg-grad-1), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}

/* LTR override */
body.ltr { direction: ltr; }
body.ltr .sidebar { border-right: none; border-left: 1px solid var(--glass-stroke); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: 0; color: var(--ink); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.32); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.5); background-clip: padding-box; }

/* ===================== LOGIN ===================== */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  position: relative; overflow: hidden;
}
.login-orb { position: fixed; border-radius: 50%; filter: blur(70px); opacity: 0.5; z-index: 0; }
.login-orb.a { width: 420px; height: 420px; background: #34d399; top: -120px; inset-inline-start: -80px; }
.login-orb.b { width: 380px; height: 380px; background: #818cf8; bottom: -120px; inset-inline-end: -60px; }
.login-orb.c { width: 300px; height: 300px; background: var(--accent); top: 40%; inset-inline-end: 30%; opacity: 0.25; }

.login-card {
  position: relative; z-index: 2; width: 100%; max-width: 410px;
  background: var(--surface); backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 42px 38px;
  animation: pop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-logo {
  width: 60px; height: 60px; border-radius: 17px; background: var(--primary-grad);
  display: grid; place-items: center; box-shadow: var(--shadow-glow); margin-bottom: 22px;
}
.login-logo svg { width: 30px; height: 30px; color: #fff; }
.login-card h1 { font-size: 25px; margin-bottom: 6px; }
.login-card .sub { color: var(--ink-2); font-size: 14px; margin-bottom: 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.input {
  width: 100%; padding: 12px 15px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85); border: 1.5px solid var(--line);
  font-size: 14.5px; transition: all 0.18s; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #fff; }
select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 70px; }

.password-eye-wrap {
  position: relative;
}

.password-eye-wrap .input {
  padding-inline-end: 48px;
  font-weight: 900;
  letter-spacing: .3px;
}

.password-eye-btn {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: #eef8f5;
  color: #0f766e;
  cursor: pointer;
  transition: .18s ease;
}

.password-eye-btn svg {
  width: 19px;
  height: 19px;
}

.password-eye-btn:hover,
.password-eye-btn.active {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .2);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px;
  transition: transform 0.12s, box-shadow 0.18s, background 0.18s; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 10px 34px rgba(15, 157, 110, 0.4); }
.btn-accent { background: linear-gradient(135deg, #f0b429, #e8870c); color: #fff; box-shadow: 0 8px 24px rgba(232, 135, 12, 0.32); }
.btn-success { background: linear-gradient(135deg, #22c55e, #0f9d6e); color: #fff; box-shadow: 0 8px 24px rgba(15, 157, 110, 0.28); }
.btn:disabled { opacity: .64; cursor: not-allowed; transform: none !important; }
.delivery-check-btn {
  background: linear-gradient(135deg, #16a34a, #0f9f7a);
  color: #fff;
  box-shadow: 0 10px 26px rgba(22, 163, 74, 0.28);
}
.delivery-check-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.34);
}
.btn-ghost { background: rgba(255, 255, 255, 0.7); border: 1.5px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); background: #fff; }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 8px 22px rgba(226, 59, 59, 0.3); }
.btn-danger:hover { background: #cf2f2f; }
.btn[hidden] { display: none !important; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: 11px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.login-hint {
  margin-top: 18px; padding: 11px 14px; border-radius: 12px; background: var(--primary-soft);
  font-size: 12.5px; color: var(--primary-700); text-align: center;
}

.whatsapp-login-wrap {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 16% 12%, rgba(37, 211, 102, 0.24), transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(18, 140, 126, 0.2), transparent 30%),
    linear-gradient(180deg, #dff7ef 0%, #f6fffb 48%, #e7f7f1 100%);
}
.whatsapp-login-wrap::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    radial-gradient(circle, rgba(18, 140, 126, 0.18) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(37, 211, 102, 0.14) 1px, transparent 1.6px);
  background-size: 28px 28px, 42px 42px;
  background-position: 0 0, 12px 18px;
}
.whatsapp-login-wrap .login-orb.a { background: #25d366; opacity: 0.34; }
.whatsapp-login-wrap .login-orb.b { background: #128c7e; opacity: 0.28; }
.whatsapp-login-wrap .login-orb.c { background: #075e54; opacity: 0.18; }
.whatsapp-login-card {
  max-width: 390px;
  max-height: calc(100dvh - 32px);
  padding: 0 24px 24px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.86);
  box-shadow: 0 28px 70px rgba(7, 94, 84, 0.16);
  overflow: hidden;
}
.whatsapp-login-hero {
  margin: 0 -24px 24px;
  padding: 34px 24px 26px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #075e54 0%, #128c7e 48%, #25d366 100%);
}
.whatsapp-login-logo {
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  border-radius: 25px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255,255,255,0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 18px 35px rgba(0,0,0,0.16);
}
.whatsapp-login-logo svg { width: 48px; height: 48px; }
.whatsapp-login-card h1 {
  color: #fff;
  margin: 0 0 6px;
  font-size: 28px;
}
.whatsapp-login-card .sub {
  color: rgba(255,255,255,0.82);
  margin: 0;
}
.whatsapp-login-card .field label {
  color: #0f3f39;
  font-weight: 800;
}
.whatsapp-login-card .input {
  height: 54px;
  border-radius: 18px;
  border-color: rgba(15, 118, 110, 0.16);
  background: rgba(255,255,255,0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}
.whatsapp-login-card .input:focus {
  border-color: #25d366;
  box-shadow: 0 0 0 5px rgba(37, 211, 102, 0.16);
}
.whatsapp-login-btn {
  min-height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #128c7e, #25d366);
  box-shadow: 0 14px 28px rgba(18, 140, 126, 0.28);
  font-size: 15px;
}
.whatsapp-login-foot {
  margin-top: 16px;
  text-align: center;
  color: #5f7f78;
  font-size: 12.5px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .whatsapp-login-wrap {
    height: 100dvh;
    min-height: 100dvh;
    padding: max(14px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
    align-items: center;
    justify-items: center;
  }
  .whatsapp-login-card {
    max-width: none;
    width: 100%;
    max-height: calc(100dvh - 28px);
    align-self: center;
    justify-self: center;
    border-radius: 30px;
    padding-inline: 20px;
    padding-bottom: 20px;
  }
  .whatsapp-login-hero {
    margin-inline: -20px;
    padding: 26px 20px 22px;
    margin-bottom: 20px;
  }
  .whatsapp-login-logo {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    margin-bottom: 10px;
  }
  .whatsapp-login-logo svg {
    width: 40px;
    height: 40px;
  }
  .whatsapp-login-card h1 {
    font-size: 24px;
  }
  .whatsapp-login-card .sub {
    font-size: 13px;
  }
  .whatsapp-login-card .field {
    margin-bottom: 13px;
  }
  .whatsapp-login-card .input,
  .whatsapp-login-btn {
    height: 50px;
    min-height: 50px;
  }
}

/* ===================== APP SHELL ===================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; padding: 26px 18px;
  background: var(--surface); backdrop-filter: blur(24px) saturate(150%);
  border-inline-end: 1px solid var(--glass-stroke);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  min-height: 0;
  z-index: 50;
}
.sidebar.collapsed { width: 82px; padding-inline: 12px; }
.sidebar.collapsed .brand { justify-content: center; padding-inline: 0; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-item span:not(.nav-badge),
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .night-mode-btn,
.sidebar.collapsed .user-chip .grow,
.sidebar.collapsed .logout-text { display: none; }
.sidebar.collapsed .nav-item {
  width: 58px;
  min-height: 52px;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin-inline: auto;
  gap: 0;
}
.sidebar.collapsed .sidebar-foot { display: flex; justify-content: center; }
.sidebar.collapsed .user-chip { padding: 8px; }
.sidebar.collapsed .avatar { display: none; }
.sidebar-toggle { margin-inline-start: auto; }
.sidebar.collapsed .sidebar-toggle { margin-inline-start: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 26px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--primary-grad); display: grid; place-items: center; box-shadow: var(--shadow-glow); flex-shrink: 0; }
.brand-mark svg { width: 22px; height: 22px; color: #fff; }
.brand-text b { font-family: var(--font-display); font-size: 17px; font-weight: 800; display: block; line-height: 1.1; }
.brand-text span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-inline: 2px 6px;
  margin-inline: -2px -6px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.nav::-webkit-scrollbar-thumb:hover { background: rgba(15, 157, 110, 0.36); background-clip: padding-box; }
.nav-item {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 13px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: all 0.16s; position: relative;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); }
.nav-item.active { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-glow); }
.nav-item.active svg { opacity: 1; }
.nav-sub-item {
  margin-inline-start: 26px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 13px;
  background: rgba(15, 176, 131, 0.07);
  border: 1px solid rgba(15, 176, 131, 0.12);
}
.nav-sub-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -15px;
  top: -7px;
  width: 13px;
  height: calc(50% + 7px);
  border-inline-start: 2px solid rgba(15, 176, 131, 0.24);
  border-bottom: 2px solid rgba(15, 176, 131, 0.24);
  border-end-start-radius: 10px;
}
.nav-sub-item svg { width: 16px; height: 16px; }
.sidebar.collapsed .nav {
  align-items: center;
  gap: 8px;
  padding-inline: 0;
  margin-inline: 0;
  scrollbar-width: none;
}
.sidebar.collapsed .nav::-webkit-scrollbar { width: 0; height: 0; }
.sidebar.collapsed .nav-sub-item {
  width: 58px;
  min-height: 42px;
  margin-inline-start: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
}
.sidebar.collapsed .nav-sub-item::before { display: none; }
.sidebar.collapsed .nav-sub-item svg,
.sidebar.collapsed .nav-item svg {
  width: 20px;
  height: 20px;
  margin: 0;
  transform: none;
}
.nav-badge { margin-inline-start: auto; background: rgba(255, 255, 255, 0.28); padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.nav-item:not(.active) .nav-badge { background: var(--primary-soft); color: var(--primary-700); }

.sidebar-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 10px;
}
.night-mode-btn {
  width: 100%; min-height: 46px; margin-bottom: 12px; padding: 8px 9px;
  display: flex; align-items: center; gap: 10px;
  border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58); color: var(--ink-2);
  font-weight: 900; font-size: 12.5px; letter-spacing: 0;
  transition: background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.night-mode-btn:hover {
  background: rgba(255, 255, 255, 0.82); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.night-mode-btn.on {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.86));
  color: #fff; border-color: rgba(147, 197, 253, 0.28);
}
.night-mode-icon {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center; border-radius: 10px;
  background: rgba(15, 157, 110, 0.12); color: var(--primary);
}
.night-mode-btn.on .night-mode-icon { background: rgba(255,255,255,0.14); color: #fde68a; }
.night-mode-icon svg { width: 17px; height: 17px; }
.night-mode-text { flex: 1; text-align: start; }
.night-mode-switch {
  width: 34px; height: 20px; border-radius: 999px; position: relative;
  background: rgba(148, 163, 184, 0.32); flex: 0 0 34px;
}
.night-mode-switch::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2); transition: inset-inline-start 0.16s;
}
.night-mode-btn.on .night-mode-switch { background: rgba(20, 184, 166, 0.72); }
.night-mode-btn.on .night-mode-switch::after { inset-inline-start: 17px; }
body[dir=rtl] .night-mode-btn.on .night-mode-switch::after {
  inset-inline-start: auto; inset-inline-end: 17px;
}
.user-chip { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 13px; }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #d97706); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); flex-shrink: 0; }
.user-chip b { font-size: 14px; display: block; line-height: 1.2; }
.user-chip span { font-size: 11.5px; color: var(--ink-3); }
.logout-text {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 6px; padding: 5px 8px; border-radius: 9px;
  color: var(--ink-2); font-weight: 800; font-size: 10.5px;
  background: rgba(255,255,255,0.58); border: 1px solid var(--line);
}
.logout-text:hover { background: var(--danger-soft); color: var(--danger); border-color: rgba(226, 59, 59, 0.18); }
.logout-text svg { width: 12px; height: 12px; }

.icon-filter-btn {
  width: 52px;
  min-width: 52px;
  padding-inline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-filter-btn svg { width: 19px; height: 19px; }
.no-answer-sort-btn {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.18);
}
.no-answer-sort-btn:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(15, 157, 110, 0.12));
  color: #0f9d6e;
}

.sidebar-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 10px;
}
.night-mode-btn {
  width: 100%; min-height: 46px; margin-bottom: 12px; padding: 8px 9px;
  display: flex; align-items: center; gap: 10px;
  border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58); color: var(--ink-2);
  font-weight: 900; font-size: 12.5px; letter-spacing: 0;
  transition: background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.night-mode-btn:hover {
  background: rgba(255, 255, 255, 0.82); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.night-mode-btn.on {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.86));
  color: #fff; border-color: rgba(147, 197, 253, 0.28);
}
.night-mode-icon {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center; border-radius: 10px;
  background: rgba(15, 157, 110, 0.12); color: var(--primary);
}
.night-mode-btn.on .night-mode-icon { background: rgba(255,255,255,0.14); color: #fde68a; }
.night-mode-icon svg { width: 17px; height: 17px; }
.night-mode-text { flex: 1; text-align: start; }
.night-mode-switch {
  width: 34px; height: 20px; border-radius: 999px; position: relative;
  background: rgba(148, 163, 184, 0.32); flex: 0 0 34px;
}
.night-mode-switch::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2); transition: inset-inline-start 0.16s;
}
.night-mode-btn.on .night-mode-switch { background: rgba(20, 184, 166, 0.72); }
.night-mode-btn.on .night-mode-switch::after { inset-inline-start: 17px; }
body[dir=rtl] .night-mode-btn.on .night-mode-switch::after {
  inset-inline-start: auto; inset-inline-end: 17px;
}
.user-chip { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 13px; }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #d97706); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); flex-shrink: 0; }
.user-chip b { font-size: 14px; display: block; line-height: 1.2; }
.user-chip span { font-size: 11.5px; color: var(--ink-3); }
.logout-text {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 6px; padding: 5px 8px; border-radius: 9px;
  color: var(--ink-2); font-weight: 800; font-size: 10.5px;
  background: rgba(255,255,255,0.58); border: 1px solid var(--line);
}
.logout-text:hover { background: var(--danger-soft); color: var(--danger); border-color: rgba(226, 59, 59, 0.18); }
.logout-text svg { width: 12px; height: 12px; }

/* Main */
.main { flex: 1; min-width: 0; padding: 26px 32px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title h1 { font-size: 28px; }
.page-title p { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-presence-mini {
  min-height: 42px;
  max-width: 520px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 16px;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(16, 185, 129, .11), rgba(14, 165, 233, .08));
  border: 1px solid rgba(20, 184, 166, .2);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.team-presence-mini > span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
}
.team-presence-mini b {
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.team-presence-mini div {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.team-presence-mini i,
.team-presence-mini em {
  max-width: 160px;
  padding: 5px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  color: #0f513f;
  background: rgba(255,255,255,.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-presence-mini.empty > span { background: #94a3b8; box-shadow: 0 0 0 5px rgba(148, 163, 184, .16); }
.team-presence-mini.empty { color: #64748b; background: rgba(255,255,255,.72); border-color: var(--line); }
.scroll-bottom-btn {
  width: 52px;
  min-width: 52px;
  padding-inline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.scroll-bottom-btn svg {
  width: 20px;
  height: 20px;
}

.hamburger { display: none; }

/* ===================== CARDS ===================== */
.glass {
  background: var(--surface); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card { padding: 20px 22px; position: relative; overflow: hidden; animation: rise 0.5s both; }
.stat-card::after { content: ''; position: absolute; inset-block-start: -40px; inset-inline-end: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--accent); opacity: 0.06; }
.stat-card .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px; }
.stat-card .ic svg { width: 22px; height: 22px; }
.stat-card .val { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; }
.stat-card .lbl { color: var(--ink-2); font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.dashboard-filter-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.dashboard-range-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dashboard-range-btn {
  border: 1px solid var(--line); background: rgba(248,250,252,.92); color: var(--ink-2);
  border-radius: 14px; padding: 10px 15px; font-weight: 900; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.dashboard-range-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.dashboard-range-btn.active {
  border-color: transparent; color: #fff; background: linear-gradient(135deg, #0fb083, #2e82b1);
  box-shadow: 0 12px 28px rgba(15,176,131,.18);
}
.dashboard-custom-range { display: none; align-items: end; gap: 10px; flex-wrap: wrap; }
.dashboard-custom-range.show { display: flex; }
.dashboard-custom-range label { color: var(--ink-2); font-weight: 900; display: grid; gap: 6px; min-width: 150px; }
.dashboard-custom-range label small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 850;
}
.dashboard-date-picker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 360px);
  padding: 10px 12px;
  border: 1px solid rgba(15, 176, 131, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 176, 131, .08), rgba(46, 130, 177, .08));
}
.dashboard-date-picker-card > span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #0f9d6e;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 176, 131, .12);
}
.dashboard-date-picker-card svg { width: 19px; height: 19px; }
.dashboard-date-picker-card b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}
.dashboard-date-picker-card small {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 850;
  margin-top: 2px;
}
.dashboard-range-picker {
  min-width: 260px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 950;
  color: var(--ink);
  background: #fff;
}
.dashboard-range-picker svg {
  width: 18px;
  height: 18px;
  color: #0f9d6e;
}
.dashboard-range-preview {
  margin: 10px 0 6px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(15, 176, 131, .10), rgba(46, 130, 177, .08));
  border: 1px solid rgba(15, 176, 131, .18);
  font-weight: 950;
  text-align: center;
}
.custom-calendar-day.range-in {
  background: #dcfce7;
  color: #047857;
}
.custom-calendar-day.range-edge {
  color: #fff;
  background: linear-gradient(135deg, #0fb083, #2e82b1);
  box-shadow: 0 7px 16px rgba(15, 176, 131, .26);
}
.ad-campaigns-panel {
  padding: 18px;
  margin-bottom: 22px;
}
.ad-campaigns-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ad-campaigns-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 950;
}
.ad-campaigns-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 800;
}
.campaign-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: #fff;
}
.campaign-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}
.campaign-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 12px;
  color: var(--ink-2);
  background: #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, .2);
  font-size: 12px;
  font-weight: 950;
  text-align: start;
  white-space: nowrap;
}
.campaign-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.campaign-table tbody tr:last-child td {
  border-bottom: 0;
}
.campaign-row {
  transition: background .16s ease;
}
.campaign-row:hover {
  background: #f8fafc;
}
.campaign-row.tone-red {
  background: #fff1f2;
}
.campaign-row.tone-orange {
  background: #fff7ed;
}
.campaign-row.tone-green {
  background: #ecfdf5;
}
.campaign-row.paused {
  opacity: .62;
}
.campaign-row td:first-child {
  min-width: 360px;
}
.campaign-note-input {
  width: 220px;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 900;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.campaign-note-input:focus {
  background: #fff;
  border-color: rgba(20, 184, 166, .55);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .12);
}
.campaign-num {
  text-align: center;
  font-size: 16px !important;
  font-weight: 950 !important;
  color: #0f172a !important;
}
.campaign-num.strong {
  color: #047857 !important;
  font-size: 17px !important;
}
.campaign-info-cell {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.campaign-info-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.campaign-row td:first-child b,
.campaign-info-top b {
  display: block;
  font-size: 13.5px;
  font-weight: 950;
  color: var(--ink);
}
.campaign-info-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.campaign-info-meta span,
.campaign-comment-chip {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  overflow: visible;
  text-overflow: ellipsis;
  border-radius: 999px;
  padding: 6px 10px;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, .22);
  font-size: 11px;
  font-weight: 900;
}
.campaign-info-meta .campaign-link {
  max-width: 300px;
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.campaign-comment-chip {
  max-width: 360px;
  color: #7c2d12;
  background: #ffedd5;
  border-color: #fed7aa;
}
.campaign-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.campaign-toggle-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 950;
  cursor: pointer;
}
.campaign-ocost,
.campaign-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-width: 58px;
  padding: 6px 10px;
  background: rgba(255,255,255,.8);
  color: var(--ink-2);
  border: 1px solid rgba(148, 163, 184, .18);
  font-size: 11px;
  font-weight: 950;
}
.campaign-row.tone-red .campaign-ocost { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.campaign-row.tone-orange .campaign-ocost { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.campaign-row.tone-green .campaign-ocost { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.campaign-state.on { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.campaign-state.off { background: #e2e8f0; color: #64748b; border-color: #cbd5e1; }
.campaign-empty {
  min-height: 150px;
}
.campaign-chart-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(148, 163, 184, .28);
  flex-wrap: wrap;
}
.campaign-chart-row label {
  min-width: 260px;
  display: grid;
  gap: 7px;
  color: var(--ink-2);
  font-weight: 950;
}
.campaign-chart-title {
  display: grid;
  gap: 3px;
  text-align: end;
}
.campaign-chart-title b {
  color: var(--ink);
  font-weight: 950;
}
.campaign-chart-title span {
  color: var(--ink-3);
  font-weight: 900;
}
.campaign-days-chart {
  height: 260px;
  margin-top: 12px;
}
.confirmed-days-card { margin-bottom: 22px; }
.confirmed-days-chart { height: 280px; }
.reclamations-panel { padding: 16px; }
.reclamations-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.reclamations-head > div {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 900;
}
.reclamations-head b {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
  border-radius: 14px; color: #fff; background: linear-gradient(135deg, #7c3aed, #0ea5e9);
  box-shadow: 0 14px 30px rgba(124,58,237,.18);
}
.reclamations-head .input { max-width: 360px; }
.reclamation-type-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 120px;
  border-radius: 999px; padding: 7px 12px; background: #ede9fe; color: #6d28d9;
  border: 1px solid #ddd6fe; font-weight: 950;
}
.reclamation-comment-cell { max-width: 360px; white-space: normal; line-height: 1.7; }
.ic-green { background: var(--success-soft); color: var(--success); }
.ic-red { background: var(--danger-soft); color: var(--danger); }
.ic-purple { background: #efe9ff; color: #7c3aed; }
.ic-gold { background: var(--accent-soft); color: #c67c0a; }
.ic-blue { background: #e4eefe; color: #2563eb; }
.ic-gray { background: #eef1f5; color: #64748b; }
.ic-teal { background: #def4f0; color: #0d9488; }

.dash-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 22px; }
.chart-card { padding: 22px; }
.chart-card h3 { font-size: 16px; margin-bottom: 4px; }
.chart-card .muted { color: var(--ink-3); font-size: 12.5px; margin-bottom: 16px; }
.chart-box { position: relative; height: 260px; }

/* ===================== TABLE ===================== */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.bulk-action-row { display: flex; justify-content: flex-start; margin: -4px 0 14px; }
.mode-banner {
  min-height: 52px; display: flex; align-items: center; justify-content: center;
  margin: -4px 0 14px; border-radius: 14px;
  background: var(--header-bg, #ea8c34); color: #fff;
  font-size: 20px; font-weight: 950; box-shadow: 0 14px 30px rgba(15, 27, 45, 0.12);
}
.mode-banner.variable-mode-banner {
  background: #269E05;
  border: 2px solid #269E05;
  box-shadow: 0 14px 30px rgba(38, 158, 5, 0.18);
}
.wa-copy-row { display: flex; justify-content: flex-start; margin: -4px 0 14px; }
.copy-phones-btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 10px 15px; border-radius: 14px;
  background: #fff; color: var(--ink); border: 1.5px solid rgba(15, 157, 110, 0.28);
  font-size: 14px; font-weight: 900; box-shadow: 0 12px 26px rgba(15, 157, 110, 0.12);
}
.copy-phones-btn svg { width: 17px; height: 17px; color: #0f9d6e; }
.copy-phones-btn b {
  min-width: 24px; height: 24px; display: inline-grid; place-items: center;
  border-radius: 999px; background: #0f9d6e; color: #fff; font-size: 12px;
}
.copy-phones-btn:hover { background: #f0fdf4; border-color: rgba(15, 157, 110, 0.48); }
.bulk-menu-wrap { position: relative; }
.bulk-action-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px;
  padding: 10px 16px; border-radius: 14px; background: linear-gradient(135deg, #0f9d6e, #2f80ed);
  color: #fff; font-weight: 900; box-shadow: 0 12px 28px rgba(47,128,237,0.22);
}
.ticket-bulk-btn {
  min-height: 46px; padding: 8px 10px 8px 14px; border-radius: 999px; gap: 9px;
  background: linear-gradient(135deg, #269E05, #0FB083);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 16px 34px rgba(38, 158, 5, 0.26);
}
.ticket-bulk-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1f8504, #0ea071);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 38px rgba(38, 158, 5, 0.32);
}
.ticket-bulk-btn .bulk-count-dot {
  min-width: 24px; height: 24px; display: inline-grid; place-items: center;
  border-radius: 999px; background: #fff; color: #269E05; font-size: 12px; font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(38, 158, 5, 0.08);
}
.ticket-bulk-btn b {
  width: 28px; height: 28px; display: inline-grid; place-items: center;
  border-radius: 999px; background: rgba(255,255,255,0.18); color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
}
.ticket-bulk-btn .chev-down {
  width: 17px; height: 17px; transition: transform 0.16s ease;
}
.bulk-menu-wrap.open .ticket-bulk-btn .chev-down,
.ticket-bulk-btn[aria-expanded="true"] .chev-down {
  transform: rotate(180deg);
}
.variable-download-btn {
  min-height: 46px; padding: 11px 18px;
  background: linear-gradient(135deg, #059669, #16a34a);
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.24);
}
.variable-download-btn:hover { background: linear-gradient(135deg, #047857, #16a34a); transform: translateY(-1px); }
.bulk-action-btn svg { width: 17px; height: 17px; }
.bulk-action-btn b { font-size: 16px; line-height: 1; }
.bulk-menu {
  display: none; position: absolute; z-index: 45; top: calc(100% + 8px); inset-inline-start: 0;
  min-width: 230px; padding: 8px; border-radius: 16px; background: rgba(255,255,255,0.98);
  border: 1px solid rgba(148,163,184,0.28); box-shadow: 0 18px 44px rgba(15,27,45,0.16);
}
.bulk-menu.show { display: grid; gap: 6px; }
.bulk-menu button {
  min-height: 38px; border-radius: 12px; padding: 8px 12px; text-align: start;
  background: #f8fafc; color: var(--ink); font-size: 13px; font-weight: 900;
}
.bulk-menu button:hover { background: #fff7ed; color: #9a4b0f; }
.bulk-confirm-text {
  padding: 14px; border-radius: 14px; background: #f8fafc; color: var(--ink-2);
  font-size: 14px; font-weight: 800; line-height: 1.7;
}
.danger-modal-head h2 { color: #dc2626; }
.move-confirm-danger-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  color: #dc2626;
  background: #fee2e2;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.17);
}
.move-confirm-danger-icon svg { width: 29px; height: 29px; }
.move-confirm-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 14px;
  background: #fffafa;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.move-confirm-checkbox:hover { border-color: #dc2626; background: #fff1f2; }
.move-confirm-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.move-confirm-checkbox-box {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 2px solid #fca5a5;
  border-radius: 9px;
  color: transparent;
  background: #fff;
  transition: all .2s ease;
}
.move-confirm-checkbox-box svg { width: 17px; height: 17px; }
.move-confirm-checkbox input:checked + .move-confirm-checkbox-box {
  color: #fff;
  border-color: #dc2626;
  background: #dc2626;
  box-shadow: 0 6px 15px rgba(220, 38, 38, .25);
}
.move-confirm-checkbox:has(input:checked) {
  border-color: #dc2626;
  background: #fff1f2;
  box-shadow: 0 0 0 3px rgba(220,38,38,.09);
}
.move-confirm-checkbox-copy { display: grid; gap: 2px; }
.move-confirm-checkbox-copy b { color: #991b1b; font-size: 13px; font-weight: 950; }
.move-confirm-checkbox-copy small { color: #64748b; font-size: 12px; font-weight: 800; }
.sub-empty {
  min-height: 310px; display: grid; place-items: center; align-content: center; gap: 10px;
  margin-top: 8px; padding: 38px 22px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(248,250,252,0.84));
  border: 1px dashed rgba(100, 116, 139, 0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  text-align: center;
}
.sub-empty-icon {
  width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fff7ed, #ecfdf5);
  color: #0f9d6e; box-shadow: 0 16px 34px rgba(15, 157, 110, 0.12);
}
.sub-empty-icon svg { width: 32px; height: 32px; }
.sub-empty h3 { font-size: 20px; font-weight: 950; color: var(--ink); }
.sub-empty p {
  max-width: 560px; color: var(--ink-2); font-size: 14px; font-weight: 800;
  line-height: 1.9;
}
.pdf-links { gap: 10px; margin-top: 14px; }
.pdf-download-link {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid rgba(234, 140, 52, 0.28); background: #fff7ed;
  color: #9a4b0f; font-size: 14px; font-weight: 900; text-decoration: none;
}
.pdf-download-link svg { width: 17px; height: 17px; }
.pdf-download-link:hover { background: #ffedd5; }
.retours-card { padding: 18px; }
.retours-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.retour-tab {
  min-height: 38px; border-radius: 13px; padding: 8px 13px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 900; cursor: pointer;
}
.retour-tab.active { background: #dcfce7; color: #15803d; border-color: #86efac; box-shadow: 0 10px 22px rgba(22, 163, 74, .12); }
.retour-bon-row { cursor: pointer; transition: background .16s ease, transform .16s ease; }
.retour-bon-row:hover { background: #f0fdf4 !important; transform: translateY(-1px); }
.retour-bon-row td:first-child b { display: block; font-weight: 950; color: var(--ink); }
.retour-bon-row td:first-child small { display: block; color: var(--ink-3); font-weight: 800; margin-top: 2px; }
.retour-status-dot { width: 9px; height: 9px; display: inline-block; border-radius: 99px; background: #0ea5e9; margin-inline-end: 7px; }
.retour-details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; max-height: 560px; overflow: auto; padding: 2px; }
.retour-parcel-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 13px; display: grid; gap: 5px; }
.retour-parcel-card.matched { background: #ecfdf5; border-color: #86efac; box-shadow: 0 12px 24px rgba(22, 163, 74, .12); }
.retour-parcel-card.broken { background: #fff7ed; border-color: #fdba74; box-shadow: 0 12px 24px rgba(249, 115, 22, .14); }
.retour-parcel-card.broken:after {
  content: "مكسورة";
  justify-self: start; border-radius: 999px; background: #fed7aa; color: #9a3412;
  border: 1px solid #fb923c; padding: 4px 10px; font-weight: 950; font-size: 12px;
}
.retour-parcel-card b { font-size: 15px; color: var(--ink); }
.retour-parcel-card span { font-weight: 900; color: var(--ink); }
.retour-parcel-card small, .retour-parcel-card p { color: var(--ink-2); font-weight: 800; margin: 0; }
.retour-parcel-card em { justify-self: start; border-radius: 999px; background: #fee2e2; color: #b91c1c; padding: 4px 9px; font-style: normal; font-weight: 900; font-size: 12px; }
.retour-extra-wrap {
  margin: 0 0 14px; padding: 13px; border-radius: 18px;
  background: #fff7f7; border: 1px solid #fecaca;
}
.retour-extra-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.retour-extra-title b { color: #991b1b; font-weight: 950; }
.retour-extra-title span { color: #b91c1c; font-size: 12px; font-weight: 850; }
.retour-extra-grid { max-height: none; overflow: visible; }
.retour-parcel-card.retour-extra-card {
  background: #fee2e2; border-color: #f87171; box-shadow: 0 12px 24px rgba(239, 68, 68, .12);
}
.retour-parcel-card.retour-extra-card.confirmed {
  background: #ecfdf5; border-color: #86efac; box-shadow: 0 12px 24px rgba(22, 163, 74, .12);
}
.retour-parcel-card.retour-extra-card.broken .confirm-extra-scan { display: none; }
.retour-parcel-card.retour-extra-card.broken:after {
  content: "مكسورة";
  justify-self: start; border-radius: 999px; background: #fff7ed; color: #9a3412;
  border: 1px solid #fdba74; padding: 5px 10px; font-weight: 950; font-size: 12px;
}
.retour-extra-card .confirm-extra-scan { justify-self: start; min-height: 36px; padding: 7px 12px; border-radius: 12px; }
.retour-arrived-banner {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 12px 14px;
  border-radius: 14px; background: #dcfce7; color: #166534; font-weight: 900;
  border: 1px solid #86efac;
}
.retour-arrived-banner svg { width: 18px; height: 18px; }
.retour-problem-banner {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 12px 14px;
  border-radius: 14px; background: #fee2e2; color: #991b1b; font-weight: 950;
  border: 1px solid #fca5a5;
}
.retour-problem-banner svg { width: 18px; height: 18px; }
.retour-confirm-actions {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px;
  border-radius: 16px; background: rgba(22, 163, 74, .08); border: 1px solid rgba(22, 163, 74, .18);
}
.retour-confirm-actions p { margin: 0; color: var(--ink-2); font-weight: 850; font-size: 13px; }
.retour-problem-box {
  display: grid; gap: 9px; margin: 0 0 14px; padding: 12px;
  border-radius: 16px; background: #fff7f7; border: 1px solid #fecaca;
}
.retour-problem-box[hidden] { display: none; }
.retour-problem-box label { font-weight: 950; color: #991b1b; }
.retour-scan-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px;
  padding: 14px; border-radius: 18px; background: #f8fafc; border: 1px solid var(--line);
}
.retour-scan-box h3 { margin: 0 0 4px; font-size: 18px; }
.retour-scan-box p { margin: 0 0 8px; color: var(--ink-2); font-weight: 800; }
.retour-scan-box a { color: #0f766e; font-weight: 900; }
.retour-scan-link { width: fit-content; }
.retour-qr { width: 150px; height: 150px; border-radius: 16px; background: #fff; padding: 8px; box-shadow: var(--shadow-sm); }
.retour-qr-fallback {
  width: 150px;
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 16px;
  padding: 14px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-weight: 900;
  line-height: 1.7;
}
.retour-arrived-row { background: #f0fdf4; }
.retour-not-arrived-row { background: #fff7ed; }
.arrived-status-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 72px;
  border-radius: 999px; padding: 6px 12px; background: #dcfce7; color: #15803d;
  border: 1px solid #86efac; font-weight: 950;
}
.problem-status-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 92px;
  border-radius: 999px; padding: 6px 12px; background: #fee2e2; color: #b91c1c;
  border: 1px solid #fca5a5; font-weight: 950;
}
.pending-return-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 90px;
  border-radius: 999px; padding: 6px 12px; background: #ffedd5; color: #c2410c;
  border: 1px solid #fdba74; font-weight: 950;
}
.broken-count-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px;
  border-radius: 999px; padding: 6px 12px; background: #fee2e2; color: #dc2626;
  border: 1px solid #fecaca; font-weight: 950;
}
.vt-add-row { display: flex; gap: 10px; margin: 14px 0; }
.vt-add-row .input { flex: 1; }
.vt-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.vt-template-card { border: 1px solid var(--line); background: rgba(248,250,252,.92); border-radius: 14px; padding: 12px; text-align: start; cursor: pointer; transition: all .2s ease; }
.vt-template-card b { display: block; color: #0f172a; font-weight: 900; margin-bottom: 4px; }
.vt-template-card span { color: var(--ink-3); font-weight: 800; font-size: 12px; }
.vt-template-card.active { border-color: #16a34a; background: #ecfdf5; box-shadow: 0 10px 24px rgba(22,163,74,.16); }
.vt-template-preview { margin: 10px auto 14px; max-width: 260px; border: 1px solid var(--line); border-radius: 16px; padding: 10px; background: #fff; box-shadow: var(--shadow-soft); }
.vt-template-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.empty-pdf-btn { margin-top: 16px; background: linear-gradient(135deg, #059669, #16a34a); border: 0; color: #fff; }
.vt-items { display: grid; gap: 12px; max-height: 380px; overflow: auto; padding-inline-end: 4px; }
.vt-group {
  display: grid; gap: 8px; padding: 10px; border-radius: 14px;
  background: #fff; border: 1px solid rgba(148,163,184,0.24);
}
.vt-group > b { color: #9a4b0f; font-size: 13px; }
.vt-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 42px; padding: 8px 10px; border-radius: 12px;
  background: #f8fafc; color: var(--ink); font-weight: 900;
}
.vt-remove {
  width: 31px; height: 31px; display: grid; place-items: center;
  border-radius: 10px; background: #fee2e2; color: #b91c1c;
}
.vt-remove svg { width: 15px; height: 15px; }
.return-warning {
  margin-top: 12px; padding: 11px 13px; border-radius: 12px;
  background: #fee2e2; color: #991b1b; font-weight: 900; text-align: center;
}
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box > svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search-box input { width: 100%; padding: 11px 14px; padding-inline-start: 42px; padding-inline-end: 48px; border-radius: 13px; border: 1.5px solid var(--line); background: rgba(255,255,255,0.8); outline: none; transition: all 0.16s; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #fff; }
.search-action {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 31px; height: 31px; border: 0; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer;
  background: #f1f5f9; color: var(--ink-3);
  transition: transform .16s ease, background .16s ease, color .16s ease, opacity .16s ease;
}
.search-action svg { width: 15px; height: 15px; }
.search-action:hover { transform: translateY(-50%) scale(1.04); background: #e0f2fe; color: var(--primary-700); }
.search-clear { inset-inline-end: 10px; opacity: 0; pointer-events: none; }
.search-clear.show { opacity: 1; pointer-events: auto; }

.filter-select { padding: 10px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255,255,255,0.8); font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; outline: none; }
.filter-select:focus { border-color: var(--primary); }
.whatsapp-filter { display: inline-flex; align-items: center; gap: 8px; }
.whatsapp-filter svg { width: 17px; height: 17px; }
.whatsapp-filter.active { background: #ea8c34; color: #fff; border-color: #ea8c34; }
.section-suivi_no_answer .wa-status-cell {
  position: relative;
}
.section-suivi_no_answer .wa-status-cell .wa-menu {
  top: 54px;
  inset-inline: 14px;
  z-index: 80;
}
.variable-filter-btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 11px 18px; border-radius: 16px;
  border-color: #269E05;
  background: linear-gradient(135deg, #059669, #16a34a);
  color: #fff; font-size: 14px; font-weight: 950;
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.24);
}
.variable-filter-btn svg { width: 18px; height: 18px; color: #fff; }
.variable-filter-btn:hover { background: linear-gradient(135deg, #047857, #16a34a); transform: translateY(-1px); }
.suivi-sub-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-color: rgba(46, 130, 177, 0.28);
  background: linear-gradient(135deg, rgba(46, 130, 177, 0.12), rgba(15, 176, 131, 0.12));
  color: #155e75;
  font-weight: 900;
}
.suivi-sub-btn svg { width: 17px; height: 17px; }
.suivi-sub-btn:hover {
  border-color: rgba(15, 176, 131, 0.44);
  background: linear-gradient(135deg, rgba(46, 130, 177, 0.18), rgba(15, 176, 131, 0.2));
  transform: translateY(-1px);
}
.back-main-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff5f5; color: #b91c1c; border-color: rgba(220, 38, 38, 0.28);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.08);
}
.back-main-btn svg { width: 16px; height: 16px; }
.back-main-btn:hover {
  background: #fee2e2; color: #991b1b; border-color: rgba(220, 38, 38, 0.42);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.12);
}

.table-card {
  padding: 20px; min-height: calc(100vh - 148px);
  display: flex; flex-direction: column; overflow: visible;
}
.table-card #tbl-area { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.table-card .table-wrap { flex: 1; min-height: calc(100vh - 286px); max-height: none; }
.table-wrap { overflow: visible; border-radius: var(--radius); max-height: none; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
table.data thead {
  position: static;
}
table.data thead th {
  position: relative; background: rgba(248, 250, 253, 0.96); backdrop-filter: blur(8px);
  text-align: start; font-weight: 700; color: var(--ink-2); padding: 14px 14px; white-space: nowrap;
  border-bottom: 1.5px solid var(--line); border-inline-end: 1px solid rgba(148, 163, 184, 0.28); font-size: 13.5px;
}
.table-card table.data thead th {
  background: var(--header-bg, #ea8c34); color: #fff;
}
table.data thead th.delivery-head {
  background: var(--header-bg, #ea8c34); color: #fff;
}
table.data thead th.resizable-col {
  user-select: none;
}
.col-resizer {
  position: absolute;
  inset-block: 10px;
  inset-inline-end: -5px;
  width: 10px;
  cursor: col-resize;
  z-index: 8;
  border-radius: 999px;
}
.col-resizer::before {
  content: "";
  position: absolute;
  inset-block: 7px;
  inset-inline-start: 4px;
  width: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 0 0 1px rgba(15,23,42,.06);
  transition: background .16s ease, transform .16s ease;
}
.resizable-col:hover .col-resizer::before,
table.data.is-resizing .col-resizer::before {
  background: #ffffff;
  transform: scaleY(1.18);
}
body.resizing-column {
  cursor: col-resize !important;
  user-select: none;
}
body.resizing-column * {
  cursor: col-resize !important;
}
.whatsapp-data thead th.whatsapp-head,
.whatsapp-data tbody td.whatsapp-cell {
  width: 150px; min-width: 150px; max-width: 150px;
}
table.data thead th.select-head,
table.data tbody td.select-cell,
.whatsapp-data thead th.select-head,
.whatsapp-data tbody td.select-cell {
  width: 46px; min-width: 46px; max-width: 46px; text-align: center;
}
table.data th.select-head input[type="checkbox"],
table.data td.select-cell input[type="checkbox"] {
  width: 28px; height: 28px; margin: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  border-radius: 10px; border: 2px solid #cbd5e1;
  background: transparent; box-shadow: none;
  display: inline-grid; place-items: center; vertical-align: middle;
  position: relative; overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
table.data th.select-head input[type="checkbox"]:hover,
table.data td.select-cell input[type="checkbox"]:hover {
  border-color: #2E82B1;
  transform: scale(1.03);
}
table.data th.select-head input[type="checkbox"]:checked,
table.data td.select-cell input[type="checkbox"]:checked {
  border-color: #0FB083;
  background:
    linear-gradient(135deg, #2E82B1, #0FB083);
  transform: scale(1);
}
table.data th.select-head input[type="checkbox"]:checked::after,
table.data td.select-cell input[type="checkbox"]:checked::after {
  content: ''; width: 11px; height: 6px;
  border-inline-start: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg);
  margin-top: -2px;
  position: relative; z-index: 1;
  animation: checkboxCheck 0.4s 0.05s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.cb-wrap {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer; vertical-align: middle;
}
table.data th.select-head .cb-wrap input[type="checkbox"],
table.data td.select-cell .cb-wrap input[type="checkbox"] {
  position: absolute; inset: 0; width: 24px; height: 24px;
  opacity: 0; margin: 0; cursor: pointer; z-index: 2;
  appearance: none; -webkit-appearance: none;
}
table.data th.select-head .cb-wrap input[type="checkbox"]::after,
table.data td.select-cell .cb-wrap input[type="checkbox"]::after { content: none; }
.cb-bg {
  width: 24px; height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.cb-bg::before {
  content: ""; position: absolute; inset: 0;
  background: #000;
  transform: scale(0);
  border-radius: 50%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cb-wrap input[type="checkbox"]:checked + .cb-bg { border-color: #000; }
.cb-wrap input[type="checkbox"]:checked + .cb-bg::before { transform: scale(2.5); }
.cb-wrap:hover input[type="checkbox"]:not(:checked) + .cb-bg {
  border-color: #000;
  transform: scale(1.08);
}
.cb-svg {
  width: 13px; height: 13px;
  stroke: #fff; stroke-width: 3.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  position: relative; z-index: 1;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.4s 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.cb-wrap input[type="checkbox"]:checked + .cb-bg .cb-svg { stroke-dashoffset: 0; }
table.data thead th.order-id-head,
table.data tbody td.order-id-cell {
  width: var(--col-order, 42px); min-width: var(--col-order, 42px); max-width: var(--col-order, 42px);
}
table.data tbody td.order-id-cell {
  padding: 12px 6px; text-align: center; color: var(--ink-3); font-size: 12px;
  font-variant-numeric: tabular-nums;
}
table.data thead th.info-head,
table.data tbody td.info-cell {
  width: var(--col-info, 52px); min-width: var(--col-info, 52px); max-width: var(--col-info, 52px);
}
table.data thead th.price-head,
table.data tbody td.price-cell {
  width: var(--col-price, 76px); min-width: var(--col-price, 76px); max-width: var(--col-price, 76px);
}
table.data thead th.phone-head,
table.data tbody td.phone-cell {
  width: var(--col-phone, 160px); min-width: var(--col-phone, 160px); max-width: var(--col-phone, 160px);
}
table.data thead th.name-head,
table.data tbody td.name-cell {
  width: var(--col-name, 150px); min-width: var(--col-name, 150px); max-width: var(--col-name, 150px);
}
table.data thead th.address-head,
table.data tbody td.address-cell {
  width: var(--col-address, 118px); min-width: var(--col-address, 118px); max-width: var(--col-address, 118px);
}
table.data thead th.city-head,
table.data tbody td.city-cell {
  width: var(--col-city, 92px); min-width: var(--col-city, 92px); max-width: var(--col-city, 92px);
}
table.data thead th.product-head,
table.data tbody td.product-cell {
  width: var(--col-product, 220px); min-width: var(--col-product, 220px); max-width: var(--col-product, 220px);
}
table.data thead th.delivery-head,
table.data thead th.dnote-head,
table.data tbody td.dnote-cell {
  width: var(--col-delivery, 120px); min-width: var(--col-delivery, 120px); max-width: var(--col-delivery, 120px);
}
table.data thead th.livreur-head,
table.data tbody td.livreur-cell {
  width: 180px; min-width: 180px; max-width: 180px;
}
table.data thead th.delivery-status-head,
table.data tbody td.delivery-status-cell {
  width: 210px; min-width: 210px; max-width: 210px;
}
.delivery-status-box {
  display: grid; gap: 3px; padding: 9px 11px; text-align: start;
  border-radius: 12px; background: rgba(255,255,255,0.58);
}
.delivery-status-box b { font-size: 13.5px; font-weight: 900; color: var(--ink); line-height: 1.25; }
.delivery-status-box small { font-size: 11.5px; font-weight: 800; color: var(--ink-3); line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.delivery-status-box time { font-size: 10.5px; font-weight: 800; color: #0f9d6e; }
.new-destination-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 4px;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: linear-gradient(135deg, #dcfce7, #ecfdf5);
  color: #15803d;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 1000;
}
.livreur-comment-text {
  padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px; cursor: default;
}
table.data tbody td.status-cell {
  width: var(--col-status, 164px); min-width: var(--col-status, 164px); max-width: var(--col-status, 164px);
}
table.data thead th:last-child {
  width: var(--col-status, 164px); min-width: var(--col-status, 164px); max-width: var(--col-status, 164px);
}
table.data thead th:last-child,
table.data tbody td:last-child { border-inline-end: none; }
table.data tbody td {
  padding: 0; border-bottom: 1px solid var(--line); border-inline-end: 1px solid rgba(148, 163, 184, 0.28);
  vertical-align: middle; font-weight: 700; text-align: center; background: var(--row-bg, transparent);
}
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:focus-within td { background: var(--editing-bg, #dedede); }
table.data tbody tr.wa-selected td { background: var(--editing-bg, #dedede); }
table.data.section-ticket tbody tr.wa-selected td { background: #999a99; }
table.data tbody tr:hover td {
  background: color-mix(in srgb, var(--row-bg, #ffffff) 82%, #dbeafe) !important;
}
table.data tbody tr[style*="--row-bg"] td,
table.data tbody tr[style*="--row-bg"] .sheet-input,
table.data tbody tr[style*="--row-bg"] .cell-name,
table.data tbody tr[style*="--row-bg"] .cell-phone,
table.data tbody tr[style*="--row-bg"] .cell-price {
  color: #0f172a;
}
table.data tbody tr.empty-sheet-row td {
  height: 42px; background: rgba(255, 255, 255, 0.34); color: var(--ink-3);
}
table.data tbody tr.empty-sheet-row:hover td { background: rgba(255, 255, 255, 0.52); }
.cell-name { font-weight: 700; color: var(--ink); }
.cell-phone { font-variant-numeric: tabular-nums; direction: ltr; text-align: center; color: var(--ink-2); font-weight: 800; }
.phone-cell { position: relative; overflow: hidden; }
.phone-cell:hover { overflow: visible; z-index: 8; }
.phone-cell.has-phone-badges {
  padding-block: 3px 6px;
}
.phone-cell.has-phone-badges .cell-phone {
  padding-block: 8px 4px;
}
.phone-badges {
  width: calc(100% - 12px);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  position: relative;
  z-index: 3;
}
.whatsapp-sent-badge {
  border-color: #86efac !important;
  background: #dcfce7 !important;
  color: #047857 !important;
}
.whatsapp-failed-badge {
  border-color: #fecaca !important;
  background: #fee2e2 !important;
  color: #b91c1c !important;
}
.phone-whatsapp-unread-icon {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  color: #16a34a;
  background: transparent;
  box-shadow: none !important;
  cursor: pointer;
}
.phone-whatsapp-unread-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}
.phone-whatsapp-unread-icon:hover {
  color: #047857;
  background: rgba(22, 163, 74, .08);
}
.phone-warning-badge {
  min-height: 22px;
  width: auto;
  min-width: 48px;
  padding: 3px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ef4444;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1.25;
  text-align: center;
  cursor: help;
  position: relative;
  z-index: 4;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cross-search-alert {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(236, 253, 245, 0.88));
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}
.cross-search-alert.cross-search-empty {
  border-color: rgba(239, 68, 68, 0.18);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.94), rgba(255, 247, 237, 0.9));
}
.cross-search-empty .cross-search-icon {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.18);
}
.cross-search-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--primary-grad);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  box-shadow: var(--shadow-glow);
}
.cross-search-icon svg { width: 19px; height: 19px; }
.cross-search-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 0 0 auto;
}
.cross-search-text b {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 950;
}
.cross-search-text span {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 800;
}
.cross-search-list {
  margin-inline-start: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
}
.cross-search-chip,
.cross-search-more {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(15, 176, 131, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 253, 245, 0.9));
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.cross-search-chip {
  cursor: pointer;
}
.cross-search-chip:hover {
  border-color: rgba(15, 176, 131, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.14);
}
.cross-search-chip em {
  min-width: 25px;
  height: 25px;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  display: inline-grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
}
.phone-duplicate-badge {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #9a4f14;
  cursor: pointer;
}
.phone-suivi-badge {
  border-color: #0f8f76;
  background: linear-gradient(135deg, #dcfce7, #dbeafe);
  color: #08715f;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
.phone-relance-badge {
  border-color: #7c3aed;
  background: linear-gradient(135deg, #ede9fe, #fdf2f8);
  color: #5b21b6;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
}
.phone-replaced-badge {
  border-color: #16a34a;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
}
.phone-exchange-badge {
  min-width: 62px;
  border-color: #10b981;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.78), 0 6px 16px rgba(16,185,129,.16);
}
.phone-exchange-badge::before,
.phone-exchange-badge::after {
  display: none !important;
  content: none !important;
}
.phone-replaced-badge::before,
.phone-replaced-badge::after {
  display: none;
}
.phone-relance-badge::before,
.phone-relance-badge::after {
  display: none;
}
.phone-warning-badge span {
  white-space: nowrap;
}
.phone-warning-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(15, 23, 42, .14);
  z-index: 20;
}
.relance-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.relance-modal-body { background: linear-gradient(180deg, #f8fbff 0%, #ffffff 56%); }
.relance-hero {
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
  color: #0f172a;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .08);
}
.relance-hero .relance-hero-icon {
  background: linear-gradient(135deg, #2563eb, #10b981);
  color: #fff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .2);
}
.relance-hero b { color: #0f172a; font-size: 15px; }
.relance-hero span { color: #475569; line-height: 1.7; }
.relance-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0 2px;
}
.relance-flow span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe5f1;
  color: #334155;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}
.relance-flow div {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #16a34a, #0fb083);
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 176, 131, .24);
}
.relance-flow svg {
  width: 21px;
  height: 21px;
  animation: relanceArrowNudge 1.45s ease-in-out infinite;
}
@keyframes relanceArrowNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}
.relance-order-card {
  border: 1px solid #dbe5f1;
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  padding: 16px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, .07);
  position: relative;
  overflow: hidden;
}
.relance-order-card:before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #10b981);
}
.relance-order-card.return-card:before { background: linear-gradient(90deg, #f97316, #ef4444); }
.relance-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}
.relance-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #2563eb;
}
.relance-order-card.return-card .relance-card-icon { background: #fff7ed; color: #ea580c; }
.relance-card-icon svg { width: 20px; height: 20px; }
.relance-order-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}
.relance-card-head p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.relance-order-grid {
  display: grid;
  gap: 10px;
}
.relance-order-grid div {
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 10px 12px;
  min-height: 58px;
}
.relance-order-grid .relance-old-comment-field {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed, #fff);
}
.relance-order-grid .relance-old-status-field {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4, #fff);
}
.relance-old-status-field select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #fff;
  color: #166534;
  padding: 10px 12px;
  font: inherit;
  font-weight: 1000;
  outline: none;
}
.relance-old-status-field select:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}
.relance-order-grid span {
  display: block;
  color: #8190a5;
  font-size: 12px;
  font-weight: 900;
}
.relance-order-grid b {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 14px;
  word-break: break-word;
}
.relance-order-grid small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  word-break: break-word;
}
.relance-old-comment-field small {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(251, 146, 60, .24);
  border-radius: 12px;
  background: #fff;
  color: #7c2d12;
  font-weight: 900;
}
.relance-old-comment-field small strong {
  color: #9a3412;
  font-weight: 1000;
}
.relance-modern-body {
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, .12), transparent 34%),
    radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 32%),
    #f8fafc;
}
.relance-modern-header {
  align-items: flex-start;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.relance-modern-header span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 5px;
  border-radius: 999px;
  padding: 5px 11px;
  background: #e8f7f1;
  color: #0f8f6b;
  font-size: 12px;
  font-weight: 1000;
}
.relance-modern-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  font-weight: 1000;
}
.relance-modern-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 24px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(240,253,250,.92)),
    radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 38%);
  box-shadow: 0 24px 54px rgba(15, 23, 42, .1);
}
.relance-modern-hero-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #0fb083, #2e82b1);
  color: #fff;
  box-shadow: 0 18px 34px rgba(15, 176, 131, .24);
}
.relance-modern-hero-icon svg { width: 25px; height: 25px; }
.relance-modern-hero b {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 1000;
}
.relance-modern-hero span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.75;
}
.relance-modern-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 18px 0 4px;
}
.relance-modern-route span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}
.relance-modern-route div {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 30px rgba(17, 24, 39, .18);
}
.relance-modern-route svg { width: 20px; height: 20px; }
.relance-modern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.relance-modern-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 22px 46px rgba(15, 23, 42, .09);
  backdrop-filter: blur(10px);
}
.relance-modern-card.source { border-color: rgba(37, 99, 235, .25); }
.relance-modern-card.target { border-color: rgba(249, 115, 22, .3); }
.relance-modern-head,
.relance-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.relance-modern-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #0fb083);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .22);
}
.relance-modern-card.target .relance-modern-icon {
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 14px 28px rgba(249, 115, 22, .2);
}
.relance-modern-icon svg { width: 21px; height: 21px; }
.relance-modern-head span {
  display: inline-block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.relance-modern-head h3 {
  display: block;
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 1000;
}
.relance-title-stack small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}
.relance-modern-person {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  padding: 14px;
  background: #f1f5f9;
}
.relance-modern-card.target .relance-modern-person {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid #fed7aa;
}
.relance-modern-person strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
}
.relance-modern-person b {
  color: #2563eb;
  font-size: 18px;
  letter-spacing: .3px;
}
.relance-modern-product {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px;
}
.relance-modern-product span {
  color: #111827;
  font-weight: 1000;
}
.relance-modern-product b {
  font-style: normal;
  border-radius: 999px;
  padding: 7px 12px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 1000;
  white-space: nowrap;
}
.relance-modern-place {
  display: grid;
  gap: 4px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 12px 14px;
}
.relance-modern-place b { color: #9a3412; font-weight: 1000; }
.relance-modern-place span { color: #64748b; font-weight: 800; }
.relance-modern-delivery-status {
  display: grid;
  gap: 5px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0fdf4, #ecfeff);
  padding: 12px 14px;
}
.relance-modern-delivery-status span {
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}
.relance-modern-delivery-status b {
  color: #15803d;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1.55;
  word-break: break-word;
}
.relance-modern-delivery-status small {
  display: block;
  border-top: 1px dashed rgba(21, 128, 61, .22);
  padding-top: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.65;
  word-break: break-word;
}
.relance-modern-foot {
  background: #fff;
}
.relance-modern-foot .btn-primary {
  background: linear-gradient(135deg, #0fb083, #2e82b1);
  box-shadow: 0 18px 36px rgba(15, 176, 131, .22);
}
@media (max-width: 760px) {
  .relance-modern-grid,
  .relance-compare-grid {
    grid-template-columns: 1fr;
  }
  .relance-modern-route,
  .relance-flow { grid-template-columns: 1fr; }
  .relance-modern-route div,
  .relance-flow div { margin: auto; transform: rotate(90deg); }
  .relance-flow svg { animation: relanceArrowNudgeMobile 1.45s ease-in-out infinite; }
}
@keyframes relanceArrowNudgeMobile {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}
.phone-warning-badge::before {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  top: calc(100% + 4px);
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #172033;
  transform: translateX(-50%) translateY(-3px) rotate(45deg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 30;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.phone-warning-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  inset-inline-start: 50%;
  top: calc(100% + 9px);
  transform: translateX(-50%) translateY(-4px);
  width: max-content;
  min-width: 145px;
  max-width: 270px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: #172033;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.26);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.65;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 29;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.phone-warning-badge:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) rotate(45deg);
}
.phone-warning-badge:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.duplicate-modal-head > div { display: grid; gap: 3px; }
.duplicate-modal-head p { color: #64748b; font-size: 13px; font-weight: 900; letter-spacing: 1px; }
.duplicate-modal-head .duplicate-modal-phone {
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 2px;
  line-height: 1.2;
}
.duplicate-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
}
.duplicate-summary-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #9a4f14;
  background: #fef3c7;
}
.duplicate-summary-icon svg { width: 20px; height: 20px; }
.duplicate-summary div:last-child { display: grid; gap: 3px; }
.duplicate-summary b { color: #78350f; font-size: 14px; }
.duplicate-summary span { color: #78716c; font-size: 12px; font-weight: 700; }
.duplicate-modal-body {
  padding-bottom: 118px;
}
.duplicate-cross-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 9px;
  margin: -7px 0 15px;
}
.duplicate-cross-alert {
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid;
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(15,23,42,.06);
}
.duplicate-cross-alert > svg { width: 20px; height: 20px; flex: 0 0 20px; }
.duplicate-cross-alert div { display: grid; gap: 2px; }
.duplicate-cross-alert b { color: #0f172a; font-size: 12.5px; font-weight: 950; }
.duplicate-cross-alert span { color: #475569; font-size: 11.5px; font-weight: 800; }
.duplicate-cross-alert.suivi-alert {
  border-color: #6ee7b7;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  color: #07866f;
}
.duplicate-cross-alert.block-alert {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #dc2626;
}
.duplicate-orders-list { display: grid; gap: 12px; }
.duplicate-order-card {
  padding: 14px;
  border: 1px solid rgba(148,163,184,.32);
  border-radius: 8px;
  background: #fff;
  transition: border-color .18s ease, background .18s ease, opacity .18s ease;
}
.duplicate-order-card.duplicate-oldest-card {
  border-color: rgba(15,176,131,.45);
  background: linear-gradient(135deg, #f0fdf9, #fff);
  box-shadow: 0 8px 22px rgba(15,176,131,.08);
}
.duplicate-order-card.duplicate-removable-card {
  border-color: #f87171;
  background: #fff1f2;
  box-shadow: inset 4px 0 0 #ef4444, 0 7px 18px rgba(220,38,38,.08);
}
.duplicate-order-card.duplicate-removable-card .duplicate-order-info div {
  background: rgba(255,255,255,.72);
}
.duplicate-order-card.duplicate-tone-neutral {
  border-color: rgba(148,163,184,.4);
  background: #f8fafc;
  box-shadow: inset 4px 0 0 #94a3b8, 0 7px 18px rgba(15,23,42,.05);
}
.duplicate-order-card.duplicate-tone-no-answer {
  border-color: #60a5fa;
  background: #dbeafe;
  box-shadow: inset 4px 0 0 #2563eb, 0 7px 18px rgba(37,99,235,.11);
}
.duplicate-order-card.duplicate-tone-confirmed {
  border-color: #4ade80;
  background: #dcfce7;
  box-shadow: inset 4px 0 0 #16a34a, 0 7px 18px rgba(22,163,74,.1);
}
.duplicate-order-card.duplicate-tone-postponed {
  border-color: #facc15;
  background: #fef9c3;
  box-shadow: inset 4px 0 0 #eab308, 0 7px 18px rgba(202,138,4,.1);
}
.duplicate-order-card.duplicate-tone-danger {
  border-color: #f87171;
  background: #fee2e2;
  box-shadow: inset 4px 0 0 #dc2626, 0 7px 18px rgba(220,38,38,.11);
}
.duplicate-order-card[class*="duplicate-tone-"] .duplicate-order-info div {
  background: rgba(255,255,255,.66);
}
.duplicate-order-card.marked-delete {
  border-color: #ef4444;
  background: #fee2e2;
  box-shadow: inset 4px 0 0 #dc2626, 0 7px 18px rgba(220,38,38,.13);
  opacity: .86;
}
.duplicate-order-card.marked-delete .duplicate-order-info div,
.duplicate-order-card.marked-delete .duplicate-product-field .input {
  border-color: #fecaca;
  background: #fff1f2;
}
.duplicate-order-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.duplicate-delete-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.duplicate-delete-choice input { position: absolute; opacity: 0; pointer-events: none; }
.duplicate-delete-box {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #dc2626;
  background: #fff;
  transition: all .18s ease;
}
.duplicate-delete-box svg { width: 15px; height: 15px; }
.duplicate-delete-choice input:checked + .duplicate-delete-box {
  color: #fff;
  border-color: #dc2626;
  background: #dc2626;
  box-shadow: 0 5px 13px rgba(220,38,38,.2);
}
.duplicate-order-number {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.duplicate-order-number b {
  min-width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: #0f172a;
}
.duplicate-status-badge {
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--duplicate-status) 45%, transparent);
  border-radius: 999px;
  color: #0f172a;
  background: color-mix(in srgb, var(--duplicate-status) 20%, #fff);
  font-size: 11px;
  font-weight: 950;
}
.duplicate-order-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}
.duplicate-order-info .duplicate-date-info { grid-column: auto; }
.duplicate-order-info div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 7px;
  background: #f8fafc;
  text-align: center;
}
.duplicate-order-info span { color: #94a3b8; font-size: 10px; font-weight: 900; }
.duplicate-order-info b { overflow: hidden; color: #0f172a; font-size: 11.5px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.duplicate-product-field { margin: 0; }
.duplicate-product-field label { display: block; margin-bottom: 6px; color: #475569; font-size: 11px; font-weight: 950; }
.duplicate-product-field .input { min-height: 40px; }
.duplicate-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 30%) minmax(0, 30%);
  grid-template-areas: "address city name";
  direction: ltr;
  gap: 12px;
  margin-bottom: 12px;
  max-width: 100%;
  overflow: visible;
}
.duplicate-primary-grid .field,
.duplicate-secondary-grid .field { margin: 0; }
.duplicate-primary-grid .field { min-width: 0; direction: rtl; }
.duplicate-name-field { grid-area: name; }
.duplicate-city-field { grid-area: city; }
.duplicate-address-field { grid-area: address; }
.duplicate-primary-grid label,
.duplicate-secondary-grid label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 11px;
  font-weight: 950;
}
.duplicate-primary-grid .input {
  min-height: 48px;
  border-color: rgba(15,176,131,.28);
  background: #fff;
  font-size: 14px;
  font-weight: 850;
}
.duplicate-city-picker { position: relative; z-index: auto; }
.duplicate-city-picker:focus-within { z-index: 20; }
.duplicate-city-picker .duplicate-city-options {
  inset-inline: 0;
  top: calc(100% + 6px);
  width: 100%;
  max-height: 240px;
  border-radius: 8px;
  z-index: 90;
}
.duplicate-city-picker:not(:focus-within) .duplicate-city-options:not(.show) {
  display: none;
}
.duplicate-city-picker .duplicate-city-option {
  min-height: 36px;
  border-radius: 7px;
}
.duplicate-address-field .input {
  min-height: 48px;
  height: 48px;
  resize: none;
  line-height: 1.2;
  text-align: right;
  overflow: hidden;
}
.duplicate-secondary-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(110px, .55fr) minmax(180px, 1fr);
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed rgba(15,176,131,.28);
}
.duplicate-secondary-grid .input {
  min-height: 42px;
  background: #fff;
}
.duplicate-status-picker { position: relative; z-index: 7; }
.duplicate-status-trigger {
  width: 100%;
  min-height: 42px;
  height: 42px;
  margin: 0;
  justify-content: space-between;
  color: #0f172a;
  background: color-mix(in srgb, var(--pill, #64748b) 19%, #fff);
  border-color: color-mix(in srgb, var(--pill, #64748b) 65%, #0f172a);
}
.duplicate-status-trigger b { order: 2; }
.duplicate-status-menu {
  display: none;
  position: absolute;
  inset-inline: 0;
  top: auto;
  bottom: calc(100% + 7px);
  padding: 7px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15,27,45,.18);
  max-height: 260px;
  overflow: auto;
  z-index: 120;
}
.duplicate-status-menu.show { display: grid; gap: 6px; }
.duplicate-status-option {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--status-color, #64748b) 24%, transparent);
  border-radius: 8px;
  color: #0f172a;
  background: color-mix(in srgb, var(--status-color, #64748b) 16%, #fff);
  font-size: 12.5px;
  font-weight: 950;
  text-align: center;
}
.duplicate-status-option:hover {
  border-color: var(--status-color, #64748b);
  background: color-mix(in srgb, var(--status-color, #64748b) 28%, #fff);
}
.duplicate-status-option.active {
  border-color: var(--status-color, #64748b);
  box-shadow: inset 0 0 0 1px var(--status-color, #64748b);
  background: color-mix(in srgb, var(--status-color, #64748b) 32%, #fff);
}
.duplicate-postpone-fields,
.duplicate-wait-note-fields {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}
.duplicate-wait-note-fields {
  grid-template-columns: 1fr;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.duplicate-postpone-fields.show,
.duplicate-wait-note-fields.show { display: grid; }
.duplicate-postpone-fields .field,
.duplicate-wait-note-fields .field { margin: 0; }
.duplicate-postpone-fields label,
.duplicate-wait-note-fields label {
  display: block;
  margin-bottom: 6px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 950;
}
.duplicate-wait-note-fields label { color: #1d4ed8; }
.duplicate-postpone-fields .input,
.duplicate-wait-note-fields .input { min-height: 42px; background: #fff; }
.duplicate-oldest-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 7px 9px;
  border-radius: 7px;
  color: #64748b;
  background: rgba(255,255,255,.7);
  font-size: 10.5px;
  font-weight: 850;
}
.duplicate-oldest-date b { color: #334155; font-size: 11px; }
.duplicate-delete-warning {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  background: #fef2f2;
  font-size: 12px;
  font-weight: 900;
}
.duplicate-delete-warning.show { display: flex; }
.duplicate-delete-warning svg { width: 17px; height: 17px; }
.duplicate-modal-foot {
  align-items: center;
  z-index: 80;
  box-shadow: 0 -12px 26px rgba(15,23,42,.08);
}
.duplicate-selection-count {
  margin-inline-end: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
@media (max-width: 720px) {
  .duplicate-order-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duplicate-primary-grid,
  .duplicate-secondary-grid,
  .duplicate-postpone-fields { grid-template-columns: 1fr; }
  .duplicate-primary-grid { grid-template-areas: "name" "city" "address"; }
  .duplicate-address-field { grid-column: auto; }
  .duplicate-modal-foot { flex-wrap: wrap; }
  .duplicate-selection-count { width: 100%; margin: 0 0 4px; }
}
table.data tbody td:focus-within { position: relative; z-index: 4; overflow: visible; }
.phone-cell:focus-within .cell-phone {
  transform: none;
  background: #fff; color: var(--ink); font-size: 20px; font-weight: 900;
  box-shadow: inset 0 0 0 2px var(--primary);
  border-radius: 0;
}
.cell-price { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0; text-align: center; padding-inline: 8px; }
.cell-muted { color: var(--ink-3); font-size: 12.5px; }

.sheet-input {
  width: 100%; min-width: 0; border: 0; outline: none; background: transparent;
  padding: 12px 14px; font-size: 15px; font-weight: 700; color: var(--ink); text-align: center;
}
.sheet-input:hover { background: rgba(255,255,255,0.5); }
.sheet-input:focus {
  background: #fff; box-shadow: inset 0 0 0 2px var(--primary);
}
table.data tbody td.sheet-cell-saving {
  position: relative;
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 2px #3b82f6, 0 0 0 1px rgba(59,130,246,.14);
  animation: sheetCellSavingPulse .75s ease-in-out infinite alternate;
}
table.data tbody td.sheet-cell-saved {
  position: relative;
  background: #dcfce7 !important;
  box-shadow: inset 0 0 0 2px #22c55e;
  animation: sheetCellSavedPop .55s cubic-bezier(.22,1,.36,1) both;
}
table.data tbody td.sheet-cell-error {
  position: relative;
  background: #fee2e2 !important;
  box-shadow: inset 0 0 0 2px #ef4444;
}
@keyframes sheetCellSavingPulse {
  from { filter: saturate(1); }
  to { filter: saturate(1.2) brightness(1.04); }
}
@keyframes sheetCellSavedPop {
  0% { transform: scale(.985); }
  55% { transform: scale(1.018); }
  100% { transform: scale(1); }
}
table.data tbody td:focus-within .sheet-input,
table.data tbody td:focus-within .city-inline {
  font-size: 18px; font-weight: 900; min-height: 48px;
  background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--primary), 0 10px 24px rgba(15, 27, 45, 0.12);
}
.sheet-input.sheet-expand:focus,
.sheet-input.sheet-expand.sheet-expanded {
  position: absolute;
  z-index: 25;
  inset-block-start: 50%;
  inset-inline-start: -8px;
  transform: translateY(-50%);
  width: max(100%, min(300px, 42vw));
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 6px;
  text-align: start;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--primary), 0 10px 24px rgba(15, 27, 45, 0.14);
}
.sheet-input.sheet-expand-city:focus,
.sheet-input.sheet-expand-city.sheet-expanded {
  width: max(100%, min(190px, 30vw));
  min-height: 42px;
  padding: 9px 12px;
  text-align: center;
}
select.status-select { appearance: auto; }

.product-cell,
.product-field,
.city-cell,
.city-field { position: relative; }
.city-cell { overflow: visible; }
.smart-options {
  display: none; position: absolute; z-index: 30; inset-inline-start: 8px; width: min(360px, 82vw);
  top: calc(100% + 6px); gap: 7px; padding: 10px;
  background: rgba(255, 255, 255, 0.98); border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px; box-shadow: 0 18px 44px rgba(15, 27, 45, 0.16);
  backdrop-filter: blur(12px); max-height: 230px; overflow: auto;
}
.smart-options.show { display: flex; flex-direction: column; align-items: stretch; }
.smart-option {
  display: block;
  width: 100%; min-height: 38px; padding: 8px 10px; border-radius: 12px;
  background: #f8fafc; color: var(--ink); font-size: 13px; font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.22); text-align: start;
}
.smart-option:hover { background: #fff7ed; border-color: #ea8c34; color: #9a4b0f; }
.smart-option[hidden] { display: none; }
.smart-option-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.product-field .smart-options,
.city-field .smart-options { inset-inline-start: 0; top: calc(100% - 9px); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.status-cell { position: relative; overflow: visible; }
.status-pill {
  width: calc(100% - 12px); margin: 7px 6px 6px; min-height: 32px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 11px; padding: 6px 8px; font-size: 12.5px; font-weight: 900;
  border: 1.5px solid #0f172a;
  box-shadow: none;
}
.status-pill b {
  width: 22px; height: 22px; flex: 0 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.34);
  line-height: 1; opacity: 0.9;
}
.status-chevron { width: 15px; height: 15px; transition: transform 0.16s ease; }
.status-pill[aria-expanded="true"] .status-chevron { transform: rotate(180deg); }
.status-under-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 18px);
  margin: -2px 9px 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
}
.no-answer-day {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1;
}
.no-answer-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  direction: ltr;
  padding: 2px 3px;
}
.no-answer-dots i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}
.no-answer-dots i.done {
  background: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.09);
}
.no-answer-dots i.current {
  width: 10px;
  height: 10px;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.18), 0 0 12px rgba(255, 255, 255, 0.9);
}
.no-answer-dots i.current.due {
  animation: noAnswerDotPulse 1s ease-in-out infinite;
}
@keyframes noAnswerDotPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 0 10px rgba(255,255,255,0.8); }
  50% { transform: scale(1.28); box-shadow: 0 0 0 7px rgba(255,255,255,0), 0 0 18px rgba(255,255,255,1); }
}
.status-pill.no-answer-due { position: relative; }
@keyframes noAnswerPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.82), 0 10px 22px rgba(15, 23, 42, 0.14); }
  50% { transform: translateY(-1px); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0), 0 14px 30px rgba(255, 255, 255, 0.48); }
}
.status-menu {
  display: none; position: absolute; z-index: 40; inset-inline: 6px; top: 42px;
  padding: 7px; border-radius: 14px; background: rgba(255,255,255,0.98);
  border: 1px solid rgba(148, 163, 184, 0.28); box-shadow: 0 18px 44px rgba(15, 27, 45, 0.16);
  max-height: 230px; overflow: auto;
}
.status-menu.show { display: grid; gap: 6px; }
.status-option {
  min-height: 34px; border-radius: 10px; padding: 7px 9px;
  background: color-mix(in srgb, var(--status-color, #64748b) 14%, #fff);
  color: var(--status-color, var(--ink)); font-size: 12.5px; font-weight: 900; text-align: center;
}
.status-option:hover { background: color-mix(in srgb, var(--status-color, #64748b) 24%, #fff); }
.status-option.edit-postpone-option {
  min-height: 34px;
}
.status-option.status-option-locked {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: #eef2f7 !important; color: #64748b !important; cursor: not-allowed;
  border: 1px dashed #cbd5e1; opacity: .9;
}
.status-option.status-option-locked svg { width: 14px; height: 14px; }
.status-option.status-option-locked:hover { background: #eef2f7 !important; }
.no-answer-meta-pill {
  width: calc(100% - 12px);
  min-height: 34px;
  margin: 0 6px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 4px 7px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(241,245,249,0.92));
  border: 1.5px solid rgba(255,255,255,0.98);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 8px 18px rgba(15,23,42,0.11);
  white-space: nowrap;
}
.no-answer-meta-pill.due {
  animation: noAnswerMetaPulse 1.45s ease-in-out infinite;
}
.no-answer-meta-pill.day-one-due {
  min-height: 38px;
  width: calc(100% - 8px);
  margin-inline: 4px;
  border-width: 2px;
  animation: noAnswerMetaPulseBig 1.25s ease-in-out infinite;
}
.no-answer-meta-pill .meta-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}
.no-answer-meta-pill small {
  font-size: 9px;
  font-weight: 900;
  color: #475569;
}
.no-answer-meta-pill b {
  font-size: 14px;
  font-weight: 950;
  color: #0f172a;
  line-height: 1;
}
.no-answer-meta-pill i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #0f172a;
  opacity: 0.7;
}
@keyframes noAnswerMetaPulse {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 0 0 0 rgba(255,255,255,0.75), 0 8px 18px rgba(15,23,42,0.11);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 5px rgba(255,255,255,0), 0 12px 22px rgba(255,255,255,0.38);
  }
}
@keyframes noAnswerMetaPulseBig {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.98), 0 0 0 0 rgba(255,255,255,0.9), 0 10px 20px rgba(15,23,42,0.12);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 8px rgba(255,255,255,0), 0 14px 26px rgba(255,255,255,0.48);
  }
}
.status-option.no-answer-again {
  background: linear-gradient(135deg, #2E82B1, #2563eb);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.44);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}
.status-option.no-answer-again:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(255, 255, 255, 0.66);
}
.status-option.no-answer-followup {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(255, 247, 237, 0.98));
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.24);
}
.status-note {
  width: calc(100% - 12px); margin: 0 6px 8px; padding: 7px 7px;
  border: 1px solid rgba(234, 140, 52, 0.35); border-radius: 10px;
  background: rgba(255, 247, 237, 0.85); color: var(--ink);
  font-size: 12px; font-weight: 700; outline: none; text-align: center;
}
.status-note:focus { background: #fff; box-shadow: 0 0 0 2px rgba(234, 140, 52, 0.18); }
.wa-pill,
.sms-pill {
  width: 100%; margin: 0; min-height: 42px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 0; padding: 10px 8px; font-size: 13px; font-weight: 900;
  background: transparent;
  color: var(--pill, #64748b);
  box-shadow: none;
}
.dropdown-cell { position: relative; cursor: pointer; }
.dropdown-cell:hover .wa-pill,
.dropdown-cell:hover .sms-pill { background: color-mix(in srgb, var(--pill, #94a3b8) 10%, #fff); }
.wa-pill b,
.sms-pill b { font-size: 13px; line-height: 1; opacity: 0.78; }
.wa-menu,
.sms-menu {
  display: none; position: absolute; z-index: 40; inset-inline: 4px; top: calc(100% + 4px);
  padding: 7px; border-radius: 14px; background: rgba(255,255,255,0.98);
  border: 1px solid rgba(148, 163, 184, 0.28); box-shadow: 0 18px 44px rgba(15, 27, 45, 0.16);
  max-height: 230px; overflow: auto;
}
.wa-menu.show,
.sms-menu.show { display: grid; gap: 6px; }
.wa-option,
.sms-option {
  min-height: 34px; border-radius: 10px; padding: 7px 9px;
  background: color-mix(in srgb, var(--opt, #64748b) 14%, #fff);
  color: var(--opt, var(--ink)); font-size: 12.5px; font-weight: 900; text-align: center;
}
.wa-option:hover,
.sms-option:hover { background: color-mix(in srgb, var(--opt, #64748b) 24%, #fff); }
.sms-send-btn {
  width: calc(100% - 12px);
  min-height: 34px;
  margin: 7px auto 0;
  border: 1px solid rgba(15, 157, 110, .22);
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  color: #047857;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 950;
  cursor: pointer;
}
.sms-send-btn svg {
  width: 15px;
  height: 15px;
}
.sms-send-btn:hover {
  border-color: rgba(15, 157, 110, .42);
  transform: translateY(-1px);
}
.sms-section-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sms-section-checks label {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
}
.settings-log-table {
  max-height: 360px;
}
.copy-phones-btn {
  color: var(--ink-2); background: #fff; border-color: var(--line);
  box-shadow: none;
}
.copy-phones-btn svg { width: 16px; height: 16px; }
.copy-phones-btn:hover {
  color: var(--ink); transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.copy-phones-btn:active {
  border-color: transparent; color: #fff; background: linear-gradient(135deg, #0f9d6e, #2f80ed);
  box-shadow: 0 10px 28px rgba(47, 128, 237, 0.24);
}
.phone-list-box { min-height: 240px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; line-height: 1.7; text-align: left; }
.muted-copy { color: var(--ink-3); font-weight: 800; font-size: 13px; margin-top: 10px; }

.city-inline { border: 0; border-radius: 0; padding: 12px 14px; font-weight: 700; font-size: 15px; cursor: text; outline: none; background: transparent; color: var(--ink); transition: all 0.14s; width: 100%; min-width: 0; }
.city-inline:hover { border-color: var(--line); background: rgba(255,255,255,0.6); }
.city-inline:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.city-dropdown {
  position: relative;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.city-pill {
  width: calc(100% - 12px);
  min-height: 34px;
  margin: 7px 6px;
  border: 1.5px solid #0f172a;
  border-radius: 11px;
  background: rgba(255,255,255,.66);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  font: 900 12.5px "Cairo", var(--font);
}
.city-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.city-pill b {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
}
.city-pill[aria-expanded="true"] .status-chevron { transform: rotate(180deg); }
.city-menu {
  display: none;
  position: absolute;
  z-index: 60;
  left: 50%;
  right: auto;
  top: calc(100% + 2px);
  width: min(260px, 72vw);
  padding: 9px;
  border-radius: 16px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(148, 163, 184, .35);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
  backdrop-filter: blur(12px);
  text-align: start;
  transform: translateX(-50%);
}
.city-menu.show { display: block; }
.city-search {
  width: 100%;
  min-height: 38px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  outline: none;
  padding: 0 12px;
  font: 900 13px "Cairo", var(--font);
  color: var(--ink);
  margin-bottom: 8px;
  background: #f8fafc;
}
.city-search:focus {
  border-color: #2e82b1;
  box-shadow: 0 0 0 3px rgba(46,130,177,.12);
  background: #fff;
}
.city-menu-list {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
}
.city-menu-option {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 7px 10px;
  background: #eef2f7;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 900 13px "Cairo", var(--font);
  text-align: start;
}
.city-menu-option:hover {
  background: #fff7ed;
  border-color: #ea8c34;
  color: #9a4b0f;
}
.city-menu-option small {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 900;
}
.city-menu-option[hidden] { display: none; }

.row-actions { display: flex; gap: 6px; }
.icon-act { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; transition: all 0.14s; color: var(--ink-3); }
.icon-act svg { width: 16px; height: 16px; }
.icon-act:hover { background: rgba(255,255,255,0.9); box-shadow: var(--shadow-sm); }
.icon-act.edit:hover { color: var(--primary); }
.icon-act.del:hover { color: var(--danger); }
.icon-act.info { margin: 0 auto; color: var(--primary); }
.icon-act.info:hover { color: var(--primary-700); background: var(--primary-soft); }
.icon-act.move { font-size: 16px; font-weight: 900; color: var(--ink-2); }
.icon-act.move:hover { color: var(--primary); }
.icon-act:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; background: transparent; }

.info-grid { display: grid; gap: 10px; }
.info-grid div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.info-grid span { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 3px; font-weight: 700; }
.info-grid b { display: block; font-size: 14px; color: var(--ink); word-break: break-word; }
.info-grid a { color: var(--primary-700); }
.webhook-ip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.webhook-ip-row b { min-width: 0; }
.webhook-ip-block {
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #b91c1c;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}
.webhook-ip-block svg { width: 15px; height: 15px; }
.webhook-ip-block.unblock {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #047857;
}
.webhook-ip-block:disabled { opacity: .68; cursor: not-allowed; }
.status-pill-locked { cursor: not-allowed !important; opacity: .76; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08); }
.status-pill-locked b svg { width: 15px; height: 15px; }
.status-lock-note { display: block; margin-top: 6px; font-size: 11px; font-weight: 800; color: #64748b; line-height: 1.2; }
.tracking-info-edit { background: linear-gradient(180deg, #f8fbff, #fff) !important; }
.tracking-info-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 0 !important; border: 0 !important; background: transparent !important; }
.tracking-info-input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; font: 800 14px "Cairo", var(--font); color: var(--ink); background: #fff; outline: none; box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03); }
.tracking-info-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46, 130, 177, .14); }
.tracking-info-save { min-height: 42px; border: 0; border-radius: 11px; padding: 0 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #fff; font: 900 13px "Cairo", var(--font); background: linear-gradient(135deg, #0fb083, #2e82b1); box-shadow: 0 10px 20px rgba(15, 176, 131, .2); transition: transform .18s ease, opacity .18s ease; }
.tracking-info-save:hover { transform: translateY(-1px); }
.tracking-info-save:disabled { opacity: .55; cursor: wait; transform: none; }
.tracking-info-save svg { width: 16px; height: 16px; }
.modal-foot-inline { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; flex-wrap: wrap; }
.order-info-actions {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(248, 250, 252, .94), rgba(255, 255, 255, .98));
}
.order-info-action-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.order-info-action-btn {
  min-height: 44px;
  padding-inline: 15px;
  border-radius: 14px;
  font-size: 13px;
}
.order-info-action-btn svg,
.order-info-delete-btn svg {
  width: 17px;
  height: 17px;
}
.order-info-delete-btn {
  min-height: 42px;
  padding-inline: 14px;
  border-radius: 14px;
}
@media (max-width: 720px) {
  .order-info-actions,
  .order-info-action-main {
    align-items: stretch;
    flex-direction: column;
  }
  .order-info-action-btn,
  .order-info-delete-btn {
    justify-content: center;
    width: 100%;
  }
}
.backup-card {
  margin-top: 16px; border: 1px solid rgba(234, 140, 52, 0.28);
  border-radius: 14px; overflow: hidden; background: #fff7ed;
}
.backup-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: #ea8c34; color: #fff; font-weight: 900;
}
.backup-title b {
  direction: ltr; font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.22); color: #fff;
}
.backup-list { display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.backup-list div {
  min-width: 0; padding: 10px 12px; border-bottom: 1px solid #fed7aa;
  border-inline-end: 1px solid #fed7aa;
}
.backup-list span { display: block; margin-bottom: 3px; color: var(--ink-3); font-size: 11.5px; font-weight: 800; }
.backup-list b { display: block; color: var(--ink); font-size: 13px; font-weight: 900; word-break: break-word; }
.history-card { margin-top: 16px; }
.history-card h3 { font-size: 15px; margin-bottom: 10px; }
.history-timeline { position: relative; display: grid; gap: 12px; padding-inline-start: 22px; }
.history-timeline::before {
  content: ''; position: absolute; inset-block: 10px; inset-inline-start: 8px;
  width: 2px; background: #bbf7d0;
}
.history-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 8px; margin-inline-start: -22px; }
.history-icon {
  width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center;
  background: #fff7ed; color: #ea8c34; border: 2px solid #fb923c; z-index: 1;
}
.history-icon svg { width: 14px; height: 14px; }
.history-content {
  background: #ffffff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; box-shadow: var(--shadow-sm);
}
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.history-head span {
  background: #ffedd5; color: #c2410c; padding: 3px 10px; border-radius: 9px;
  font-size: 12.5px; font-weight: 900;
}
.history-head time { background: #f1f5f9; color: var(--ink-2); padding: 3px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 800; }
.history-values { display: grid; gap: 7px; }
.history-values div { background: #f8fafc; border-radius: 9px; padding: 8px 10px; }
.history-values small { display: block; color: var(--ink-3); font-size: 11px; font-weight: 800; margin-bottom: 2px; }
.history-values b { display: block; color: var(--ink); font-size: 13px; word-break: break-word; }
.history-empty {
  padding: 14px; border-radius: 12px; background: #f8fafc; color: var(--ink-3);
  font-weight: 800; text-align: center;
}

.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty svg { width: 56px; height: 56px; opacity: 0.4; margin-bottom: 14px; }
.empty b { display: block; font-family: var(--font-display); font-size: 17px; color: var(--ink-2); margin-bottom: 5px; }

/* ===================== TASKS ===================== */
.tasks-editor-frame {
  width: calc(100% + 36px);
  height: calc(100vh - 36px);
  margin: -18px;
  display: block;
  border: 0;
  background: #ffffff;
}
.simple-doc-page {
  min-height: calc(100vh - 38px);
  margin: -18px;
  display: grid;
  grid-template-rows: 56px 1fr;
  background: #ffffff;
  border: 1px solid #d7dce2;
  border-radius: 0;
  overflow: hidden;
  direction: ltr;
}
.simple-doc-toolbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #d7dce2;
  background: #ffffff;
  color: #2b2f35;
}
.simple-doc-toolbar button {
  min-width: 26px;
  height: 34px;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: #2b2f35;
  font: 600 15px var(--font);
  cursor: pointer;
}
.simple-doc-toolbar button:hover {
  background: #f1f5f9;
}
.simple-doc-toolbar svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.simple-doc-style {
  min-width: 132px !important;
  justify-content: flex-start !important;
  padding-inline: 10px !important;
  font-weight: 700 !important;
}
.simple-doc-style svg,
.simple-doc-text-btn svg {
  width: 16px;
  height: 16px;
}
.simple-doc-text-btn {
  min-width: 42px !important;
  font-size: 24px !important;
  font-weight: 500 !important;
}
.simple-doc-sep {
  width: 1px;
  height: 32px;
  background: #d7dce2;
}
.simple-doc-editor {
  width: 100%;
  min-height: 100%;
  padding: 46px 56px;
  border: 0;
  outline: none;
  background: #ffffff;
  color: #111827;
  font: 500 18px var(--font);
  line-height: 1.8;
  overflow: auto;
  direction: rtl;
}
.simple-doc-editor:empty::before {
  content: "";
}
.simple-doc-editor table {
  border-collapse: collapse;
  min-width: 360px;
  margin: 12px 0;
}
.simple-doc-editor td {
  min-width: 110px;
  height: 38px;
  border: 1px solid #d7dce2;
  padding: 7px 10px;
}
.tasks-shell { display: grid; gap: 18px; }
.tasks-composer { padding: 22px; display: grid; gap: 14px; }
.task-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.task-stats div { min-width: 112px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.65); border: 1px solid var(--line); }
.task-stats b { display: block; font-size: 24px; color: var(--ink); line-height: 1; }
.task-stats span { color: var(--ink-3); font-size: 12px; font-weight: 800; }
.task-form { display: grid; grid-template-columns: 1fr 150px auto; gap: 10px; align-items: center; }
.task-note-input { min-height: 74px; resize: vertical; }
.tasks-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.task-card { position: relative; display: grid; grid-template-columns: 34px 1fr 34px; gap: 10px; padding: 16px; border-inline-start: 5px solid #64748b; }
.task-card[data-priority="high"] { border-inline-start-color: #dc2626; }
.task-card[data-priority="normal"] { border-inline-start-color: #ea8c34; }
.task-card[data-priority="low"] { border-inline-start-color: #0ea5e9; }
.task-card.done { opacity: 0.68; }
.task-card.done .task-title-input { text-decoration: line-through; color: var(--ink-3); }
.task-check-wrap { display: grid; place-items: start center; padding-top: 4px; cursor: pointer; }
.task-check-wrap input { display: none; }
.task-check-wrap span { width: 24px; height: 24px; border-radius: 9px; border: 2px solid rgba(100,116,139,0.35); background: #fff; display: grid; place-items: center; }
.task-check-wrap input:checked + span { background: #16a34a; border-color: #16a34a; }
.task-check-wrap input:checked + span::after { content: 'âœ“'; color: #fff; font-weight: 900; font-size: 15px; }
.task-content { display: grid; gap: 8px; min-width: 0; }
.task-title-input { border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 900; color: var(--ink); padding: 2px 0; min-width: 0; }
.task-note-edit { border: 1px solid rgba(148,163,184,0.22); border-radius: 12px; background: rgba(248,250,252,0.74); min-height: 70px; resize: vertical; padding: 9px 10px; outline: none; color: var(--ink-2); font-family: inherit; font-weight: 700; }
.task-title-input:focus,
.task-note-edit:focus { box-shadow: 0 0 0 3px rgba(234,140,52,0.12); background: #fff; }
.task-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-meta span { padding: 4px 9px; border-radius: 99px; background: #fff7ed; color: #9a4b0f; font-size: 12px; font-weight: 900; }
.task-priority-edit { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 8px; font-weight: 800; color: var(--ink-2); outline: none; }
.task-delete { align-self: start; }

/* ===================== MODERN WORKSPACE ===================== */
.workspace-shell { display: grid; gap: 18px; }
.workspace-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 24px 50px rgba(37,99,235,.18);
}
.workspace-kicker {
  display: inline-flex; padding: 6px 11px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  font-size: 12px; font-weight: 900; margin-bottom: 10px;
}
.workspace-hero h2 { font-size: clamp(22px, 3vw, 34px); line-height: 1.15; margin: 0 0 8px; }
.workspace-hero p { color: rgba(255,255,255,.82); font-weight: 750; margin: 0; max-width: 620px; }
.workspace-score {
  min-width: 138px; min-height: 138px; border-radius: 28px;
  display: grid; place-items: center; text-align: center;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22);
}
.workspace-score b { font-size: 42px; line-height: 1; }
.workspace-score span, .workspace-score small { display: block; font-weight: 900; color: rgba(255,255,255,.82); }
.workspace-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.workspace-stats div {
  min-height: 96px; padding: 16px; border-radius: 20px;
  background: rgba(255,255,255,.78); border: 1px solid var(--line);
  box-shadow: 0 16px 34px rgba(15,27,45,.06);
}
.workspace-stats svg { width: 22px; height: 22px; color: #0f766e; margin-bottom: 8px; }
.workspace-stats b { display: block; font-size: 26px; color: var(--ink); line-height: 1; }
.workspace-stats span { color: var(--ink-3); font-size: 12px; font-weight: 900; }
.workspace-composer { display: grid; gap: 12px; }
.workspace-type-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.workspace-type-tabs button {
  height: 46px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(148,163,184,.26); background: rgba(255,255,255,.78);
  border-radius: 15px; padding: 0 15px; font-weight: 950; color: var(--ink-2);
  cursor: pointer; transition: .18s ease;
}
.workspace-type-tabs svg { width: 18px; height: 18px; }
.workspace-type-tabs button.sel {
  background: linear-gradient(135deg, #10b981, #2563eb); color: #fff;
  border-color: transparent; box-shadow: 0 14px 28px rgba(37,99,235,.18);
}
.workspace-form {
  padding: 18px; display: grid; grid-template-columns: minmax(240px, 1fr) 150px 190px auto;
  gap: 12px; align-items: end;
}
.workspace-form .full { grid-column: 1 / -2; }
.workspace-add { min-height: 46px; align-self: end; }
.task-note-input { min-height: 88px; resize: vertical; }
.sticky-colors { display: flex; gap: 7px; height: 44px; align-items: center; }
.sticky-colors button {
  width: 30px; height: 30px; border-radius: 10px; border: 2px solid #fff;
  background: var(--sticky); cursor: pointer; box-shadow: 0 0 0 1px rgba(148,163,184,.35);
}
.sticky-colors button.sel { box-shadow: 0 0 0 3px rgba(37,99,235,.26); }
.workspace-grid { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; align-items: start; }
.workspace-lane {
  min-height: 380px; border-radius: 24px; padding: 13px;
  background: rgba(255,255,255,.58); border: 1px solid rgba(148,163,184,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.workspace-lane header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 4px 4px 0; }
.workspace-lane h3 { font-size: 16px; margin: 0; color: var(--ink); }
.workspace-lane p { margin: 3px 0 0; color: var(--ink-3); font-weight: 800; font-size: 12px; }
.workspace-lane header b {
  min-width: 34px; height: 28px; display: grid; place-items: center;
  border-radius: 999px; background: #e0f2fe; color: #0369a1; font-size: 13px;
}
.workspace-lane-list { display: grid; gap: 11px; }
.workspace-empty {
  min-height: 120px; border: 1px dashed rgba(100,116,139,.28); border-radius: 18px;
  display: grid; place-items: center; color: var(--ink-3); font-weight: 900; background: rgba(255,255,255,.46);
}
.workspace-lane .task-card {
  position: relative; display: grid; grid-template-columns: 30px 1fr 30px; gap: 8px;
  padding: 14px; border-radius: 18px; border: 1px solid rgba(148,163,184,.24);
  border-inline-start: 5px solid #64748b; background: rgba(255,255,255,.86);
  box-shadow: 0 12px 26px rgba(15,27,45,.06);
}
.workspace-lane .task-card[data-priority="high"] { border-inline-start-color: #ef4444; }
.workspace-lane .task-card[data-priority="normal"] { border-inline-start-color: #f59e0b; }
.workspace-lane .task-card[data-priority="low"] { border-inline-start-color: #0ea5e9; }
.workspace-lane .task-card.sticky-card {
  background: var(--sticky-card, #fef3c7); border-color: rgba(146,64,14,.13);
  box-shadow: 0 16px 28px rgba(146,64,14,.12);
}
.workspace-lane .task-card.done { opacity: .62; }
.workspace-lane .task-card.done .task-title-input { text-decoration: line-through; color: var(--ink-3); }
.workspace-lane .task-check-wrap span { width: 22px; height: 22px; border-radius: 8px; }
.workspace-lane .task-check-wrap input:checked + span::after { content: 'âœ“'; color: #fff; font-weight: 900; font-size: 14px; }
.workspace-lane .task-title-input { font-size: 15px; font-weight: 950; }
.workspace-lane .task-note-edit {
  background: rgba(255,255,255,.58); min-height: 72px; line-height: 1.55;
  font-weight: 750; border-color: rgba(148,163,184,.20);
}
.workspace-lane .task-title-input:focus,
.workspace-lane .task-note-edit:focus { box-shadow: 0 0 0 3px rgba(37,99,235,.11); background: #fff; }
.workspace-lane .task-meta span { background: rgba(255,255,255,.7); color: #0f766e; font-weight: 950; }
.workspace-lane .task-priority-edit { background: rgba(255,255,255,.82); min-width: 86px; }
.workspace-lane .task-delete { background: rgba(255,255,255,.72); }
@media (max-width: 1180px) {
  .workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-form { grid-template-columns: 1fr 150px; }
  .workspace-form .full { grid-column: 1 / -1; }
  .workspace-add { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .workspace-hero { display: grid; padding: 20px; }
  .workspace-score { min-height: 104px; min-width: 104px; border-radius: 22px; }
  .workspace-stats, .workspace-grid { grid-template-columns: 1fr; }
  .workspace-form { grid-template-columns: 1fr; }
  .workspace-form .full { grid-column: auto; }
}

/* ===================== MODAL ===================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 27, 45, 0.42); backdrop-filter: blur(5px); z-index: 200; display: grid; place-items: center; padding: 20px; animation: fade 0.2s; }
.modal {
  width: 100%; max-width: 620px; max-height: 90vh; overflow: auto;
  background: var(--surface-solid); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border); animation: pop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.sm { max-width: 440px; }
.modal.wide { max-width: 920px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-solid); z-index: 2; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 24px 26px; }
.modal-foot { padding: 18px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface-solid); }
.popup-order-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 20px;
  padding: 11px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #f4f8fd);
  border: 1px solid rgba(148, 163, 184, .32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}
.popup-order-strip div {
  min-width: 0;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(203, 213, 225, .72);
  text-align: center;
  box-shadow: 0 4px 12px rgba(15,23,42,.035);
}
.popup-order-strip span {
  color: #8290a5;
  font-size: 11.5px;
  font-weight: 950;
}
.popup-order-strip b {
  min-width: 0;
  width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 950;
  line-height: 1.35;
  text-align: center;
}
.postpone-cell {
  text-align: center;
}
.postpone-date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  font-weight: 950;
}
.postpone-date-pill.due {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}
@media (max-width: 720px) {
  .popup-order-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 9px; }
  .popup-order-strip div { min-height: 62px; padding: 7px 3px; }
  .popup-order-strip span { font-size: 10px; }
  .popup-order-strip b { font-size: 11.5px; }
}
.close-x { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--ink-3); transition: all 0.14s; }
.close-x:hover { background: var(--danger-soft); color: var(--danger); }
.close-x svg { width: 20px; height: 20px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.cities-settings-table {
  overflow: auto;
  margin-top: 16px;
}
.mini-settings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 820px;
}
.mini-settings-table th,
.mini-settings-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6edf5;
  text-align: right;
  font-weight: 800;
  color: var(--ink);
}
.mini-settings-table th {
  color: #64748b;
  font-size: 12px;
  background: #f8fafc;
}
.mini-settings-table td small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
}
.mini-actions {
  white-space: nowrap;
}
@media (max-width: 720px) {
  .settings-card-head {
    align-items: stretch;
    flex-direction: column;
  }
}

.confirm-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; margin: 0 auto 16px; }
.confirm-icon svg { width: 28px; height: 28px; }

/* ===================== COLIATY UPLOAD ===================== */
.upload-hero {
  display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center;
  padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #ecfdf5, #f8fafc);
  border: 1px solid rgba(16, 185, 129, 0.2); margin-bottom: 16px;
}
.upload-hero-icon {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  color: #059669; background: #d1fae5; box-shadow: 0 14px 28px rgba(5, 150, 105, 0.14);
}
.upload-hero-icon svg { width: 28px; height: 28px; }
.upload-hero h3 { font-size: 18px; margin-bottom: 4px; color: var(--ink); }
.upload-hero p { color: var(--ink-2); font-size: 13.5px; line-height: 1.8; font-weight: 700; }
.claim-select-wrap { position: relative; }
.claim-select-btn {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-weight: 950;
  font-size: 15px;
  cursor: pointer;
}
.claim-select-btn svg { width: 18px; height: 18px; color: var(--ink-2); }
.claim-select-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .16);
  z-index: 40;
  display: none;
}
.claim-select-menu.show { display: grid; gap: 7px; }
.claim-select-option,
.claim-template {
  border: 1px solid transparent;
  background: #f8fafc;
  border-radius: 12px;
  padding: 11px 12px;
  text-align: right;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.claim-select-option {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 4px 10px;
  align-items: center;
}
.claim-select-option i {
  grid-row: 1 / span 3;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--claim-color), white 84%);
  color: var(--claim-color);
}
.claim-select-option i svg { width: 19px; height: 19px; }
.claim-select-option:hover,
.claim-select-option.active,
.claim-template:hover {
  transform: translateY(-1px);
  border-color: var(--claim-color, #0fb083);
  background: color-mix(in srgb, var(--claim-color, #0fb083), white 91%);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--claim-color, #0fb083), transparent 82%);
}
.claim-select-option b { display: block; color: var(--ink); font-size: 15px; font-weight: 950; margin-bottom: 1px; }
.claim-select-option span { display: block; color: var(--claim-color, #0f766e); font-size: 12.5px; font-weight: 950; margin-bottom: 3px; direction: ltr; text-align: left; }
.claim-select-option small,
.claim-template { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.7; font-weight: 800; }
.claim-templates { margin-top: 10px; display: grid; gap: 8px; }
.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}
.modal .field label.reprogram-choice-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.reprogram-choice-label small {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid #f1c48f;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a4f14;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
}
.claim-template-title { color: var(--ink); font-size: 14px; font-weight: 950; }
.claim-template { white-space: pre-line; width: 100%; }
.return-demand-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 900;
}
.return-demand-card span {
  color: #64748b;
  font-size: 12px;
}
.return-demand-card b {
  color: #0f172a;
  font-size: 18px;
  letter-spacing: .02em;
}
.return-demand-card small {
  color: #16a34a;
  font-size: 13px;
}
.modal .field label { font-size: 14px; font-weight: 950; }
.modal .input { font-size: 15px; font-weight: 800; }
.upload-preview-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.upload-preview-card {
  position: relative; overflow: hidden; border-radius: 15px; background: #fff;
  border: 1px solid var(--line); transition: all 0.16s;
}
.upload-preview-card:hover,
.upload-preview-card.show-actions { border-color: rgba(15, 157, 110, 0.42); box-shadow: var(--shadow-sm); }
.upload-preview-card.saved { background: #a8d7b6; border-color: #5fb878; }
.upload-preview-main {
  width: 100%; min-height: 74px; display: block; text-align: start; padding: 12px;
  background: transparent; color: inherit;
}
.upload-preview-main b { display: block; color: var(--ink); font-weight: 900; margin-bottom: 3px; }
.upload-preview-main span { color: var(--ink-3); font-size: 12px; font-weight: 800; word-break: break-word; }
.upload-preview-actions {
  display: none; gap: 8px; padding: 0 10px 10px;
}
.upload-preview-card.show-actions .upload-preview-actions { display: flex; }
.upload-preview-actions button {
  flex: 1; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 11px; font-size: 12px; font-weight: 900;
}
.upload-preview-actions svg { width: 14px; height: 14px; }
.upload-preview-edit { background: #eef6ff; color: #2563eb; }
.upload-preview-remove { background: #fee2e2; color: #b91c1c; }
.upload-preview-empty {
  grid-column: 1 / -1; padding: 26px; border-radius: 16px; background: #f8fafc;
  border: 1px dashed rgba(100, 116, 139, 0.3); text-align: center; color: var(--ink-3); font-weight: 900;
}
.upload-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px;
}
.upload-summary div {
  min-height: 78px; display: grid; place-items: center; gap: 3px; border-radius: 17px;
  border: 1px solid var(--line); background: #fff;
}
.upload-summary b { font-size: 27px; line-height: 1; }
.upload-summary span { font-size: 12px; font-weight: 900; color: var(--ink-2); }
.upload-summary .ok { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.upload-summary .warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.upload-summary .bad { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.upload-section-title { margin: 12px 0 10px; }
.upload-section-title h3 { font-size: 16px; margin-bottom: 3px; color: var(--ink); }
.upload-section-title p { color: var(--ink-3); font-size: 12.5px; font-weight: 800; }
.upload-section-title.compact { margin-top: 18px; }
.upload-card-list { display: grid; gap: 12px; }
.upload-card {
  border-radius: 18px; border: 1px solid var(--line); background: #fff; padding: 14px;
  box-shadow: var(--shadow-sm);
}
.upload-card.invalid { border-color: #fed7aa; background: #fffaf3; }
.upload-card.failed { border-color: #fecaca; background: #fff5f5; }
.upload-card.failed .upload-save-inline { display: none; }
.upload-card.success { border-color: #bbf7d0; background: #f0fdf4; }
.upload-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.upload-card-head strong { display: block; color: var(--ink); font-size: 15px; font-weight: 900; }
.upload-card-head small { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 800; margin-top: 2px; }
.upload-edit-btn { min-height: 38px; padding: 8px 12px; }
.upload-edit-btn svg { width: 17px; height: 17px; }
.upload-save-inline { min-height: 38px; padding: 8px 12px; }
.upload-save-inline svg { width: 17px; height: 17px; }
.upload-ok-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px;
  background: #dcfce7; color: #047857; font-size: 12px; font-weight: 900;
}
.upload-ok-badge svg { width: 16px; height: 16px; }
.upload-field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
.upload-field {
  padding: 9px 10px; border-radius: 12px; background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.upload-field span { display: block; color: var(--ink-3); font-size: 11px; font-weight: 900; margin-bottom: 3px; }
.upload-field b { display: block; color: var(--ink); font-size: 13px; font-weight: 900; word-break: break-word; }
.upload-field.has-error {
  background: #fff1f2; border-color: #fb7185; box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.08);
}
.upload-field.has-error span, .upload-field.has-error b { color: #9f1239; }
.upload-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 9px; }
.upload-edit-field {
  display: grid; gap: 5px; padding: 9px 10px; border-radius: 13px;
  background: rgba(248, 250, 252, 0.94); border: 1px solid rgba(148, 163, 184, 0.22);
}
.upload-edit-field span { color: var(--ink-3); font-size: 11px; font-weight: 900; }
.upload-edit-field input {
  width: 100%; min-width: 0; border: 0; outline: none; background: transparent;
  color: var(--ink); font-family: inherit; font-size: 13px; font-weight: 900;
}
.upload-city-picker { position: relative; }
.upload-city-picker .smart-options {
  inset-inline: 0; top: calc(100% + 8px); max-height: 220px; overflow: auto;
  border-radius: 14px; box-shadow: 0 18px 36px rgba(15, 27, 45, 0.16);
  z-index: 80;
}
.upload-city-picker .smart-option { min-height: 38px; justify-content: flex-start; }
.upload-edit-field:focus-within { background: #fff; border-color: #0f9d6e; box-shadow: 0 0 0 3px rgba(15, 157, 110, 0.12); }
.upload-edit-field.has-error { background: #fff1f2; border-color: #fb7185; }
.upload-editable-card.saved { border-color: #5fb878; background: #a8d7b6; }
.upload-retry-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.upload-quick-edit {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  padding: 20px; background: rgba(15, 27, 45, 0.32); backdrop-filter: blur(3px);
  border-radius: var(--radius-lg);
}
.upload-quick-panel {
  width: min(680px, 100%); border-radius: 18px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 16px;
}
.upload-quick-head,
.upload-quick-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.upload-quick-head b { font-size: 17px; font-weight: 950; color: var(--ink); }
.upload-quick-actions { justify-content: flex-end; margin: 14px 0 0; }
.upload-issues { display: grid; gap: 7px; margin-top: 10px; }
.upload-issues div {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(244, 63, 94, 0.15);
}
.upload-issues b { color: #9f1239; font-size: 12px; font-weight: 900; }
.upload-issues span { color: #7f1d1d; font-size: 12px; font-weight: 800; text-align: end; }
.upload-empty-done {
  min-height: 170px; display: grid; place-items: center; align-content: center; gap: 8px;
  border-radius: 18px; background: #ecfdf5; border: 1px solid #bbf7d0; color: #047857;
}
.upload-empty-done svg { width: 42px; height: 42px; }
.upload-empty-done b { font-size: 17px; font-weight: 900; }
.upload-empty-done span { color: #065f46; font-size: 13px; font-weight: 800; }

/* ===================== SETTINGS ===================== */
.settings-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.seg { padding: 10px 18px; border-radius: 13px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--glass-stroke); transition: all 0.15s; }
.seg:hover { background: rgba(255,255,255,0.8); }
.seg.active { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-glow); border-color: transparent; }

.settings-card { padding: 26px; margin-bottom: 20px; }
.settings-card h3 { font-size: 17px; margin-bottom: 4px; }
.settings-card .muted { color: var(--ink-3); font-size: 13px; margin-bottom: 20px; }
.team-grid,
.perf-shell {
  display: grid;
  gap: 18px;
}
.team-panel,
.perf-card {
  padding: 22px;
  border-radius: 18px;
}
.team-panel h3,
.perf-card h3 {
  margin: 0;
  font-size: 19px;
}
.team-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}
.team-form.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.team-card-head,
.perf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.team-card-head p,
.perf-head span {
  margin: 5px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}
.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink-2);
}
.team-checks {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--glass-stroke);
}
.team-checks h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink-2);
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px;
}
.check-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--glass-stroke);
  border-radius: 12px;
  background: rgba(255,255,255,.64);
  font-weight: 800;
  color: var(--ink-2);
}

.team-shell {
  display: grid;
  gap: 18px;
  max-width: 1280px;
}

.team-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.64)),
    radial-gradient(620px 220px at 10% 0%, rgba(16,185,129,.16), transparent 65%),
    radial-gradient(520px 260px at 100% 0%, rgba(99,102,241,.14), transparent 62%);
}

.team-hero::after {
  content: '';
  position: absolute;
  inset-inline-end: -80px;
  inset-block-start: -80px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(15,157,110,.09);
  pointer-events: none;
}

.team-hero-copy { position: relative; z-index: 1; }
.team-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15,157,110,.1);
  color: var(--primary-700);
  border: 1px solid rgba(15,157,110,.16);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}

.team-hero h2 {
  font-size: clamp(25px, 3vw, 38px);
  margin: 0 0 8px;
}

.team-hero p {
  max-width: 620px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 700;
  margin: 0;
}

.team-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 10px;
}

.team-hero-stats div {
  min-width: 92px;
  padding: 14px 16px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-sm);
}

.team-hero-stats b {
  display: block;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
}

.team-hero-stats span {
  display: block;
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 900;
}

.team-create-card {
  padding: 20px;
  border-radius: 22px;
}

.team-section-head,
.team-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.team-section-head > div:last-child,
.team-list-head > div {
  min-width: 0;
}

.team-section-head h3,
.team-list-head h3 {
  margin: 0;
  font-size: 18px;
}

.team-section-head p,
.team-list-head p {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 800;
}

.team-section-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary-grad);
  box-shadow: var(--shadow-glow);
  flex: 0 0 auto;
}

.team-section-icon svg { width: 20px; height: 20px; }

.team-create-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 1fr) minmax(130px, .75fr) minmax(180px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
}

.team-create-grid .field,
.team-edit-grid .field {
  margin: 0;
}

.team-create-btn {
  min-height: 48px;
  padding-inline: 22px;
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.team-user-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.66)),
    radial-gradient(320px 160px at 0% 0%, rgba(15,157,110,.08), transparent 70%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.team-user-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.team-user-card.is-admin {
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.68)),
    radial-gradient(320px 160px at 0% 0%, rgba(99,102,241,.12), transparent 70%);
}

.team-card-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 1000;
  background: linear-gradient(135deg, #0f9d6e, #2f80ed);
  box-shadow: 0 14px 30px rgba(15,157,110,.18);
}

.team-card-title h3 {
  margin: 0;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card-title p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 0;
}

.team-role-pill,
.team-active-pill,
.team-off-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 1000;
}

.team-role-pill {
  background: rgba(15,23,42,.06);
  color: var(--ink-2);
}

.team-active-pill {
  background: rgba(22,163,74,.12);
  color: #047857;
}

.team-off-pill {
  background: rgba(226,59,59,.12);
  color: #b91c1c;
}

.team-switch {
  position: relative;
  width: 50px;
  height: 30px;
}

.team-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.team-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(148,163,184,.26);
  border: 1px solid rgba(148,163,184,.25);
  transition: background .18s ease, box-shadow .18s ease;
}

.team-switch span::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease;
}

.team-switch input:checked + span {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  box-shadow: 0 10px 24px rgba(15,157,110,.18);
}

.team-switch input:checked + span::after {
  transform: translateX(20px);
}

body[dir="rtl"] .team-switch input:checked + span::after {
  transform: translateX(-20px);
}

.team-switch input:disabled + span {
  opacity: .55;
  cursor: not-allowed;
}

.team-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 18px;
  background: rgba(248,250,252,.58);
}

.team-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(148,163,184,.28);
}

.team-card-foot span {
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 900;
}

.team-card-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.team-card-actions .btn {
  min-width: 105px;
}

.team-edit-grid .tm-password {
  direction: ltr;
  font-weight: 900;
}

.team-edit-grid small {
  display: block;
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .team-hero {
    grid-template-columns: 1fr;
  }
  .team-hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .team-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team-create-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .team-hero,
  .team-create-card,
  .team-user-card {
    padding: 16px;
    border-radius: 18px;
  }
  .team-hero-stats,
  .team-create-grid,
  .team-edit-grid,
  .team-members-grid {
    grid-template-columns: 1fr;
  }
  .team-card-foot {
    align-items: stretch;
    flex-direction: column;
  }
}

.perf-modern {
  gap: 20px;
}
.perf-hero {
  min-height: 156px;
  padding: 24px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(15,176,131,.16), rgba(46,130,177,.12)),
    rgba(255,255,255,.82);
}
.perf-hero::after {
  content: '';
  position: absolute;
  inset-inline-start: 22px;
  inset-block-end: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15,176,131,.22), transparent 68%);
  pointer-events: none;
}
.perf-hero-copy {
  position: relative;
  z-index: 1;
}
.perf-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15,176,131,.12);
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}
.perf-hero h2 {
  margin: 10px 0 6px;
  font-size: 34px;
  color: var(--ink);
}
.perf-hero p {
  margin: 0;
  color: var(--ink-2);
  font-weight: 800;
}
.perf-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
  min-width: min(420px, 100%);
  position: relative;
  z-index: 1;
}
.perf-hero-stats div,
.perf-metric {
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(255,255,255,.72);
  border-radius: 18px;
  padding: 15px;
}
.perf-hero-stats b {
  display: block;
  font-size: 28px;
  color: var(--brand-2);
}
.perf-hero-stats span,
.perf-metric span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 900;
}
.perf-control {
  padding: 12px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.perf-range-tabs {
  display: inline-flex;
  gap: 7px;
  padding: 6px;
  border-radius: 15px;
  background: rgba(15, 23, 42, .05);
}
.perf-range-btn {
  border: 0;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 900;
}
.perf-range-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #0fb083, #2e82b1);
  box-shadow: 0 12px 24px rgba(15,176,131,.18);
}
.perf-user-filter {
  min-width: 260px;
  position: relative;
}
.perf-user-filter svg {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--ink-3);
}
.perf-user-filter .input {
  width: 100%;
  padding-inline-start: 42px;
}
.perf-overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.perf-detail-panel {
  padding: 18px;
  border-radius: 20px;
  display: grid;
  gap: 16px;
}
.perf-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.perf-detail-head span {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 900;
}
.perf-detail-head h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 20px;
}
.perf-detail-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .05);
}
.perf-detail-btn {
  border: 0;
  min-width: 118px;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 950;
}
.perf-detail-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #0fb083, #2e82b1);
  box-shadow: 0 14px 28px rgba(46,130,177,.18);
}
.perf-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.perf-detail-card {
  min-height: 92px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(255,255,255,.72);
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-areas:
    "icon value"
    "icon label";
  align-items: center;
  column-gap: 10px;
}
.perf-detail-card div {
  grid-area: icon;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0fb083, #2e82b1);
}
.perf-detail-card svg { width: 19px; height: 19px; }
.perf-detail-card b {
  grid-area: value;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}
.perf-detail-card span {
  grid-area: label;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 950;
}
.perf-detail-card.tone-red div { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.perf-detail-card.tone-amber div { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.perf-detail-card.tone-purple div { background: linear-gradient(135deg, #8b5cf6, #2563eb); }
.perf-detail-card.tone-slate div { background: linear-gradient(135deg, #64748b, #0f172a); }
.perf-detail-card.tone-blue div { background: linear-gradient(135deg, #2e82b1, #2563eb); }
.perf-detail-card.tone-green div { background: linear-gradient(135deg, #0fb083, #16a34a); }
.perf-user-breakdown {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, .35);
}
.perf-user-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(220px, 2fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248,250,252,.78);
}
.perf-user-line b {
  color: var(--ink);
  font-size: 13px;
}
.perf-user-line > span {
  min-width: 34px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(15,176,131,.12);
  color: #047857;
  font-size: 12px;
  font-weight: 950;
}
.perf-user-line div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}
.perf-user-line i {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .25);
  color: var(--ink-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
@media (max-width: 980px) {
  .perf-user-line {
    grid-template-columns: 1fr;
  }
  .perf-detail-head {
    align-items: stretch;
    flex-direction: column;
  }
  .perf-detail-tabs {
    width: 100%;
  }
  .perf-detail-btn {
    flex: 1;
    min-width: 0;
  }
  .perf-user-line div {
    justify-content: flex-start;
  }
}
.perf-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
}
.perf-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0fb083, #2e82b1);
}
.perf-metric-icon svg { width: 20px; height: 20px; }
.perf-metric b {
  display: block;
  font-size: 25px;
  color: var(--ink);
  line-height: 1;
}
.perf-metric.tone-red .perf-metric-icon { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.perf-metric.tone-amber .perf-metric-icon { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.perf-metric.tone-purple .perf-metric-icon { background: linear-gradient(135deg, #8b5cf6, #2563eb); }
.perf-metric.tone-slate .perf-metric-icon { background: linear-gradient(135deg, #64748b, #0f172a); }
.perf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.perf-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
}
.perf-card {
  border-radius: 22px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: var(--shadow-soft);
}
.perf-card.idle-hot {
  border-color: rgba(239, 68, 68, .38);
  background: linear-gradient(180deg, rgba(254,242,242,.9), rgba(255,255,255,.82));
}
.perf-member-top {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.perf-avatar {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0fb083, #2e82b1);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  box-shadow: 0 14px 24px rgba(15,176,131,.18);
}
.perf-member-title h3 {
  margin: 0;
  font-size: 20px;
}
.perf-member-title span {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.perf-member-title span.ok { background: #dcfce7; color: #15803d; }
.perf-member-title span.off { background: #fee2e2; color: #b91c1c; }
.perf-total {
  min-width: 68px;
  text-align: center;
  padding: 9px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .05);
}
.perf-total b {
  display: block;
  font-size: 22px;
  color: var(--ink);
}
.perf-total span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 900;
}
.perf-progress {
  margin: 18px 0 14px;
  display: grid;
  gap: 8px;
}
.perf-progress div {
  display: flex;
  justify-content: space-between;
  color: var(--ink-2);
  font-weight: 900;
  font-size: 13px;
}
.perf-progress i {
  display: block;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, .08);
  position: relative;
}
.perf-progress i::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #0fb083, #2e82b1);
}
.perf-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.perf-stats div {
  padding: 11px 8px;
  border-radius: 14px;
  background: rgba(248,250,252,.88);
  border: 1px solid rgba(148, 163, 184, .16);
  text-align: center;
}
.perf-stats b {
  display: block;
  font-size: 19px;
  color: var(--brand-2);
}
.perf-stats span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 900;
}
.perf-stats-filtered {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}
.perf-stats-filtered div {
  min-height: 66px;
  display: grid;
  place-items: center;
  align-content: center;
}
.perf-stats-filtered .tone-red b { color: #dc2626; }
.perf-stats-filtered .tone-amber b { color: #d97706; }
.perf-stats-filtered .tone-purple b { color: #7c3aed; }
.perf-stats-filtered .tone-slate b { color: #475569; }
.perf-stats-filtered .tone-blue b { color: #2563eb; }
.perf-stats-filtered .tone-green b { color: #059669; }
.perf-workline-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, .92), rgba(255, 255, 255, .97));
  border: 1px solid rgba(148, 163, 184, .22);
  display: grid;
  gap: 10px;
}
.perf-workline-head,
.perf-rate-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.perf-workline-head span,
.perf-rate-pill span {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 900;
}
.perf-workline-head b {
  color: var(--ink);
  font-size: 13px;
}
.perf-rate-pill {
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(16, 185, 129, .10);
  border: 1px solid rgba(16, 185, 129, .18);
}
.perf-rate-pill b {
  color: #059669;
  font-weight: 950;
}
.perf-work-days {
  display: grid;
  gap: 14px;
}
.perf-work-day {
  display: grid;
  gap: 5px;
}
.tl-day-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
}
.tl-day-head > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}
.tl-day-head small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 850;
}
.tl-day-head > b {
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
}
.perf-work-track {
  position: relative;
  height: 56px;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  direction: rtl;
}
.tl-baseline {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, .45);
  transform: translateY(-50%);
}
@keyframes perfRevealRTL {
  from { clip-path: inset(0 0 0 100%); }
  to { clip-path: inset(0 0 0 0); }
}
.perf-work-track .tl-seg {
  position: absolute;
  top: 8px;
  height: 40px;
  border-radius: 14px;
  cursor: help;
}
.perf-work-track .tl-seg.active {
  background: linear-gradient(135deg, #0fb083, #2e82b1);
  box-shadow: 0 10px 22px rgba(15, 176, 131, .18);
  animation: perfRevealRTL .55s cubic-bezier(.22, .61, .36, 1) both;
  transition: transform .15s ease, filter .15s ease;
}
.perf-work-track .tl-seg.active:hover {
  transform: translateY(-3px);
  filter: saturate(1.08);
}
.perf-work-track .tl-seg.idle {
  top: 0;
  height: 56px;
  background: repeating-linear-gradient(
    135deg,
    rgba(239, 68, 68, .10) 0 8px,
    rgba(239, 68, 68, .18) 8px 16px
  );
  border-inline: 1px dashed rgba(220, 38, 38, .28);
  border-radius: 12px;
}
.tl-logout {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #dc2626;
  background: #fff;
  border: 1px solid rgba(220, 38, 38, .22);
  box-shadow: 0 8px 18px rgba(220, 38, 38, .12);
  transform: translate(50%, -50%);
  z-index: 3;
}
.tl-logout svg {
  width: 13px;
  height: 13px;
}
.tl-hours {
  display: flex;
  justify-content: space-between;
  direction: rtl;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 850;
  padding: 0 1px;
}
.perf-time-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding-top: 13px;
  margin-top: 13px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}
.perf-time-row div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-weight: 900;
}
.perf-time-row svg { width: 16px; height: 16px; color: #0f9d6e; }
.perf-time-row b {
  font-size: 13px;
  color: var(--ink);
}
.perf-time-row small {
  grid-column: 1 / -1;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 900;
}
.perf-time-row.danger b,
.perf-time-row.danger small,
.perf-time-row.danger svg {
  color: #dc2626;
}
.perf-activity {
  position: sticky;
  top: 18px;
  padding: 18px;
  border-radius: 22px;
}
.perf-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.perf-panel-head span {
  display: block;
  color: #0f9d6e;
  font-size: 12px;
  font-weight: 900;
}
.perf-panel-head h3 {
  margin: 3px 0 0;
}
.perf-panel-head b {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: #047857;
}
.activity-list {
  display: grid;
  gap: 9px;
}
.activity-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 15px;
  background: rgba(248,250,252,.9);
  border: 1px solid rgba(148, 163, 184, .16);
}
.activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: #0fb083;
  box-shadow: 0 0 0 5px rgba(15,176,131,.12);
}
.activity-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.activity-main b {
  color: var(--ink);
}
.activity-main span {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
}
.activity-row small {
  grid-column: 2;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 900;
}
@media (max-width: 820px) {
  .team-form,
  .team-form.compact,
  .activity-row {
    grid-template-columns: 1fr;
  }
  .perf-control,
  .perf-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .perf-overview-grid,
  .perf-layout,
  .perf-hero-stats {
    grid-template-columns: 1fr;
  }
  .perf-activity {
    position: static;
  }
}
.popup-settings-textarea {
  min-height: 112px;
  line-height: 1.8;
  resize: vertical;
  background: color-mix(in srgb, var(--surface) 94%, #0fb083 6%);
}
.popup-settings-grid .field {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; background: rgba(255,255,255,0.5); border: 1px solid var(--line); margin-bottom: 8px; transition: all 0.14s; }
.list-row:hover { box-shadow: var(--shadow-sm); }
.list-row .grow { flex: 1; display: grid; gap: 3px; }
.list-row b { font-weight: 700; }
.list-row b small { color: #64748b; font-size: 12px; font-weight: 800; line-height: 1.5; }
.swatch { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line); flex-shrink: 0; }

.add-inline { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.add-inline .input { flex: 1; min-width: 140px; }

.color-field { display: flex; align-items: center; gap: 9px; }
.color-field input[type=color] { width: 42px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); cursor: pointer; padding: 2px; background: #fff; }
.scope-checks {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px;
  padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(248, 250, 252, 0.75);
}
.scope-check {
  min-height: 40px; display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 11px; background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22); cursor: pointer;
  font-size: 13px; font-weight: 800; color: var(--ink);
}
.scope-check:hover { border-color: rgba(234, 140, 52, 0.42); background: #fff7ed; }
.scope-check input { width: 17px; height: 17px; accent-color: #ea8c34; cursor: pointer; }

.webhook-box { background: #0f1b2d; color: #d7f5e8; border-radius: 14px; padding: 16px 18px; font-family: 'SF Mono', Menlo, monospace; font-size: 13px; direction: ltr; text-align: left; position: relative; word-break: break-all; line-height: 1.7; }
.webhook-box .copy-btn { position: absolute; top: 12px; inset-inline-end: 12px; background: rgba(255,255,255,0.12); color: #fff; padding: 5px 11px; border-radius: 9px; font-size: 12px; font-weight: 700; }
.webhook-box .copy-btn:hover { background: rgba(255,255,255,0.22); }
.webhook-map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.webhook-map-grid div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: rgba(255,255,255,0.72); }
.webhook-map-grid b { display: block; direction: ltr; text-align: left; font-size: 12px; color: #0f172a; margin-bottom: 6px; }
.webhook-map-grid span { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: 999px; background: #ecfdf5; color: #047857; font-weight: 900; }
.webhook-map-input { margin-top: 10px; min-height: 104px; resize: vertical; line-height: 1.55; font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; text-align: left; }
.webhook-test-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; margin-bottom: 18px; }
.webhook-test-summary div, .webhook-test-fields div { border: 1px solid var(--line); border-radius: 12px; background: rgba(248,250,252,.9); padding: 12px; }
.webhook-test-summary span, .webhook-test-fields span { display: block; color: var(--ink-3); font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.webhook-test-summary b, .webhook-test-fields b { color: #0f172a; font-weight: 900; word-break: break-word; }
.webhook-test-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.webhook-test-fields h3 { grid-column: 1 / -1; margin: 0 0 2px; font-size: 15px; }
.webhook-test-error { margin-top: 14px; border: 1px solid #fecaca; background: #fee2e2; color: #991b1b; border-radius: 12px; padding: 12px; font-weight: 900; }
.webhook-test-raw { direction: ltr; text-align: left; white-space: pre-wrap; max-height: 260px; overflow: auto; background: #0f172a; color: #d1fae5; border-radius: 12px; padding: 14px; font-size: 12px; }
.webhook-queue-list { display: grid; gap: 8px; margin-top: 10px; }
.webhook-queue-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(248,250,252,.92); padding: 10px 12px; }
.webhook-queue-row b { color: #0f172a; font-weight: 900; }
.webhook-queue-row span { color: #64748b; font-size: 12px; font-weight: 800; }
.webhook-queue-row small { grid-column: 1 / -1; color: #475569; font-weight: 800; }
.webhook-queue-row.done { border-color: #bbf7d0; background: #f0fdf4; }
.webhook-queue-row.failed { border-color: #fecaca; background: #fef2f2; }
.webhook-queue-row.processing, .webhook-queue-row.pending, .webhook-queue-row.retry { border-color: #fed7aa; background: #fff7ed; }
.whatsapp-vars-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 16px; }
.wa-template-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.whatsapp-auto-template-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(14, 165, 233, .22);
  background: linear-gradient(135deg, rgba(240,253,250,.95), rgba(239,246,255,.94));
  border-radius: 18px;
  padding: 16px;
  margin: 16px 0;
}
.whatsapp-auto-template-card h4 { margin: 0 0 4px; color: #0f172a; font-weight: 950; }
.whatsapp-auto-template-card p { margin: 0; color: #475569; font-weight: 800; line-height: 1.7; }
.whatsapp-auto-template-card small {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  color: #0f766e;
  background: rgba(20,184,166,.12);
  border: 1px solid rgba(20,184,166,.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
}

.push-settings-card .settings-card-head {
  align-items: flex-start;
}

.push-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.push-status-pill.on {
  background: #dcfce7;
  color: #047857;
}

.push-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.push-info-grid div {
  border: 1px solid rgba(16, 185, 129, .15);
  background: linear-gradient(135deg, #f8fffb, #f8fafc);
  border-radius: 16px;
  padding: 14px 16px;
}

.push-info-grid span,
.push-device-row span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 5px;
}

.push-info-grid b {
  color: #0f172a;
  font-weight: 950;
}

.push-device-list {
  display: grid;
  gap: 10px;
}

.push-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(248, 250, 252, .86);
  padding: 13px 15px;
}

.push-device-row.on {
  border-color: rgba(16, 185, 129, .28);
  background: #f0fdf4;
}

.push-device-row b {
  color: #0f172a;
  font-weight: 950;
}

.push-device-row small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 950;
}

.push-device-row.on small {
  background: #bbf7d0;
  color: #047857;
}
.wf-template-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.wf-template-summary div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  border: 1px solid rgba(20,184,166,.16);
  background: rgba(240,253,250,.82);
  border-radius: 14px;
  padding: 10px 12px;
}
.wf-template-summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.wf-template-summary b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.wf-template-manual {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, .7fr);
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(59,130,246,.16);
  background: linear-gradient(135deg, rgba(239,246,255,.96), rgba(240,253,250,.94));
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
}
.wf-template-manual .field:nth-child(3),
.wf-template-manual .field:nth-child(4) {
  grid-column: auto;
}
.wf-fixed-vars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.wf-fixed-vars div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(20,184,166,.18);
  background: #f0fdfa;
  border-radius: 15px;
  padding: 12px;
}
.wf-fixed-vars span {
  width: fit-content;
  direction: ltr;
  color: #0f766e;
  background: rgba(20,184,166,.14);
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 950;
}
.wf-fixed-vars b { color: #0f172a; font-weight: 950; }
.wf-fixed-vars small { color: #64748b; font-weight: 800; line-height: 1.5; }
.wf-option-toggle {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.wf-option-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.wf-option-toggle span {
  grid-row: span 2;
  position: relative;
  width: 44px;
  height: 25px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}
.wf-option-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .2);
  transition: transform .18s ease;
}
.wf-option-toggle b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
}
.wf-option-toggle small {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1.5;
}
.wf-option-toggle.on {
  border-color: #bbf7d0;
  background: #ecfdf5;
  box-shadow: 0 10px 26px rgba(16, 185, 129, .08);
}
.wf-option-toggle.on span {
  background: #10b981;
}
.wf-option-toggle.on span::after {
  transform: translateX(19px);
}
body[dir="rtl"] .wf-option-toggle.on span::after,
html[dir="rtl"] .wf-option-toggle.on span::after {
  transform: translateX(-19px);
}
.wf-first-reply-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, .16), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}
.wf-first-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.wf-first-reply-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wf-first-reply-head > div > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 16px;
  background: linear-gradient(135deg, #10b981, #2563eb);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
}
.wf-first-reply-head svg {
  width: 20px;
  height: 20px;
}
.wf-first-reply-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
}
.wf-first-reply-head p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 850;
}
.wf-first-reply-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.wf-first-reply-card textarea.input {
  min-height: 112px;
  resize: vertical;
}
.wf-first-occasion-box {
  display: grid;
  gap: 10px;
}
.wf-first-occasion-box .wf-option-toggle {
  margin-top: 0;
}
.wf-first-reply-inline {
  display: grid;
  gap: 14px;
}
.wf-first-reply-inline .btn {
  justify-self: start;
}
.wa-send-selected-btn {
  background: linear-gradient(135deg, #10b981, #2563eb) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 12px 26px rgba(16, 185, 129, .18);
}
.wa-bulk-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, .18), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fffc);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}
.wa-bulk-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #2563eb);
  box-shadow: 0 16px 30px rgba(37, 99, 235, .18);
}
.wa-bulk-icon svg {
  width: 25px;
  height: 25px;
}
.wa-bulk-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  font-weight: 1000;
}
.wa-bulk-panel p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.7;
}
.wa-bulk-template-line {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid rgba(20, 184, 166, .28);
  font-size: 12px;
  font-weight: 950;
  direction: ltr;
}
.wa-bulk-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.wa-bulk-stats article {
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
}
.wa-bulk-stats span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.wa-bulk-stats b {
  color: #0f172a;
  font-size: 34px;
  font-weight: 1000;
  line-height: 1;
}
.wa-bulk-stats article.ok {
  border-color: rgba(16, 185, 129, .25);
  background: #ecfdf5;
}
.wa-bulk-stats article.danger {
  border-color: rgba(239, 68, 68, .25);
  background: #fef2f2;
}
.wa-bulk-stats article.danger b {
  color: #dc2626;
}
.wa-bulk-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #475569;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-weight: 850;
}
.wa-bulk-issue {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #991b1b;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}
.wa-bulk-issue > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.wa-bulk-issue b {
  font-weight: 1000;
}
.wa-bulk-issue span {
  display: block;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.wa-bulk-issue .btn {
  flex: 0 0 auto;
  min-height: 40px;
  border-radius: 14px;
  color: #ffffff;
}
.wa-bulk-issue .btn span,
.wa-bulk-issue .btn svg {
  color: #ffffff;
}
@media (max-width: 720px) {
  .wa-bulk-issue { align-items: stretch; flex-direction: column; }
  .wa-bulk-issue .btn { width: 100%; }
  .wf-template-manual,
  .wf-fixed-vars { grid-template-columns: 1fr; }
  .wf-first-reply-head { align-items: stretch; flex-direction: column; }
  .wf-first-reply-grid { grid-template-columns: 1fr; }
}
.wa-template-list { display: grid; gap: 14px; margin-top: 12px; }
.wa-template-card {
  border: 1px solid rgba(148, 163, 184, .24);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.94));
  border-radius: 16px;
  padding: 14px;
}
.wa-template-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wa-template-card-head b { color: #0f172a; font-weight: 950; }
.wa-template-remove {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
}
.wa-template-remove svg { width: 16px; height: 16px; }
.wa-template-vars { display: grid; gap: 8px; margin-top: 12px; }
.wa-template-var {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(20,184,166,.16);
  background: #f0fdfa;
  border-radius: 12px;
  padding: 8px;
}
.wa-template-var span { direction: ltr; color: #0f766e; font-weight: 950; }
.whatsapp-preview-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, .5);
  background: #f8fafc;
  border-radius: 14px;
  padding: 14px;
  color: #64748b;
  font-weight: 850;
}
.whatsapp-template-preview {
  margin-top: 16px;
  border: 1px solid rgba(20, 184, 166, .26);
  background: linear-gradient(180deg, #ecfdf5, #f8fffc);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.whatsapp-template-preview b { color: #065f46; font-size: 16px; font-weight: 950; }
.whatsapp-template-preview span,
.whatsapp-template-preview p { color: #475569; font-weight: 800; margin: 0; }
.whatsapp-template-preview .whatsapp-final-preview { background: #fff; border: 1px solid rgba(16,185,129,.18); border-radius: 12px; padding: 12px; color: #0f172a; line-height: 1.8; }
.whatsapp-template-preview ul { display: grid; gap: 8px; padding: 0; margin: 4px 0 0; list-style: none; }
.whatsapp-template-preview li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 12px; background: #fff; border: 1px solid rgba(16, 185, 129, .16); padding: 9px 11px; }
.whatsapp-template-preview small { color: #059669; font-weight: 950; direction: ltr; }
.whatsapp-template-preview strong { color: #0f172a; font-weight: 950; text-align: end; word-break: break-word; }
.wa-flows-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .9fr);
  gap: 16px;
  margin-bottom: 16px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(20, 184, 166, .22);
  background:
    radial-gradient(circle at 18% 10%, rgba(20, 184, 166, .18), transparent 34%),
    linear-gradient(135deg, #f8fffc, #eef7ff);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}
.wa-flows-hero > div:first-child {
  display: grid;
  gap: 7px;
}
.wa-flows-hero span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .02em;
}
.wa-flows-hero h3 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  font-weight: 1000;
}
.wa-flows-hero p {
  margin: 0;
  max-width: 760px;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.8;
}
.wa-flow-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.wa-flow-stats article {
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 3px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(148, 163, 184, .18);
}
.wa-flow-stats b {
  color: #0f172a;
  font-size: 27px;
  font-weight: 1000;
}
.wa-flow-stats span {
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}
.wa-flows-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.wa-flows-toolbar h3 {
  margin: 0;
  color: #0f172a;
}
.wa-flows-toolbar > div:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wa-flow-list {
  display: grid;
  gap: 14px;
}
.wa-flow-card {
  border: 1px solid rgba(148, 163, 184, .2);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .05);
}
.wa-flow-card.off {
  opacity: .72;
  filter: grayscale(.12);
}
.wa-flow-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.wa-flow-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #2f80ed);
  box-shadow: 0 12px 26px rgba(16, 185, 129, .22);
}
.wa-flow-icon svg {
  width: 20px;
  height: 20px;
}
.wa-flow-head b {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 1000;
}
.wa-flow-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}
.wa-flow-switch {
  margin-inline-start: auto;
  position: relative;
  width: 54px;
  height: 30px;
  cursor: pointer;
}
.wa-flow-switch input {
  position: absolute;
  opacity: 0;
}
.wa-flow-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}
.wa-flow-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  inset-inline-start: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .16);
  transition: transform .18s ease;
}
.wa-flow-switch input:checked + span {
  background: linear-gradient(135deg, #10b981, #2f80ed);
}
.wa-flow-switch input:checked + span::after {
  transform: translateX(24px);
}
body[dir=rtl] .wa-flow-switch input:checked + span::after {
  transform: translateX(-24px);
}
.wa-flow-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 9px;
}
.wa-flow-sections label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .18);
  color: #334155;
  font-size: 12.5px;
  font-weight: 900;
}
.wa-flow-sections input {
  width: 17px;
  height: 17px;
  accent-color: #10b981;
}
.wa-flow-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, .28);
}
.wa-flow-foot > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.wf-builder-shell {
  min-height: 720px;
  height: calc(100vh - 230px);
  display: flex;
  overflow: hidden;
  border: 1px solid #e9eef1;
  border-radius: 24px;
  background: #eef2f1;
  box-shadow: 0 18px 44px rgba(16, 40, 30, .1);
}
.wf-sidebar {
  width: 288px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-inline-start: 1px solid #e9eef1;
}
.wf-side-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 14px;
}
.wf-logo {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(180deg, #26bd60 0%, #15a14a 100%);
  box-shadow: 0 8px 18px rgba(22, 163, 74, .3);
}
.wf-logo svg {
  width: 19px;
  height: 19px;
}
.wf-side-head h3 {
  margin: 0;
  color: #22303c;
  font-size: 18px;
  font-weight: 1000;
}
.wf-side-head p {
  margin: 1px 0 0;
  color: #93a0ac;
  font-size: 12px;
  font-weight: 800;
}
.wf-new-flow {
  margin: 0 14px 8px;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #26bd60 0%, #15a14a 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 1000;
  box-shadow: 0 9px 20px rgba(22, 163, 74, .28);
}
.wf-new-flow svg {
  width: 18px;
  height: 18px;
}
.wf-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 14px;
}
.wf-list-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1.5px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, .7);
  color: #22303c;
  padding: 10px;
  margin-bottom: 9px;
  font: inherit;
  text-align: start;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.wf-list-card:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}
.wf-list-card.active {
  background: linear-gradient(135deg, #eefdf5, #ffffff);
  border-color: #d6f1e0;
}
.wf-list-select {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 0;
  text-align: start;
  font: inherit;
}
.wf-flow-number {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #ffffff;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .16);
}
.wf-flow-main,
.wf-flow-detail {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.wf-flow-main b {
  color: #22303c;
  font-size: 14px;
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-flow-main small,
.wf-flow-detail small {
  color: #93a0ac;
  font-size: 10.5px;
  font-weight: 950;
}
.wf-flow-detail {
  grid-column: 2;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(241, 245, 249, .86);
}
.wf-flow-detail b {
  color: #0f172a;
  direction: ltr;
  font-size: 12px;
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-list-toggle {
  align-self: stretch;
  min-width: 74px;
  border-radius: 15px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 7px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 1000;
}
.wf-list-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.wf-list-toggle span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}
.wf-list-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}
.wf-list-toggle.on {
  color: #059669;
  border-color: #bbf7d0;
  background: #ecfdf5;
}
.wf-list-toggle.on span {
  background: #10b981;
}
.wf-list-toggle.on span::after {
  transform: translateX(16px);
}
body[dir="rtl"] .wf-list-toggle.on span::after,
html[dir="rtl"] .wf-list-toggle.on span::after {
  transform: translateX(-16px);
}
.wf-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wf-list-top b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #22303c;
  font-size: 14.5px;
  font-weight: 1000;
}
.wf-list-top i {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
}
.wf-list-top i.on {
  background: #e9f8ef;
  color: #16a34a;
}
.wf-list-top i.off {
  background: #eef1f3;
  color: #93a0ac;
}
.wf-list-desc {
  color: #54616e;
  font-size: 12px;
  font-weight: 850;
}
.wf-list-desc em {
  display: inline-flex;
  margin-inline-start: 5px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e9eef1;
  color: #22303c;
  font-style: normal;
}
.wf-list-card small {
  color: #93a0ac;
  font-size: 11px;
  font-weight: 900;
}
.wf-builder {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.wf-builder-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 22px;
  border-bottom: 1px solid #e9eef1;
  background: #ffffff;
}
.wf-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
#wf-name {
  min-width: 260px;
  max-width: 520px;
  border: 0;
  outline: 0;
  border-radius: 10px;
  background: transparent;
  color: #22303c;
  padding: 7px 9px;
  font: inherit;
  font-size: 18px;
  font-weight: 1000;
}
#wf-name:focus {
  background: #e9f8ef;
}
.wf-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #54616e;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}
.wf-toggle input {
  position: absolute;
  opacity: 0;
}
.wf-toggle span {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cdd6da;
  transition: background .18s ease;
}
.wf-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .2);
  transition: transform .18s ease;
}
.wf-toggle.on span {
  background: #16a34a;
}
.wf-toggle.on span::after {
  transform: translateX(18px);
}
body[dir=rtl] .wf-toggle.on span::after {
  transform: translateX(-18px);
}
.wf-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wf-builder-body {
  flex: 1;
  min-height: 0;
  display: flex;
}
.wf-canvas {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 34px 24px 80px;
  background:
    radial-gradient(circle at 1px 1px, #d4dcd9 1px, transparent 0) 0 0/22px 22px;
}
.wf-stack {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wf-node {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #e9eef1;
  background: #ffffff;
  box-shadow: 0 3px 16px rgba(20, 50, 35, .07);
}
.wf-node.trigger { border-color: #d6f1e0; }
.wf-node-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid #f1f4f6;
}
.wf-node-head > span {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #16a34a;
  background: #e9f8ef;
}
.wf-node.message .wf-node-head > span { color: #16a34a; background: #e9f8ef; }
.wf-node.wait .wf-node-head > span { color: #e8a13a; background: #fdf2e2; }
.wf-node.condition .wf-node-head > span { color: #3a8fd9; background: #e7f1fb; }
.wf-node.note .wf-node-head > span { color: #8b5cf6; background: #f0ebfe; }
.wf-node-head svg {
  width: 19px;
  height: 19px;
}
.wf-node-head b {
  display: block;
  color: #22303c;
  font-size: 14.5px;
  font-weight: 1000;
}
.wf-node-head small {
  color: #93a0ac;
  font-size: 11.5px;
  font-weight: 850;
}
.wf-node-body {
  padding: 14px 16px;
}
.wf-segment {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.wf-segment button {
  border: 1.5px solid #e9eef1;
  border-radius: 11px;
  background: #ffffff;
  color: #54616e;
  cursor: pointer;
  padding: 8px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 950;
}
.wf-segment button.sel {
  color: #16a34a;
  background: #e9f8ef;
  border-color: #16a34a;
}
.wf-connector {
  width: 2px;
  height: 31px;
  position: relative;
  background: #cdd6da;
}
.wf-connector button {
  position: absolute;
  top: 50%;
  right: 50%;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1.5px dashed #b9c4ca;
  background: #ffffff;
  color: #93a0ac;
  display: grid;
  place-items: center;
  transform: translate(50%, -50%);
  opacity: 0;
}
.wf-connector:hover button {
  opacity: 1;
  color: #16a34a;
  border-color: #16a34a;
}
.wf-message-preview {
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: 13px;
  border-top-right-radius: 4px;
  background: #e9f8ef;
  color: #22303c;
  line-height: 1.8;
  font-size: 13.5px;
  font-weight: 850;
}
.wf-steps-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wf-add-step {
  min-height: 44px;
  margin: 14px 0;
  padding: 10px 22px;
  border: 1.5px dashed #d6f1e0;
  border-radius: 999px;
  background: #ffffff;
  color: #16a34a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 1000;
  box-shadow: 0 1px 2px rgba(16,40,30,.06);
}
.wf-add-step:hover {
  background: #e9f8ef;
  border-color: #16a34a;
}
.wf-add-step svg {
  width: 17px;
  height: 17px;
}
.wf-step-delete {
  min-width: 72px;
  height: 32px;
  margin-inline-start: auto;
  padding: 0 11px;
  border: 1px solid #ffd3dc;
  border-radius: 999px;
  background: #fff5f7;
  color: #e11d48;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
}
.wf-step-delete:hover {
  background: #fdecf1;
  border-color: #fb7185;
  color: #be123c;
}
.wf-step-delete svg {
  width: 16px;
  height: 16px;
}
.is-hidden {
  display: none !important;
}
.wf-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.wf-section-grid label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e9eef1;
  background: #fbfcfc;
  color: #334155;
  font-size: 12.5px;
  font-weight: 900;
}
.wf-section-grid input {
  width: 17px;
  height: 17px;
  accent-color: #16a34a;
}
.wf-end {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px dashed #c9d2d7;
  border-radius: 999px;
  background: #ffffff;
  color: #93a0ac;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 950;
}
.wf-end svg {
  width: 15px;
  height: 15px;
}
.wf-preview {
  width: 330px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 18px;
  background: linear-gradient(160deg, #11271b, #0b1812);
}
.wf-preview-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.wf-preview-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cdeed8;
  font-size: 13px;
  font-weight: 950;
}
.wf-preview-head svg {
  width: 16px;
  height: 16px;
}
.wf-preview-head button {
  border: 0;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 1000;
}
.wf-phone {
  width: 280px;
  height: 560px;
  position: relative;
  padding: 11px;
  border-radius: 40px;
  background: #0a0a0a;
  box-shadow: 0 24px 50px rgba(0,0,0,.5);
}
.wf-notch {
  position: absolute;
  top: 11px;
  right: 50%;
  z-index: 5;
  width: 90px;
  height: 22px;
  border-radius: 0 0 14px 14px;
  background: #0a0a0a;
  transform: translateX(50%);
}
.wf-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  background: #efeae2;
}
.wf-wa-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 14px 10px;
  background: #10833b;
  color: #ffffff;
}
.wf-wa-top > span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #cfe9d6;
  color: #10833b;
  font-weight: 1000;
}
.wf-wa-top b {
  display: block;
  font-size: 13.5px;
}
.wf-wa-top small {
  font-size: 10.5px;
  opacity: .8;
}
.wf-wa-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 10px;
  background-image: url("data:image/svg+xml,%3Csvg width='70' height='70' viewBox='0 0 70 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d8cfc2' stroke-width='1' opacity='.5'%3E%3Ccircle cx='12' cy='14' r='2.5'/%3E%3Cpath d='M34 10 q4 4 0 8'/%3E%3Cpath d='M50 44 l6 0 M53 41 l0 6'/%3E%3C/g%3E%3C/svg%3E");
}
.wf-wa-body em {
  align-self: center;
  color: #8a9aa0;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.wf-wa-body p {
  max-width: 82%;
  align-self: flex-start;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border-top-right-radius: 3px;
  background: #ffffff;
  color: #22303c;
  box-shadow: 0 1px 1px rgba(0,0,0,.1);
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1.7;
}
.wf-wa-body small {
  align-self: flex-start;
  color: #10833b;
  background: #d9fdd3;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 900;
}
.wf-quick-preview {
  width: 82%;
  align-self: flex-start;
  display: grid;
  gap: 5px;
}
.wf-quick-preview button {
  border: 0;
  border-radius: 9px;
  background: #ffffff;
  color: #10833b;
  padding: 7px;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 1px 1px rgba(0,0,0,.1);
}
.wf-wa-input {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  background: #f0f2f5;
}
.wf-wa-input span {
  flex: 1;
  background: #ffffff;
  border-radius: 18px;
  padding: 8px 12px;
  color: #9aa6ac;
  font-size: 11px;
  font-weight: 850;
}
.wf-wa-input i {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #16a34a;
  color: #ffffff;
}
.wf-wa-input svg {
  width: 15px;
  height: 15px;
}
@media (max-width: 1180px) {
  .wf-preview { display: none; }
}
@media (max-width: 860px) {
  .wf-builder-shell { height: auto; min-height: 0; flex-direction: column; }
  .wf-sidebar { width: 100%; max-height: 280px; border-inline-start: 0; border-bottom: 1px solid #e9eef1; }
  .wf-builder-head { align-items: stretch; flex-direction: column; }
  .wf-title { align-items: stretch; flex-direction: column; }
  #wf-name { width: 100%; min-width: 0; }
}
.secret-field { display: flex; gap: 8px; align-items: center; }
.secret-field .input { flex: 1; min-width: 0; }
.secret-toggle {
  height: 44px;
  min-width: 76px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-2);
  font-weight: 800;
  cursor: pointer;
  transition: all .18s ease;
}
.secret-toggle:hover {
  border-color: rgba(15, 176, 131, .45);
  color: var(--green);
  box-shadow: 0 10px 18px rgba(15, 23, 42, .08);
}
.kw { color: #7dd3fc; } .str { color: #fbbf24; } .path { color: #86efac; }

.toggle { width: 48px; height: 27px; border-radius: 99px; background: var(--line); position: relative; transition: all 0.2s; cursor: pointer; flex-shrink: 0; }
.toggle.on { background: var(--primary); }
.toggle::after { content: ''; position: absolute; width: 21px; height: 21px; border-radius: 50%; background: #fff; top: 3px; inset-inline-start: 3px; transition: all 0.2s; box-shadow: var(--shadow-sm); }
.toggle.on::after { inset-inline-start: 24px; }
body[dir=rtl] .toggle::after { inset-inline-start: auto; inset-inline-end: 3px; }
body[dir=rtl] .toggle.on::after { inset-inline-end: 24px; }

/* ===================== TOAST ===================== */
.toast-stack { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 15px;
  background: var(--surface-solid); box-shadow: var(--shadow-lg); border: 1px solid var(--glass-border);
  min-width: 280px; max-width: 380px; animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600; font-size: 14px;
}
.toast.out { animation: toastOut 0.3s forwards; }
.toast .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.toast .t-ic svg { width: 19px; height: 19px; }
.toast.success .t-ic { background: var(--success-soft); color: var(--success); }
.toast.error .t-ic { background: var(--danger-soft); color: var(--danger); }
.toast.info .t-ic { background: #e4eefe; color: #2563eb; }

/* ===================== ANIMATIONS ===================== */
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes checkboxCheck { from { opacity: 0; transform: rotate(-45deg) scale(0.65); } to { opacity: 1; transform: rotate(-45deg) scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
body.ltr @keyframes toastIn { from { transform: translateX(-40px); } }

.stat-card:nth-child(1) { animation-delay: 0.03s; }
.stat-card:nth-child(2) { animation-delay: 0.07s; }
.stat-card:nth-child(3) { animation-delay: 0.11s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-card:nth-child(5) { animation-delay: 0.19s; }
.stat-card:nth-child(6) { animation-delay: 0.23s; }
.stat-card:nth-child(7) { animation-delay: 0.27s; }
.stat-card:nth-child(8) { animation-delay: 0.31s; }

/* ===================== RESPONSIVE ===================== */
.overlay-bg { display: none; }
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-row { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; inset-inline-start: 0; top: 0; transform: translateX(-110%); transition: transform 0.28s cubic-bezier(0.16,1,0.3,1); box-shadow: var(--shadow-lg); }
  body[dir=rtl] .sidebar { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(110%); }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm); }
  .hamburger svg { width: 22px; height: 22px; }
  .main { padding: 18px 16px 40px; }
  .overlay-bg.show { display: block; position: fixed; inset: 0; background: rgba(15,27,45,0.4); z-index: 49; }
  .form-grid { grid-template-columns: 1fr; }
  .page-title h1 { font-size: 22px; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 15px; }
  .stat-card .val { font-size: 23px; }
}

/* ===================== POSTPONE MODAL ===================== */
.postpone-modal-inner { display: flex; flex-direction: column; gap: 4px; }
.postpone-icon-wrap {
  width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px;
  border-radius: 18px; background: linear-gradient(135deg, #fff7ed, #eef8ff);
  color: #ea8c34; box-shadow: 0 14px 32px rgba(234, 140, 52, 0.18);
}
.postpone-icon-wrap svg { width: 32px; height: 32px; color: currentColor; opacity: 0.95; }
.postpone-label { font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 7px; display: block; }
.postpone-field { margin: 0; }
.postpone-date-input,
.postpone-select {
  height: 48px; border-radius: 14px; border: 1.5px solid var(--line);
  background: #fff; font-size: 15px; font-weight: 800; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.postpone-date-input { text-align: center; letter-spacing: 0; }
.filter-select[type="date"],
.input[type="date"],
.input[type="datetime-local"] {
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 850;
}
.filter-select[type="date"]::-webkit-calendar-picker-indicator,
.input[type="date"]::-webkit-calendar-picker-indicator,
.input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0.95;
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  background-color: #f1f5f9;
}
.filter-select[type="date"]::-webkit-calendar-picker-indicator:hover,
.input[type="date"]::-webkit-calendar-picker-indicator:hover,
.input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  background-color: #e2e8f0;
}
.postpone-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: 0.85; padding: 8px; border-radius: 10px; background-color: #f8fafc;
}
.postpone-date-input:focus,
.postpone-select:focus { border-color: #ea8c34; box-shadow: 0 0 0 4px rgba(234,140,52,0.16); }
.postpone-select { appearance: auto; }
.add-order-optional-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 -2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.add-order-optional-divider::before,
.add-order-optional-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.55), transparent);
}
.add-order-optional-divider span {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 12px;
}

.custom-calendar-control {
  position: relative;
  width: 100%;
  min-width: 0;
}
.custom-calendar-control > input[type="date"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.filter-calendar-control { width: auto; min-width: 168px; }
.custom-calendar-trigger {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: start;
  cursor: pointer;
}
.filter-calendar-control .custom-calendar-trigger { min-width: 168px; }
.custom-calendar-trigger.is-empty .custom-calendar-value { color: var(--ink-3); }
.custom-calendar-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #475569;
  background: #f1f5f9;
}
.custom-calendar-icon svg { width: 16px; height: 16px; }
.custom-calendar-trigger:hover .custom-calendar-icon { color: #ea8c34; background: #fff3e6; }
.custom-calendar-popup {
  position: fixed;
  z-index: 1000;
  direction: rtl;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22), 0 4px 16px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
  animation: calendar-pop 0.18s ease-out;
}
@keyframes calendar-pop {
  from { opacity: 0; transform: translateY(-5px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.custom-calendar-head {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  padding: 2px 0 14px;
}
.custom-calendar-head > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
}
.custom-calendar-head b { color: #0f172a; font-size: 17px; font-weight: 950; }
.custom-calendar-head span { color: #64748b; font-size: 13px; font-weight: 850; }
.calendar-nav {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.calendar-nav:hover { color: #fff; background: #ea8c34; transform: translateY(-1px); }
.custom-calendar-week,
.custom-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.custom-calendar-week { padding: 7px 0; }
.custom-calendar-week span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}
.custom-calendar-day {
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #1e293b;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.custom-calendar-day:hover:not(:disabled) { color: #c45f00; background: #fff1df; transform: scale(1.06); }
.custom-calendar-day.outside { color: #cbd5e1; font-weight: 750; }
.custom-calendar-day.today { box-shadow: inset 0 0 0 1.5px #ea8c34; color: #c45f00; }
.custom-calendar-day.selected { color: #fff; background: #ea8c34; box-shadow: 0 7px 16px rgba(234, 140, 52, 0.32); }
.custom-calendar-day:disabled { color: #dbe1e8; cursor: not-allowed; }
.custom-calendar-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
}
.custom-calendar-foot button {
  border: 0;
  border-radius: 10px;
  padding: 8px 13px;
  color: #64748b;
  background: #f1f5f9;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 950;
}
.custom-calendar-foot .today-action { color: #fff; background: #ea8c34; }


/* "New Status" inline dropdown in the postponed view */
.pns-dropdown,
.pns-confirm-dropdown {
  width: 100%; max-width: 170px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 800; cursor: pointer;
  outline: none;
}
.pns-confirm-dropdown { margin-top: 7px; border-color: rgba(234, 140, 52, 0.38); background: #fffaf3; }
.pns-dropdown:focus,
.pns-confirm-dropdown:focus { border-color: #ea8c34; box-shadow: 0 0 0 3px rgba(234,140,52,0.16); }
.postpone-note {
  width: calc(100% - 12px); max-width: 190px; margin: 7px 6px 4px; padding: 7px 8px;
  border: 1px solid rgba(234, 140, 52, 0.35); border-radius: 10px;
  background: rgba(255, 247, 237, 0.9); color: var(--ink);
  font-size: 12px; font-weight: 800; outline: none; text-align: center;
}
.postpone-note:focus { background: #fff; box-shadow: 0 0 0 2px rgba(234, 140, 52, 0.18); }

/* "New Status" badge in the postponed view */
.postpone-next-badge {
  display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
  white-space: nowrap; letter-spacing: 0.01em;
}

.backup-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.backup-summary div {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 14px;
}
.backup-summary span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.backup-summary b {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 1000;
  word-break: break-word;
}
.backup-list {
  display: grid;
  gap: 10px;
}
.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  padding: 13px 14px;
}
.backup-row b {
  display: block;
  color: #0f172a;
  font-weight: 1000;
}
.backup-row span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}
.system-update-shell {
  display: grid;
  gap: 16px;
}
.system-update-card {
  overflow: hidden;
}
.system-update-note,
.system-update-warning,
.system-update-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.6;
}
.system-update-note {
  border: 1px solid rgba(14, 165, 233, .2);
  background: #eff6ff;
  color: #075985;
}
.system-update-warning {
  border: 1px solid rgba(245, 158, 11, .25);
  background: #fffbeb;
  color: #92400e;
}
.system-update-alert.danger {
  border: 1px solid rgba(239, 68, 68, .25);
  background: #fff1f2;
  color: #991b1b;
}
.system-upload-box,
.system-update-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.system-upload-box .input {
  min-width: min(420px, 100%);
  max-width: 100%;
  height: auto;
  padding: 13px;
}
.system-update-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.server-stats-shell {
  overflow: hidden;
}
.server-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.server-stat-card {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, .12), transparent 38%),
    linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}
.server-stat-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 1000;
}
.server-stat-card b {
  display: block;
  margin-top: 7px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 1000;
  word-break: break-word;
}
.server-stat-card small {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  word-break: break-word;
}
.server-info-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.server-info-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}
.server-info-list span {
  color: #64748b;
  font-size: 13px;
  font-weight: 950;
}
.server-info-list b {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
  text-align: left;
  word-break: break-word;
}
@media (max-width: 760px) {
  .system-update-summary {
    grid-template-columns: 1fr;
  }
  .server-stats-grid {
    grid-template-columns: 1fr;
  }
  .server-info-list div {
    align-items: flex-start;
    flex-direction: column;
  }
  .system-upload-box,
  .system-update-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .system-upload-box .btn,
  .system-update-actions .btn {
    width: 100%;
  }
}
.relance-return-confirm {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
}
.modern-checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #991b1b;
  font-size: 14px;
  font-weight: 1000;
  cursor: pointer;
}
.modern-checkbox-line input {
  width: 20px;
  height: 20px;
  accent-color: #ef4444;
}
.relance-return-confirm small {
  display: block;
  margin-top: 7px;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}
.relance-safe-confirm {
  margin-inline-end: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}
.relance-safe-confirm input {
  width: 19px;
  height: 19px;
  accent-color: #0ea5e9;
}
.replacement-search-box {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240, 253, 250, .95), rgba(239, 246, 255, .9));
}
.replacement-search-box label {
  color: #0f172a;
  font-size: 14px;
  font-weight: 1000;
}
.replacement-search-box .input {
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(20, 184, 166, .3);
  background: #fff;
  font-size: 16px;
  font-weight: 900;
}
.replacement-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.replacement-stats div {
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}
.replacement-stats span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}
.replacement-stats b {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 1000;
}
.replacement-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.replacement-columns.single {
  grid-template-columns: 1fr;
}
.replacement-columns section {
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(203, 213, 225, .72);
  background: rgba(248, 250, 252, .86);
}
.replacement-columns h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 1000;
}
.replacement-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-left: 4px;
}
.replacement-mini-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, .7);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}
.replacement-mini-card.return {
  border-color: rgba(16, 185, 129, .26);
  background: linear-gradient(135deg, #fff, #ecfdf5);
  cursor: pointer;
}
.replacement-mini-card.return.selected {
  border-color: #0f9f7f;
  background: linear-gradient(135deg, #dcfce7, #eff6ff);
  box-shadow: 0 18px 38px rgba(15, 159, 127, .18), inset 0 0 0 2px rgba(15, 159, 127, .28);
}
.replacement-mini-card.return.routour-marked {
  border-color: rgba(239, 68, 68, .72);
  background: linear-gradient(135deg, #fff1f2, #fff);
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, .2), 0 16px 34px rgba(239, 68, 68, .12);
}
.replacement-mini-head,
.replacement-mini-person,
.replacement-mini-place {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.replacement-mini-head b,
.replacement-mini-person strong {
  min-width: 0;
  color: #0f172a;
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.replacement-mini-head span {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 1000;
}
.replacement-mini-person small,
.replacement-mini-place small {
  min-width: 0;
  color: #64748b;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.replacement-mini-place span {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 13px;
  font-weight: 1000;
}
.replacement-mini-card em {
  justify-self: start;
  padding: 6px 11px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
}
.replacement-mini-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.replacement-mini-meta div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
}
.replacement-mini-meta span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 1000;
}
.replacement-mini-meta b {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.replacement-routour-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid rgba(220, 38, 38, .42);
  border-radius: 999px;
  background: linear-gradient(135deg, #fee2e2, #fff1f2);
  color: #991b1b;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(239, 68, 68, .12);
}
.replacement-routour-btn:hover {
  background: linear-gradient(135deg, #fecaca, #fee2e2);
  transform: translateY(-1px);
}
.replacement-routour-btn:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}
.replacement-warning {
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid rgba(239, 68, 68, .26);
  border-radius: 15px;
  background: #fff1f2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 1000;
}
.whatsapp-inbox-shell {
  display: grid;
  gap: 16px;
}
.whatsapp-inbox-setup {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, .6fr);
  gap: 12px;
  align-items: center;
  padding: 18px;
}
.whatsapp-inbox-setup div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 157, 110, .16);
  border-radius: 16px;
  background: rgba(236, 253, 245, .62);
}
.whatsapp-inbox-setup span,
.whatsapp-message-foot span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 900;
}
.whatsapp-inbox-setup b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.whatsapp-inbox-setup p {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
}
.whatsapp-inbox-list {
  display: grid;
  gap: 12px;
}
.whatsapp-message-card {
  padding: 16px;
  border-right: 5px solid rgba(15, 157, 110, .82);
}
.whatsapp-message-card.is-read {
  border-right-color: rgba(148, 163, 184, .45);
  opacity: .86;
}
.whatsapp-message-head,
.whatsapp-message-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.whatsapp-message-head h3 {
  color: var(--ink);
  font-size: 17px;
  font-weight: 1000;
}
.whatsapp-message-head p {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 900;
}
.whatsapp-message-badge {
  padding: 7px 11px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 1000;
}
.whatsapp-message-card.is-read .whatsapp-message-badge {
  background: #e5e7eb;
  color: #475569;
}
.whatsapp-message-text {
  margin: 14px 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.8;
}
.wa-web-shell {
  height: calc(100vh - 150px);
  min-height: 560px;
  display: flex;
  overflow: hidden;
}
.wa-web-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  background: #ffffff;
  border: 1px solid #eef1f4;
  border-radius: 22px;
  box-shadow: 0 10px 34px rgba(16, 40, 30, .08);
}
.wa-web-list {
  width: 36%;
  min-width: 330px;
  max-width: 440px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-inline-start: 1px solid #f1f4f6;
  background: #ffffff;
}
.wa-web-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 12px;
}
.wa-web-title {
  color: #22303c;
  font-size: 16px;
  font-weight: 1000;
}
.wa-web-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #16a34a;
  font-size: 12px;
  font-weight: 900;
}
.wa-web-live span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .5);
  animation: waPulse 2s infinite;
}
.wa-web-live.offline {
  background: #fff1f2;
  color: #e11d48;
}
.wa-web-live.offline span {
  background: #e11d48;
  box-shadow: 0 0 0 0 rgba(225, 29, 72, .45);
  animation-name: waPulseOffline;
}
@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
@keyframes waPulseOffline {
  0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .45); }
  70% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}
.wa-web-search {
  padding: 0 14px 12px;
}
.wa-web-search div {
  height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid #eef1f4;
  border-radius: 13px;
  background: #f6f8f9;
}
.wa-web-search svg {
  width: 18px;
  height: 18px;
  color: #93a0ac;
}
.wa-web-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #22303c;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}
.wa-web-chats {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 10px;
}
.wa-web-chats::-webkit-scrollbar,
.wa-web-messages::-webkit-scrollbar {
  width: 6px;
}
.wa-web-chats::-webkit-scrollbar-thumb,
.wa-web-messages::-webkit-scrollbar-thumb {
  background: #dde3e7;
  border-radius: 999px;
}
.wa-chat-item-wrap {
  position: relative;
  margin-bottom: 2px;
  border-radius: 15px;
  transition: background .15s ease;
}
.wa-chat-item-wrap.active {
  background: #e9f8ef;
}
.wa-chat-item-wrap.pinned {
  background: linear-gradient(90deg, rgba(22, 163, 74, .08), rgba(58, 143, 217, .05));
}
.wa-chat-item-wrap.has-chat-color {
  background: color-mix(in srgb, var(--wa-chat-color) 11%, #ffffff);
}
.wa-chat-item-wrap.has-chat-color:hover {
  background: color-mix(in srgb, var(--wa-chat-color) 15%, #ffffff);
}
.wa-chat-item-wrap.has-chat-color.active {
  background: color-mix(in srgb, var(--wa-chat-color) 18%, #ffffff);
}
.wa-chat-item-wrap.wa-chat-status-confirmed:not(.has-chat-color) {
  background: linear-gradient(90deg, rgba(34, 197, 94, .18), rgba(240, 253, 244, .96));
}
.wa-chat-item-wrap.wa-chat-status-confirmed:not(.has-chat-color):hover,
.wa-chat-item-wrap.wa-chat-status-confirmed.active:not(.has-chat-color) {
  background: linear-gradient(90deg, rgba(34, 197, 94, .24), rgba(220, 252, 231, .98));
}
.wa-chat-item-wrap.wa-chat-status-danger:not(.has-chat-color) {
  background: linear-gradient(90deg, rgba(239, 68, 68, .16), rgba(254, 242, 242, .98));
}
.wa-chat-item-wrap.wa-chat-status-danger:not(.has-chat-color):hover,
.wa-chat-item-wrap.wa-chat-status-danger.active:not(.has-chat-color) {
  background: linear-gradient(90deg, rgba(239, 68, 68, .22), rgba(254, 226, 226, .98));
}
.wa-chat-item-wrap.wa-chat-status-postponed:not(.has-chat-color) {
  background: linear-gradient(90deg, rgba(245, 158, 11, .18), rgba(255, 251, 235, .98));
}
.wa-chat-item-wrap.wa-chat-status-postponed:not(.has-chat-color):hover,
.wa-chat-item-wrap.wa-chat-status-postponed.active:not(.has-chat-color) {
  background: linear-gradient(90deg, rgba(245, 158, 11, .24), rgba(254, 243, 199, .98));
}
.wa-chat-item {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  margin-bottom: 0;
  border-radius: 15px;
  color: #22303c;
  cursor: pointer;
  font: inherit;
  text-align: start;
  transition: background .15s ease, transform .15s ease;
}
.wa-chat-item-wrap:hover {
  background: #f5f8f6;
}
.wa-chat-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(20, 50, 35, .12);
}
.wa-chat-body {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}
.wa-chat-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wa-chat-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #22303c;
  font-size: 15px;
  font-weight: 1000;
}
.wa-chat-row em {
  flex: 0 0 auto;
  color: #93a0ac;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 900;
}
.wa-chat-row em.unread {
  color: #16a34a;
}
.wa-chat-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #54616e;
  font-size: 13px;
  font-weight: 750;
}
.wa-chat-row i {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
}
.wa-chat-mobile-meta {
  display: none;
}
.wa-chat-side {
  display: none;
}
.wa-chat-note-preview {
  display: block;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(15, 23, 42, .05);
  color: #64748b;
  font-size: 11.5px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-chat-menu {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  z-index: 8;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.wa-chat-menu-toggle {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .14s ease, transform .14s ease, background .14s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.wa-chat-item-wrap:hover .wa-chat-menu-toggle,
.wa-chat-menu.open .wa-chat-menu-toggle {
  opacity: 1;
  transform: translateY(0);
}
.wa-chat-menu-toggle:hover,
.wa-chat-menu.open .wa-chat-menu-toggle {
  background: #ffffff;
}
.wa-chat-menu-toggle svg {
  width: 15px;
  height: 15px;
}
.wa-chat-card-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  font-size: 10.5px;
  font-weight: 950;
  font-style: normal;
  line-height: 1;
  direction: rtl;
}
.wa-chat-menu-panel {
  position: absolute;
  top: 58px;
  inset-inline-end: 0;
  min-width: 190px;
  padding: 8px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px) scale(.98);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.wa-chat-menu.open .wa-chat-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.wa-chat-menu-panel > button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #22303c;
  cursor: pointer;
  text-align: start;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 950;
}
.wa-chat-menu-panel > button:hover {
  background: #f4f7f6;
}
.wa-chat-color-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 6px;
}
.wa-chat-color-row button {
  width: 22px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
  font-weight: 1000;
}
.wa-chat-delete {
  color: #ef4444 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-chat-delete:hover {
  background: #fee2e2 !important;
}
.wa-chat-delete svg {
  width: 14px;
  height: 14px;
}
.wa-web-empty-list {
  margin: 18px;
  padding: 18px;
  border-radius: 16px;
  background: #f6f8f9;
  color: #93a0ac;
  text-align: center;
  font-weight: 900;
}
.wa-web-empty-list b,
.wa-web-empty-list span {
  display: block;
}
.wa-web-empty-list b {
  color: #334155;
  font-size: 15px;
  margin-bottom: 4px;
}
.wa-web-empty-list span {
  color: #94a3b8;
  font-size: 12.5px;
  line-height: 1.7;
}
.wa-web-chat {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6f5;
}
.wa-web-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='90' height='90' viewBox='0 0 90 90' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23dfe7e2' stroke-width='1.1'%3E%3Ccircle cx='14' cy='16' r='3'/%3E%3Cpath d='M40 12 q5 5 0 10'/%3E%3Cpath d='M64 50 l7 0 M67.5 46.5 l0 7'/%3E%3Cpath d='M22 60 q6 -6 12 0'/%3E%3Ccircle cx='70' cy='20' r='2'/%3E%3C/g%3E%3C/svg%3E");
}
.wa-web-chat-head {
  position: relative;
  z-index: 80;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f4f6;
  background: #ffffff;
}
.wa-web-chat-head .wa-chat-avatar {
  width: 43px;
  height: 43px;
  flex-basis: 43px;
  font-size: 15px;
}
.wa-web-chat-head b {
  display: block;
  color: #22303c;
  font-size: 15.5px;
  font-weight: 1000;
}
.wa-web-chat-head small {
  display: block;
  margin-top: 2px;
  color: #54616e;
  font-size: 12.5px;
  font-weight: 750;
}
.wa-head-unread-badge {
  width: max-content;
  max-width: 190px;
  margin-top: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #047857;
  background: #dcfce7;
  border: 1px solid rgba(22, 163, 74, .18);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(22, 163, 74, .12);
}
.wa-head-unread-badge svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.wa-head-unread-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-web-head-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-head-status {
  position: relative;
  z-index: 120;
}
.wa-head-status-btn {
  min-height: 36px;
  max-width: 178px;
  border: 1px solid color-mix(in srgb, var(--status-color, #16a34a) 28%, #dbe7ef);
  border-radius: 999px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: color-mix(in srgb, var(--status-color, #16a34a) 12%, #ffffff);
  color: color-mix(in srgb, var(--status-color, #16a34a) 82%, #0f172a);
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}
.wa-head-status-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-head-status-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.wa-head-status-menu.status-menu {
  inset-inline: auto 0;
  top: calc(100% + 8px);
  min-width: 178px;
  max-height: 270px;
  z-index: 1000;
}
.wa-head-add-order {
  min-height: 36px;
  border: 1px solid rgba(16, 185, 129, .24);
  border-radius: 999px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #ffffff;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 12px 26px rgba(16, 185, 129, .16);
  white-space: nowrap;
}
.wa-head-add-order svg {
  width: 15px;
  height: 15px;
}
.wa-head-add-order span,
.wa-head-add-order svg {
  color: #ffffff;
}
.wa-web-head-actions > span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #16a34a;
  font-size: 12px;
  font-weight: 1000;
}
.wa-delete-chat-btn {
  min-height: 36px;
  padding-inline: 11px;
  border-radius: 12px;
}
.wa-delete-chat-btn svg {
  width: 15px;
  height: 15px;
}
.wa-web-messages {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 6%;
}
.wa-date-pill {
  align-self: center;
  margin: 6px 0 10px;
  padding: 6px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: #54616e;
  box-shadow: 0 1px 2px rgba(16, 40, 30, .06);
  font-size: 12px;
  font-weight: 900;
}
.wa-msg {
  position: relative;
  max-width: min(62%, 520px);
  min-width: 0;
  align-self: flex-start;
  display: grid;
  gap: 5px;
  padding: 10px 12px 7px;
  border-radius: 16px 16px 16px 5px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  border: 0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .06);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.7;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.wa-msg span {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.wa-msg-menu {
  position: absolute;
  top: 4px;
  inset-inline-end: 5px;
  z-index: 4;
}
.wa-msg-menu-toggle {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: .88;
  transform: translateY(-2px);
  transition: opacity .14s ease, transform .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.wa-msg:hover .wa-msg-menu-toggle,
.wa-msg-menu.open .wa-msg-menu-toggle {
  opacity: 1;
  transform: translateY(0);
}
.wa-msg-menu-toggle:hover,
.wa-msg-menu.open .wa-msg-menu-toggle {
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 14px 28px rgba(15, 118, 110, .18);
}
.wa-msg-menu-toggle svg {
  width: 18px;
  height: 18px;
}
.wa-msg-menu-panel {
  position: absolute;
  top: 28px;
  inset-inline-end: 0;
  min-width: 150px;
  padding: 6px;
  border-radius: 13px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(.98);
  transition: opacity .14s ease, transform .14s ease;
}
.wa-msg-menu.open .wa-msg-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.wa-msg-delete-action {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 950;
}
.wa-msg-delete-action:hover {
  background: #fee2e2;
}
.wa-msg-delete-action svg {
  width: 15px;
  height: 15px;
}
.wa-msg.out {
  align-self: flex-end;
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(135deg, #dffadb 0%, #cff7d3 100%);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(15, 157, 110, .10), 0 1px 2px rgba(16, 40, 30, .06);
}
.wa-msg.new {
  box-shadow: 0 1px 2px rgba(16, 40, 30, .08);
}
.wa-msg em {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 2px;
  color: #93a0ac;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 850;
  text-align: left;
}
.wa-msg.out em {
  color: #6b7884;
}
.wa-msg-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  margin-inline-start: 5px;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -2px;
  vertical-align: -1px;
}
.wa-msg-status.sent,
.wa-msg-status.delivered {
  color: #7a8793;
}
.wa-msg-status.read {
  color: #34b7f1;
}
.wa-msg-status.failed {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  letter-spacing: 0;
}
.wa-web-composer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px 8px;
  border-top: 0;
  background: transparent;
}
.wa-web-composer > .wa-input-wrap {
  flex: 1;
  min-height: 46px;
  max-height: 112px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 6px 5px 10px;
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.wa-web-composer textarea {
  width: 100%;
  min-height: 22px;
  max-height: 96px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #111b21;
  font: inherit;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.35;
  padding: 7px 4px;
  overflow-y: auto;
}
.wa-web-composer textarea::placeholder {
  color: #8e9aa0;
}
.wa-24h-template-lock {
  position: relative;
  z-index: 2;
  margin: 6px 10px 4px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid rgba(251, 146, 60, .32);
  box-shadow: 0 12px 26px rgba(124, 45, 18, .08);
}
.wa-24h-template-lock div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.wa-24h-template-lock b {
  color: #9a3412;
  font-size: 13px;
  font-weight: 1000;
}
.wa-24h-template-lock span {
  color: #7c2d12;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.6;
}
.wa-24h-template-lock .btn {
  min-height: 38px;
  flex: 0 0 auto;
  padding-inline: 12px;
  border-radius: 14px;
  white-space: nowrap;
}
.wa-24h-template-lock .btn,
.wa-24h-template-lock .btn span,
.wa-24h-template-lock .btn svg {
  color: #ffffff;
}
.wa-web-composer.locked-24h {
  align-items: center;
}
.wa-web-composer.confirmation-address-mode {
  align-items: center;
  padding: 9px 10px;
}
.wa-confirm-address-open {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #ffffff;
  font-weight: 1000;
  font-size: 14px;
  box-shadow: 0 16px 32px rgba(37, 99, 235, .18);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.wa-confirm-address-open:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow: 0 20px 38px rgba(37, 99, 235, .23);
}
.wa-confirm-address-open svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
  stroke: currentColor;
}
.wa-head-address-btn {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, .15);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
.wa-head-address-btn svg {
  width: 15px;
  height: 15px;
  color: currentColor;
}
.wa-status-success-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(236, 253, 245, .98), rgba(239, 246, 255, .96));
  border: 1px solid rgba(16, 185, 129, .18);
}
.wa-status-success-card > span {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(16, 185, 129, .18);
}
.wa-status-success-card svg {
  width: 22px;
  height: 22px;
}
.wa-status-success-card div {
  display: grid;
  gap: 6px;
}
.wa-status-success-card b {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}
.wa-status-success-card strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 1000;
}
.wa-confirm-address-modal {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.wa-confirm-modal-city-field {
  position: relative;
}
.wa-confirm-modal-city-field .smart-options {
  inset-inline-start: 0;
  top: calc(100% + 6px);
  z-index: 160;
  width: min(320px, 82vw);
}
.wa-input-locked {
  opacity: .88;
  background: #f8fafc !important;
  border: 1px dashed rgba(148, 163, 184, .38) !important;
}
.wa-input-locked textarea {
  color: #64748b;
  cursor: not-allowed;
}
.wa-template-chat-target {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  border: 1px solid rgba(16, 185, 129, .18);
}
.wa-template-chat-target > span {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #2563eb);
}
.wa-template-chat-target svg {
  width: 19px;
  height: 19px;
}
.wa-template-chat-target b,
.wa-template-chat-target small {
  display: block;
}
.wa-template-chat-target b {
  color: #0f172a;
  font-weight: 1000;
}
.wa-template-chat-target small {
  margin-top: 2px;
  color: #64748b;
  font-weight: 850;
}
.wa-inline-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #54656f;
  cursor: pointer;
  padding: 6px;
}
.wa-inline-icon:hover {
  background: #eef1f0;
}
.wa-inline-icon svg {
  width: 23px;
  height: 23px;
}
.wa-web-icon,
.wa-web-send {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wa-web-icon {
  background: #128C7E;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.wa-web-icon.recording {
  background: #fee2e2;
  color: #dc2626;
  box-shadow: 0 8px 20px rgba(220, 38, 38, .18);
  animation: wa-record-pulse 1s ease-in-out infinite;
}
@keyframes wa-record-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.wa-web-send {
  display: none;
  background: #128C7E;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.wa-web-send.show {
  display: inline-flex;
}
.wa-audio-record.hide {
  display: none;
}
.wa-web-composer.recording > .wa-input-wrap {
  display: none;
}
.wa-web-composer.recording .wa-web-send {
  display: none;
}
.wa-web-composer.recording .wa-audio-record {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin-inline-start: 0;
}
.wa-rec-bar {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
  color: #54656f;
  direction: ltr;
}
.wa-web-composer.recording .wa-rec-bar {
  display: flex;
}
.wa-rec-clock,
.wa-rec-trash,
.wa-rec-pause {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #54656f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
}
.wa-rec-clock svg,
.wa-rec-trash svg,
.wa-rec-pause svg {
  width: 21px;
  height: 21px;
}
.wa-rec-pause {
  color: #ef4444;
  cursor: pointer;
  background: #fff1f2;
}
.wa-rec-bar.paused .wa-rec-pause {
  color: #128C7E;
  background: #e6fffb;
}
.wa-rec-trash {
  cursor: pointer;
}
.wa-rec-trash:hover {
  color: #ef4444;
}
.wa-rec-wave {
  flex: 1;
  min-width: 40px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0 1%, #000 8% 92%, transparent 99% 100%);
}
.wa-rec-wave i,
.wa-preview-wave i,
.wa-audio-wave i {
  width: 3px;
  height: var(--h, 34%);
  min-height: 4px;
  border-radius: 99px;
  background: #11a68d;
  flex: 0 0 3px;
  transform-origin: center;
  transition: height 80ms linear, opacity 80ms linear, background .16s ease;
}
.wa-rec-wave i:nth-child(3n),
.wa-rec-wave i:nth-child(5n) {
  background: #7dd3c7;
}
.wa-rec-bar.paused .wa-rec-wave {
  opacity: .45;
}
.wa-rec-time {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 34px;
}
.wa-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd4dc;
  flex: 0 0 10px;
  animation: wa-rec-blink 1s ease-in-out infinite;
}
.wa-rec-bar.paused .wa-rec-dot {
  animation: none;
  opacity: .4;
}
@media (max-width: 430px) {
  .wa-web-composer.recording {
    gap: 5px;
    padding-inline: 6px;
  }
  .wa-web-composer.recording .wa-audio-record {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .wa-rec-bar {
    gap: 6px;
    padding-inline: 8px;
  }
  .wa-rec-clock,
  .wa-rec-trash,
  .wa-rec-pause {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }
  .wa-rec-clock svg,
  .wa-rec-trash svg,
  .wa-rec-pause svg {
    width: 18px;
    height: 18px;
  }
  .wa-rec-time {
    font-size: 13px;
    min-width: 31px;
  }
  .wa-rec-wave {
    min-width: 24px;
    gap: 2px;
  }
  .wa-rec-wave i {
    width: 2px;
    flex-basis: 2px;
  }
}
@keyframes wa-rec-blink {
  50% { opacity: .28; }
}
@keyframes wa-wave-pulse {
  0%, 100% { filter: saturate(1); transform: scaleY(.86); }
  50% { filter: saturate(1.35); transform: scaleY(1); }
}
.wa-web-composer.has-audio-preview > .wa-input-wrap,
.wa-web-composer.has-audio-preview > .wa-audio-record,
.wa-web-composer.has-audio-preview > .wa-web-send {
  display: none;
}
.wa-audio-preview {
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
  direction: ltr;
}
.wa-preview-send {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #128C7E;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
  cursor: pointer;
}
.wa-preview-send svg {
  width: 21px;
  height: 21px;
}
.wa-preview-send:disabled {
  opacity: .6;
  cursor: wait;
}
.wa-preview-play,
.wa-preview-delete {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  color: #475569;
  cursor: pointer;
}
.wa-preview-play {
  background: #e6fffb;
  color: #128C7E;
  font-weight: 900;
}
.wa-preview-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}
.wa-preview-delete svg {
  width: 20px;
  height: 20px;
}
.wa-preview-wave {
  flex: 1;
  min-width: 60px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0 3%, #000 10% 90%, transparent 97% 100%);
  transition: filter .18s ease, opacity .18s ease;
}
.wa-preview-wave i {
  background: #94a3b8;
}
.wa-audio-preview.playing .wa-preview-wave {
  animation: wa-wave-pulse .95s ease-in-out infinite;
}
.wa-audio-preview.playing .wa-preview-wave i {
  background: #128C7E;
  animation: wa-bar-dance .75s ease-in-out infinite;
  animation-delay: calc(var(--bar-index, 0) * -45ms);
}
.wa-preview-duration {
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.wa-web-send:disabled {
  cursor: wait;
  opacity: .55;
}
.wa-web-icon svg,
.wa-web-send svg {
  width: 21px;
  height: 21px;
}
.wa-emoji-panel {
  position: absolute;
  inset-inline-start: 16px;
  bottom: 68px;
  width: min(340px, calc(100% - 32px));
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .16);
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  z-index: 10;
}
.wa-emoji-panel.open {
  display: grid;
}
.wa-emoji-panel button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.wa-emoji-panel button:hover {
  background: #e0f2fe;
}
.wa-media-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.5);
  font-weight: 950;
}
.wa-audio-player {
  position: relative;
  z-index: 2;
  width: min(315px, 74vw);
  min-width: 225px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 0 3px;
  direction: ltr;
}
.wa-audio-player.disabled {
  opacity: .7;
}
.wa-audio-play {
  position: relative;
  z-index: 4;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 50%;
  background: #128C7E;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(18, 140, 126, .28);
}
.wa-audio-play svg {
  width: 20px;
  height: 20px;
}
.wa-audio-play:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}
.wa-msg.out .wa-audio-play {
  background: #0f8f78;
}
.wa-audio-track {
  position: relative;
  flex: 1;
  min-width: 120px;
  height: 38px;
  display: flex;
  align-items: center;
}
.wa-audio-wave {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 32px;
  transform: translateY(-50%);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  opacity: .9;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0 2%, #000 8% 92%, transparent 98% 100%);
}
.wa-audio-wave i {
  background: #9aa7ad;
  width: 3px;
  flex-basis: 3px;
  min-height: 5px;
}
.wa-audio-player.playing .wa-audio-wave {
  animation: none;
}
.wa-audio-player.playing .wa-audio-wave i {
  background: #9aa7ad;
  animation: none;
}
.wa-audio-wave i.played,
.wa-audio-player.playing .wa-audio-wave i.played {
  background: #128C7E;
  opacity: 1;
}
.wa-audio-range {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 38px;
  opacity: .01;
  cursor: pointer;
}
.wa-audio-duration {
  min-width: 36px;
  color: #607080;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
@media (max-width: 420px) {
  .wa-audio-player {
    width: min(300px, 72vw);
    min-width: 215px;
    gap: 8px;
  }
  .wa-audio-track {
    min-width: 104px;
  }
  .wa-audio-wave {
    gap: 3px;
  }
}
.wa-msg.out .wa-audio-duration {
  color: #52705f;
}
.modal.wa-image-caption-modal {
  width: min(520px, calc(100vw - 28px)) !important;
  border-radius: 24px !important;
  overflow: hidden !important;
}
.wa-image-caption-head h2 {
  margin: 0 !important;
}
.wa-image-caption-body {
  display: grid !important;
  gap: 14px !important;
}
.wa-image-caption-preview {
  display: grid !important;
  gap: 8px !important;
  border-radius: 20px !important;
  padding: 10px !important;
  background: linear-gradient(180deg, rgba(236, 253, 245, .85), rgba(248, 250, 252, .95)) !important;
  border: 1px solid rgba(20, 184, 166, .18) !important;
}
.wa-image-caption-preview img {
  display: block !important;
  width: 100% !important;
  max-height: 360px !important;
  object-fit: contain !important;
  border-radius: 16px !important;
  background: rgba(15, 23, 42, .06) !important;
}
.wa-image-caption-preview span {
  color: #64748b !important;
  font-weight: 850 !important;
  font-size: 12px !important;
  text-align: center !important;
}
.wa-image-caption-input {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86) !important;
}
.wa-image-caption-input > span {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  color: #0f8f78 !important;
  background: rgba(20, 184, 166, .12) !important;
}
.wa-image-caption-input > span svg {
  width: 18px !important;
  height: 18px !important;
}
.wa-image-caption-input textarea {
  width: 100% !important;
  min-height: 38px !important;
  max-height: 118px !important;
  padding: 8px 2px !important;
  border: 0 !important;
  outline: 0 !important;
  resize: none !important;
  background: transparent !important;
  color: #0f172a !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1.55 !important;
  direction: rtl !important;
}
.wa-image-caption-input textarea::placeholder {
  color: #94a3b8 !important;
}
.wa-image-caption-input em {
  align-self: center !important;
  color: #94a3b8 !important;
  font-size: 10.5px !important;
  font-style: normal !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}
@media (max-width: 520px) {
  .wa-image-caption-input {
    grid-template-columns: 34px minmax(0, 1fr) !important;
  }
  .wa-image-caption-input em {
    grid-column: 2;
    justify-self: end;
    margin-top: -3px;
  }
}
.wa-image-caption-foot .btn-primary {
  gap: 8px !important;
}
.wa-image-caption-foot .btn-primary svg {
  width: 18px !important;
  height: 18px !important;
}
.wa-media-preview {
  position: relative;
  z-index: 2;
  display: grid !important;
  gap: 6px !important;
  width: min(310px, 72vw) !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.wa-media-preview img,
.wa-media-preview video {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 330px !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, .08) !important;
  box-shadow: none !important;
}
.wa-media-preview img {
  object-fit: cover !important;
}
.wa-media-preview video {
  object-fit: contain !important;
}
.wa-media-preview figcaption {
  margin: 0 !important;
  color: var(--ink) !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1.45 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}
.wa-web-messages > .wa-msg:has(.wa-media-preview),
.wa-app-card .wa-web-messages > .wa-msg:has(.wa-media-preview) {
  width: auto !important;
  max-width: min(84%, 360px) !important;
  padding: 5px !important;
}
.wa-web-messages > .wa-msg > .wa-media-preview,
.wa-app-card .wa-web-messages > .wa-msg > .wa-media-preview {
  align-self: stretch !important;
}
@keyframes wa-bar-dance {
  0%, 100% { height: max(6px, calc(var(--h, 40%) * .45)); opacity: .55; }
  45% { height: min(96%, calc(var(--h, 40%) * 1.35)); opacity: 1; }
}
.wa-web-empty {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.wa-web-empty > div {
  position: relative;
  z-index: 1;
}
.wa-web-empty span {
  width: 170px;
  height: 170px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e9f8ef;
  color: #16a34a;
}
.wa-web-empty span svg {
  width: 78px;
  height: 78px;
}
.wa-web-empty h2 {
  color: #22303c;
  font-size: 24px;
  font-weight: 1000;
}
.wa-web-empty p {
  max-width: 390px;
  margin: 10px auto 0;
  color: #54616e;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.8;
}
.copy-field {
  display: flex;
  gap: 10px;
  align-items: center;
}
.copy-field .input {
  flex: 1;
}
.whatsapp-webhook-settings small {
  display: block;
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}
.wa-webhook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.wa-webhook-result {
  margin-top: 14px;
}
.webhook-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.webhook-guide-grid div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(15, 157, 110, .16);
  border-radius: 16px;
  background: rgba(236, 253, 245, .55);
}
.webhook-guide-grid span {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 1000;
}
.webhook-guide-grid b {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 1000;
}
@media (max-width: 900px) {
  .replacement-stats,
  .replacement-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .wa-web-card {
    flex-direction: column;
    min-height: auto;
  }
  .wa-web-list {
    width: 100%;
    max-width: none;
    min-width: 0;
    max-height: 420px;
  }
  .wa-web-chat {
    min-height: 540px;
  }
  .whatsapp-inbox-setup {
    grid-template-columns: 1fr;
  }
  .copy-field {
    align-items: stretch;
    flex-direction: column;
  }
  .webhook-guide-grid {
    grid-template-columns: 1fr;
  }
  .whatsapp-message-head,
  .whatsapp-message-foot {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 780px) {
  .backup-summary { grid-template-columns: 1fr; }
  .backup-row { align-items: stretch; flex-direction: column; }
}

/* Mobile app experience: desktop layout stays untouched above this breakpoint. */
.hamburger {
  display: none;
}

@media (max-width: 860px) {
  .hamburger {
    display: grid !important;
  }

  .sidebar,
  .sidebar.collapsed {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    transform: translateX(-110%) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 90;
    transition:
      transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 180ms ease,
      visibility 0s linear 280ms;
  }

  body[dir="rtl"] .sidebar,
  body[dir="rtl"] .sidebar.collapsed,
  html[dir="rtl"] .sidebar,
  html[dir="rtl"] .sidebar.collapsed,
  [dir="rtl"] .sidebar,
  [dir="rtl"] .sidebar.collapsed {
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
    transform: translateX(110%) !important;
  }

  .sidebar.open,
  .sidebar.collapsed.open,
  body[dir="rtl"] .sidebar.open,
  body[dir="rtl"] .sidebar.collapsed.open,
  html[dir="rtl"] .sidebar.open,
  html[dir="rtl"] .sidebar.collapsed.open,
  [dir="rtl"] .sidebar.open,
  [dir="rtl"] .sidebar.collapsed.open {
    transform: translateX(0) !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 180ms ease,
      visibility 0s;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background:
      radial-gradient(circle at 12% 0%, rgba(14, 165, 233, .12), transparent 28%),
      radial-gradient(circle at 92% 16%, rgba(16, 185, 129, .12), transparent 30%),
      #f8fafc;
  }

  .shell {
    min-height: 100vh;
  }

  .main {
    min-width: 0;
    padding: 12px 10px 28px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    align-items: center;
    gap: 10px;
    margin: -12px -10px 12px;
    padding: calc(10px + env(safe-area-inset-top)) 10px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
    background: rgba(248, 250, 252, .9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    backdrop-filter: blur(18px);
  }

  .topbar > div:first-child {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .hamburger {
    display: grid !important;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 16px;
    background: linear-gradient(135deg, #10b981, #2563eb);
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .18);
  }

  .hamburger svg {
    width: 22px;
    height: 22px;
  }

  .page-title {
    min-width: 0;
  }

  .page-title h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 19px;
  }

  .page-title p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .topbar-actions {
    width: 100%;
    margin-top: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar-actions .btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding-inline: 12px;
    border-radius: 14px;
  }

  .overlay-bg.show {
    z-index: 70;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(3px);
  }

  .sidebar,
  .sidebar.collapsed {
    width: min(86vw, 330px);
    max-width: 330px;
    padding: 18px 14px;
    border-radius: 0 24px 24px 0;
    box-shadow: 22px 0 60px rgba(15, 23, 42, .24);
    z-index: 90;
  }

  body[dir="rtl"] .sidebar,
  body[dir="rtl"] .sidebar.collapsed {
    border-radius: 24px 0 0 24px;
    box-shadow: -22px 0 60px rgba(15, 23, 42, .24);
  }

  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .user-chip .grow,
  .sidebar.collapsed .logout-text,
  .sidebar.collapsed .nav-item span:not(.nav-badge) {
    display: block;
  }

  .sidebar.collapsed .avatar,
  .sidebar.collapsed .nav-badge {
    display: grid;
  }

  .sidebar.collapsed .brand,
  .sidebar.collapsed .user-chip,
  .sidebar.collapsed .logout,
  .sidebar.collapsed .nav-item {
    justify-content: flex-start;
    width: 100%;
  }

  .sidebar.collapsed .nav {
    align-items: stretch;
    gap: 5px;
    padding-inline: 0;
    margin-inline: 0;
  }

  .sidebar.collapsed .nav-sub-item {
    width: 100%;
    height: auto;
    min-height: 44px;
    justify-content: flex-start;
    padding: 10px 12px;
    border: 1px solid rgba(13, 148, 136, .18);
    border-radius: 14px;
    background: rgba(240, 253, 250, .7);
  }

  .sidebar.collapsed .nav-sub-item span:not(.nav-badge) {
    display: inline;
  }

  .sidebar.collapsed .nav-sub-item::before {
    display: block;
  }

.table-card {
  min-height: auto;
  padding: 10px;
  border-radius: 22px;
    border-color: rgba(148, 163, 184, .2);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .08);
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 12px;
  }

  .toolbar .search-box,
  .toolbar .filter-select,
  .toolbar .btn {
    width: 100%;
    min-height: 44px;
    border-radius: 16px;
  }

  .table-wrap {
    overflow: visible;
  }

  table.data,
  table.data tbody,
  table.data tr,
  table.data td {
    display: block;
    width: 100%;
  }

  table.data {
    border: 0;
    background: transparent;
  }

  table.data thead {
    display: none;
  }

  table.data tbody {
    display: grid;
    gap: 12px;
  }

  table.data tbody tr {
    position: relative;
    overflow: visible;
    min-height: 0;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 20px;
    background: color-mix(in srgb, var(--row-bg, #ffffff) 28%, #ffffff);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
  }

  table.data tbody tr.empty-sheet-row {
    display: none;
  }

  table.data tbody td {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    padding: 7px 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    text-align: start;
  }

  table.data tbody td::before {
    content: attr(data-mobile-label);
    align-self: center;
    color: #64748b;
    font-size: 11px;
    font-weight: 1000;
    line-height: 1.2;
  }

  table.data tbody td:empty {
    display: none;
  }

  table.data tbody td:empty::before {
    display: none;
  }

  .info-cell,
  .order-id-cell,
  .select-cell {
    grid-template-columns: 1fr !important;
  }

  .info-cell::before,
  .order-id-cell::before,
  .select-cell::before {
    display: none;
  }

  .sheet-input,
  .cell-name,
  .cell-phone,
  .cell-price,
  .product-inline,
  .status-pill,
  .city-pill,
  .wa-pill,
  .pns-dropdown,
  .pns-confirm-dropdown,
  .ticket-status-select {
    width: 100%;
    min-height: 44px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .95);
  }

  .status-cell,
  .city-cell {
    overflow: visible !important;
  }

  .status-menu,
  .city-menu,
  .wa-menu {
    z-index: 120;
    max-width: calc(100vw - 32px);
  }

  .phone-badges {
    justify-content: flex-start;
    margin-top: 5px;
  }

  .dnote-cell textarea,
  .address-cell textarea {
    min-height: 70px;
  }

  .wa-web-shell {
    height: calc(100vh - 104px);
    min-height: 0;
    margin-inline: -10px;
  }

  .wa-web-card {
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex-direction: column;
    background: transparent;
  }

  .wa-web-list {
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: 38vh;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, .2);
    background: rgba(248, 250, 252, .92);
  }

  .wa-web-list-head {
    padding: 12px 12px 8px;
  }

  .wa-web-search {
    padding: 0 12px 10px;
  }

  .wa-web-chats {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 10px 12px;
    scrollbar-width: none;
  }

  .wa-web-chats::-webkit-scrollbar {
    display: none;
  }

  .wa-chat-item-wrap {
    flex: 0 0 265px;
    margin: 0;
  }

  .wa-chat-item {
    min-height: 74px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  }

  .wa-web-chat {
    min-height: 0;
    flex: 1;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    background: #eef7f1;
  }

  .wa-web-chat-head {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 58px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
  }

  .wa-web-head-actions > span,
  #wa-mark-chat-read span {
    display: none;
  }

  .wa-web-messages {
    min-height: 0;
    padding: 14px 12px 88px;
    gap: 7px;
  }

  .wa-msg {
    max-width: 86%;
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .wa-web-composer {
    position: sticky;
    bottom: 0;
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(148, 163, 184, .18);
    background: rgba(248, 250, 252, .96);
    backdrop-filter: blur(14px);
  }

  .wa-web-composer textarea {
    min-height: 44px;
    max-height: 120px;
    border-radius: 18px;
  }
}

/* ===================== WHATSAPP APK WEBVIEW MODE ===================== */
.wa-mobile-app-main {
  min-height: 100vh;
  min-height: 100dvh;
  background: #f0f2f5;
  padding: 0;
  overflow: hidden;
}
.wa-app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  background:
    radial-gradient(circle at 12% 4%, rgba(37, 211, 102, .16), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(18, 140, 126, .12), transparent 24%),
    #edf4f2;
  font-family: var(--font-body);
  transition: transform .18s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.mobile-order-list {
  display: none;
}
.wa-pull-refresh {
  --pull-y: 0px;
  position: fixed;
  z-index: 80;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, .96);
  color: #64748b;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 14px 35px rgba(15, 23, 42, .14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-60px + var(--pull-y) * .54)) scale(.94);
  transition: opacity .16s ease, transform .18s cubic-bezier(.22, 1, .36, 1), color .16s ease;
}
.wa-pull-refresh.show {
  opacity: 1;
}
.wa-pull-refresh.ready {
  color: #059669;
}
.wa-pull-refresh span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #2f80ed);
}
.wa-pull-refresh span svg {
  width: 15px;
  height: 15px;
}
.wa-pull-refresh b {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.wa-pull-refresh.loading span {
  animation: waPullSpin .75s linear infinite;
}
@keyframes waPullSpin {
  to { transform: rotate(360deg); }
}
.wa-app-shell,
.wa-app-shell *,
.wa-app-card,
.wa-app-card * {
  font-family: var(--font-body) !important;
}
.wa-app-card {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: block;
  background: #f7faf9;
  isolation: isolate;
}
.wa-app-card .wa-web-list {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  border: 0;
  background: #f7faf9;
}
.wa-app-shell.chat-open .wa-web-list { display: none; }
.wa-app-card .wa-web-list-head {
  min-height: 86px;
  padding: calc(18px + env(safe-area-inset-top)) 18px 14px;
  background:
    linear-gradient(135deg, rgba(18, 140, 126, .98), rgba(22, 163, 74, .94)),
    #128C7E;
  color: #fff;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 14px 34px rgba(18, 140, 126, .22);
}
.wa-app-card .wa-web-title {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}
.wa-app-card .wa-web-live {
  color: #e7fff1;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
}
.wa-app-card .wa-web-live span { background: #25d366; }
.wa-app-card .wa-web-live.offline {
  color: #fff1f2;
  background: rgba(225, 29, 72, .22);
  border-color: rgba(255,255,255,.24);
}
.wa-app-card .wa-web-live.offline span { background: #fecdd3; }
.wa-chat-tabs {
  margin: 14px 12px 8px;
  min-height: 74px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
  border: 1px solid rgba(15, 23, 42, .05);
}
.wa-chat-tabs button {
  position: relative;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #7a8795;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 12px 8px 13px;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
}
.wa-chat-tabs button + button {
  border-inline-start: 1px solid rgba(148, 163, 184, .22);
}
.wa-chat-tabs svg {
  width: 23px;
  height: 23px;
}
.wa-chat-tabs .wa-tab-unread {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  color: #64748b;
  background: #eef4f2;
}
.wa-chat-tabs .wa-tab-unread:not(:empty) {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .04);
}
.wa-chat-tabs button.active .wa-tab-unread {
  color: #047857;
  background: #dcfce7;
}
.wa-chat-tabs button.active {
  color: #16a34a;
}
.wa-chat-tabs button.active::after {
  content: "";
  position: absolute;
  inset-inline: 18px;
  bottom: 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: #16a34a;
}
.wa-app-card .wa-web-search {
  padding: 14px 14px 10px;
  background: transparent;
}
.wa-app-card .wa-web-search div {
  height: 48px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
}
.wa-app-card .wa-web-search input {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.wa-app-card .wa-web-chats {
  display: block;
  height: calc(100dvh - 246px - env(safe-area-inset-top));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 10px 20px;
  scroll-behavior: smooth;
}
.wa-app-card .wa-chat-item-wrap {
  flex: initial;
  width: 100%;
  margin: 0 0 8px;
  border-radius: 20px;
  overflow: visible;
}
.wa-app-card .wa-chat-item-wrap.active,
.wa-app-card .wa-chat-item-wrap:hover {
  background: transparent;
}
.wa-app-card .wa-chat-item {
  position: relative;
  min-height: 76px;
  border-radius: 20px;
  padding: 12px 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  border: 1px solid rgba(15, 23, 42, .05);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 56px;
  grid-template-areas: "side body avatar";
  align-items: center;
  gap: 10px;
  direction: ltr;
  overflow: hidden;
}
.wa-app-card .wa-chat-item-wrap.has-chat-color .wa-chat-item {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--wa-chat-color) 13%, #ffffff),
    color-mix(in srgb, var(--wa-chat-color) 7%, #ffffff)
  );
  border-color: color-mix(in srgb, var(--wa-chat-color) 22%, rgba(15, 23, 42, .05));
}
.wa-app-card .wa-chat-item-wrap.has-chat-color.active .wa-chat-item,
.wa-app-card .wa-chat-item-wrap.has-chat-color:hover .wa-chat-item {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--wa-chat-color) 18%, #ffffff),
    color-mix(in srgb, var(--wa-chat-color) 9%, #ffffff)
  );
}
.wa-app-card .wa-chat-item-wrap.pinned .wa-chat-item {
  background: linear-gradient(135deg, rgba(236, 253, 245, .98), rgba(255,255,255,.98));
  border-color: rgba(16, 185, 129, .18);
}
.wa-app-card .wa-chat-avatar {
  grid-area: avatar;
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  box-shadow: 0 10px 24px rgba(18, 140, 126, .18);
}
.wa-app-card .wa-chat-row b {
  color: #0f172a;
  font-size: 15.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}
.wa-app-card .wa-chat-row b .wa-suivi-location {
  flex: 0 0 auto;
  max-width: 88px;
}
.wa-app-card .wa-chat-body {
  grid-area: body;
  min-width: 0;
  width: 100%;
  direction: rtl;
  overflow: hidden;
}
.wa-app-card .wa-chat-row {
  min-width: 0;
  gap: 7px;
  justify-content: flex-start;
}
.wa-suivi-location {
  display: inline-flex;
  align-items: center;
  max-width: 116px;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .12);
  color: #0f8f78;
  border: 1px solid rgba(16, 185, 129, .18);
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-chat-duplicate-badge {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 3px 9px;
  border: 1px solid rgba(245, 158, 11, .38);
  border-radius: 999px;
  background: #fef3c7;
  color: #9a4f14;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  font-weight: 1000;
  line-height: 1;
}
.wa-chat-duplicate-badge:hover {
  border-color: rgba(245, 158, 11, .62);
  background: #fde68a;
}
.wa-chat-badges {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}
.wa-chat-status-badge {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 1000;
  line-height: 1;
  border: 1px solid transparent;
}
.wa-chat-status-badge.confirmed {
  color: #047857;
  background: #d1fae5;
  border-color: rgba(16, 185, 129, .28);
}
.wa-chat-status-badge.danger {
  color: #b91c1c;
  background: #fee2e2;
  border-color: rgba(239, 68, 68, .28);
}
.wa-chat-status-badge.postponed {
  color: #a16207;
  background: #fef3c7;
  border-color: rgba(245, 158, 11, .32);
}
.wa-chat-status-badge.suivi {
  color: #0f766e;
  background: #ccfbf1;
  border-color: rgba(20, 184, 166, .3);
}
.wa-chat-status-badge.section {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: rgba(59, 130, 246, .28);
}
.wa-chat-status-badge.waiting {
  color: #475569;
  background: #f1f5f9;
  border-color: rgba(148, 163, 184, .32);
}
.wa-status-note-field {
  margin-top: 14px;
}
.wa-head-location {
  margin-inline-start: 7px;
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, .26);
  vertical-align: middle;
}
.wa-head-order-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.wa-app-card .wa-chat-row small {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}
.wa-app-card .wa-chat-row em {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 11px;
}
.wa-app-card .wa-chat-row em.unread,
.wa-app-card .wa-chat-row em:not(.unread) {
  display: none;
}
.wa-app-card .wa-chat-row i {
  display: none;
}
.wa-app-card .wa-chat-mobile-meta {
  grid-area: side;
  width: 76px;
  min-height: 54px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding-top: 32px;
  pointer-events: none;
  direction: rtl;
}
.wa-app-card .wa-chat-mobile-meta i {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 163, 74, .18);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
}
.wa-app-card .wa-chat-mobile-meta i.empty {
  display: none;
}
.wa-app-card .wa-chat-mobile-meta time {
  min-width: 39px;
  min-height: 20px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
.wa-app-card .wa-chat-menu-toggle {
  opacity: 1;
  transform: none;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, .95);
  color: #0f766e;
  box-shadow: 0 12px 26px rgba(15, 118, 110, .16);
}
.wa-app-card .wa-chat-menu {
  top: 11px;
  left: 12px;
  right: auto;
  inset-inline-start: auto;
  inset-inline-end: auto;
  width: 46px;
  z-index: 5;
}
.wa-app-card .wa-chat-card-date {
  display: none;
}
.wa-app-card .wa-chat-menu-toggle svg {
  width: 19px;
  height: 19px;
}
.wa-app-card .wa-web-chat {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
  background: #e9f1ee;
  display: flex;
  flex-direction: column;
}
.wa-app-card .wa-web-chat-head {
  flex: 0 0 auto;
  min-height: 72px;
  padding: calc(10px + env(safe-area-inset-top)) 10px 10px;
  background: linear-gradient(135deg, #128C7E, #16a34a);
  color: #fff;
  border: 0;
  display: flex;
  gap: 9px;
  box-shadow: 0 12px 26px rgba(18, 140, 126, .20);
  z-index: 4;
}
.wa-app-card .wa-web-chat-head .wa-chat-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 14px;
  box-shadow: none;
}
.wa-app-card .wa-web-chat-head > div:not(.wa-web-head-actions) {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.wa-app-card .wa-web-chat-head b,
.wa-app-card .wa-web-chat-head small {
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-app-card .wa-web-chat-head small {
  opacity: .78;
  direction: ltr;
  text-align: start;
}
.wa-app-card .wa-web-head-actions {
  margin-inline-start: auto;
}
.wa-app-card .wa-head-status-btn {
  max-width: 154px;
  min-height: 34px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .20);
  border-color: rgba(255, 255, 255, .28);
  color: #ffffff;
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.wa-app-card .wa-head-status-menu.status-menu {
  inset-inline: auto 0;
  top: calc(100% + 9px);
  min-width: 168px;
}
.wa-app-card .wa-head-add-order {
  min-height: 34px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .20);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.wa-app-card .wa-web-head-actions > span,
.wa-app-card #wa-mark-chat-read {
  display: none;
}
.wa-app-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
  flex: 0 0 38px;
}
.wa-app-back svg {
  width: 23px;
  height: 23px;
}
.wa-app-back:active {
  background: rgba(255,255,255,.16);
}
.wa-app-card .wa-web-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 10px 14px;
  background:
    radial-gradient(circle at 12px 12px, rgba(18, 140, 126, .045) 1px, transparent 1.8px) 0 0/34px 34px,
    linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0)),
    #e9f1ee;
}
.wa-app-card .wa-msg {
  width: fit-content;
  min-width: 0;
  max-width: min(82%, 420px);
  display: inline-grid;
  border-radius: 18px;
  padding: 10px 11px 7px;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}
.wa-app-card .wa-msg.in {
  border-top-right-radius: 4px;
  background: #fff;
}
.wa-app-card .wa-msg.out {
  border-top-left-radius: 4px;
  background: #d9fdd3;
}
.wa-app-card .wa-msg span {
  width: auto;
  max-width: 100%;
  justify-self: start;
  font-size: 14.5px;
  line-height: 1.75;
}
.wa-app-card .wa-msg em {
  justify-self: end;
  margin-top: 5px;
  font-size: 10.5px;
}
.wa-app-card .wa-media-label {
  max-width: 100%;
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
}
.wa-app-card .wa-audio-player {
  width: min(250px, 72vw);
  gap: 8px;
}
.wa-app-card .wa-audio-play {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}
.wa-app-card .wa-audio-track {
  min-width: 86px;
}
.wa-app-card .wa-audio-duration {
  font-size: 11px;
}
.wa-app-card .wa-web-composer {
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: rgba(233, 241, 238, .92);
  backdrop-filter: blur(14px);
  border: 0;
}
.wa-app-card .wa-web-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: #128C7E;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 140, 126, .24);
}
.wa-app-card .wa-web-composer textarea {
  min-height: 28px;
  max-height: 118px;
  border-radius: 0;
  background: transparent;
  padding: 6px 2px;
  font-weight: 800;
  line-height: 1.55;
}
.wa-app-card .wa-web-composer > .wa-input-wrap {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border-radius: 25px;
  background: #ffffff;
  padding: 5px 7px 5px 10px;
  box-shadow: 0 6px 18px rgba(15,23,42,.10);
}
.wa-app-card .wa-inline-icon {
  color: #64748b;
}
.wa-app-card .wa-emoji-panel {
  position: fixed;
  inset-inline: 10px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  width: auto;
  grid-template-columns: repeat(6, 1fr);
}
.wa-app-card .wa-web-send {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: #128C7E;
  box-shadow: 0 8px 20px rgba(18, 140, 126, .24);
}
.wa-app-card .wa-rec-bar,
.wa-app-card .wa-audio-preview {
  min-height: 48px;
  border-radius: 25px;
  box-shadow: 0 6px 18px rgba(15,23,42,.10);
}
.wa-app-card .wa-preview-send {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}
.wa-app-card .wa-web-empty {
  display: none;
}
@media (min-width: 821px) {
  .wa-app-card {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(15,23,42,.08), 0 30px 90px rgba(15,23,42,.18);
  }
}
@media (max-width: 420px) {
  .wa-app-card .wa-web-list-head {
    min-height: 82px;
    padding-inline: 14px;
  }
  .wa-app-card .wa-web-title {
    font-size: 20px;
  }
  .wa-app-card .wa-web-chats {
    padding-inline: 8px;
  }
  .wa-app-card .wa-chat-item {
    padding-inline: 12px;
  }
  .wa-app-card .wa-chat-avatar {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
  .wa-app-card .wa-msg {
    max-width: 84%;
  }
  .wa-app-card .wa-inline-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}

/* Final WhatsApp-app bubble guard: keep short messages compact on mobile. */
.wa-app-card .wa-web-messages > .wa-msg {
  width: fit-content;
  max-width: min(82%, 420px);
  display: inline-grid;
  grid-template-columns: minmax(0, auto);
  justify-items: start;
}
.wa-app-card .wa-web-messages > .wa-msg > span {
  width: auto;
  min-width: 0;
  justify-self: start;
}
.wa-app-card .wa-web-messages > .wa-msg > em {
  justify-self: end;
}
.wa-app-card .wa-web-messages > .wa-msg > .wa-audio-player,
.wa-app-card .wa-web-messages > .wa-msg > .wa-media-label {
  justify-self: stretch;
}
.wa-app-card .wa-web-messages > .wa-msg:not(:has(.wa-audio-player)):not(:has(.wa-media-label)) {
  min-width: 0;
}
.wa-app-card .wa-web-messages > .wa-msg:has(.wa-audio-player) {
  width: min(86%, 350px);
}
@media (max-width: 420px) {
  .wa-app-card .wa-web-messages > .wa-msg {
    max-width: 84%;
  }
  .wa-app-card .wa-web-messages > .wa-msg:has(.wa-audio-player) {
    width: min(86%, 330px);
  }
}

/* WhatsApp app hard fix: keep message content visible and compact. */
.wa-app-card .wa-web-messages > .wa-msg {
  width: auto !important;
  min-width: 44px !important;
  max-width: min(84%, 420px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  color: var(--ink) !important;
  overflow: visible !important;
  white-space: normal !important;
  font-family: var(--font-body) !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  line-height: 1.72 !important;
  padding: 10px 12px 7px !important;
  border-radius: 18px 18px 18px 6px !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .06) !important;
}
.wa-app-card .wa-web-messages > .wa-msg.out {
  align-self: flex-end !important;
  background: linear-gradient(135deg, #dcfce7 0%, #ccf7d0 100%) !important;
  border-radius: 18px 18px 6px 18px !important;
}
.wa-app-card .wa-web-messages > .wa-msg.in {
  align-self: flex-start !important;
  background: rgba(255, 255, 255, .98) !important;
  border-radius: 18px 18px 18px 6px !important;
}
.wa-app-card .wa-web-messages > .wa-msg::before {
  content: "";
  position: absolute;
  bottom: 0;
  width: 11px;
  height: 11px;
  pointer-events: none;
}
.wa-app-card .wa-web-messages > .wa-msg.in::before {
  inset-inline-start: -4px;
  background: radial-gradient(circle at 0 0, transparent 11px, rgba(255,255,255,.98) 12px);
}
.wa-app-card .wa-web-messages > .wa-msg.out::before {
  inset-inline-end: -4px;
  background: radial-gradient(circle at 100% 0, transparent 11px, #ccf7d0 12px);
}
.wa-app-card .wa-web-messages > .wa-msg > span,
.wa-app-card .wa-web-messages > .wa-msg > .wa-media-label {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  color: var(--ink) !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: transparent !important;
  font-family: var(--font-body) !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  line-height: 1.72 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
.wa-app-card .wa-web-messages > .wa-msg > em {
  align-self: flex-end !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 3px !important;
  margin-top: 1px !important;
  color: #667781 !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-family: var(--font-body) !important;
  font-size: 10.5px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}
.wa-app-card .wa-web-messages > .wa-msg > .wa-audio-player {
  width: min(310px, 74vw) !important;
  min-width: 220px !important;
  max-width: 100% !important;
  display: flex !important;
  color: #10202a !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.wa-app-card .wa-web-messages > .wa-msg > .wa-audio-player .wa-audio-track {
  min-width: 112px !important;
}
.wa-app-card .wa-web-messages > .wa-msg > .wa-audio-player .wa-audio-wave {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.wa-app-card .wa-web-messages > .wa-msg:not(:has(.wa-audio-player)):not(:has(.wa-media-label)) {
  max-width: min(76%, 360px) !important;
}

/* WhatsApp bubble safety net: message bubbles must grow with their content. */
.wa-web-messages > .wa-msg,
.wa-app-card .wa-web-messages > .wa-msg {
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  height: auto !important;
  min-height: 36px !important;
  max-height: none !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  padding: 10px 12px 7px !important;
  overflow: visible !important;
  white-space: normal !important;
  line-height: 1.65 !important;
}
.wa-web-messages > .wa-date-pill,
.wa-app-card .wa-web-messages > .wa-date-pill {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
}
.wa-web-messages > .wa-msg.in,
.wa-app-card .wa-web-messages > .wa-msg.in {
  align-self: flex-start !important;
}
.wa-web-messages > .wa-msg.out,
.wa-app-card .wa-web-messages > .wa-msg.out {
  align-self: flex-end !important;
}
.wa-web-messages > .wa-msg > span,
.wa-web-messages > .wa-msg > .wa-media-label,
.wa-app-card .wa-web-messages > .wa-msg > span,
.wa-app-card .wa-web-messages > .wa-msg > .wa-media-label {
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--ink) !important;
  background: transparent !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  line-height: 1.65 !important;
}
.wa-web-messages > .wa-msg > em,
.wa-app-card .wa-web-messages > .wa-msg > em {
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: inline-flex !important;
  width: 100% !important;
  align-self: flex-end !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin: 2px 0 0 !important;
  overflow: visible !important;
  line-height: 1.2 !important;
}

/* WhatsApp mobile conversation card final alignment. */
.wa-web-shell.wa-app-shell .wa-chat-item-wrap {
  position: relative !important;
  overflow: visible !important;
  z-index: 1 !important;
}
.wa-web-shell.wa-app-shell .wa-chat-item-wrap:has(.wa-chat-menu.open) {
  z-index: 10000 !important;
}
.wa-web-shell.wa-app-shell .wa-chat-item {
  display: grid !important;
  grid-template-columns: 88px minmax(0, 1fr) 56px !important;
  grid-template-areas: "side body avatar" !important;
  direction: ltr !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px !important;
  overflow: visible !important;
}
.wa-web-shell.wa-app-shell .wa-chat-avatar {
  grid-area: avatar !important;
  justify-self: end !important;
}
.wa-web-shell.wa-app-shell .wa-chat-body {
  grid-area: body !important;
  direction: rtl !important;
  min-width: 0 !important;
}
.wa-web-shell.wa-app-shell .wa-chat-menu {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  inset-inline-start: unset !important;
  inset-inline-end: unset !important;
  width: 46px !important;
  z-index: 10001 !important;
  display: grid !important;
  justify-items: center !important;
  gap: 4px !important;
}
.wa-web-shell.wa-app-shell .wa-chat-menu .wa-chat-menu-panel {
  position: absolute !important;
  top: 42px !important;
  left: 0 !important;
  right: auto !important;
  inset-inline-start: unset !important;
  inset-inline-end: unset !important;
  transform: none !important;
  max-width: calc(100vw - 24px) !important;
  width: min(240px, calc(100vw - 24px)) !important;
  z-index: 10002 !important;
  pointer-events: auto !important;
}
.wa-web-shell.wa-app-shell .wa-chat-menu.open {
  z-index: 10001 !important;
}
.wa-web-shell.wa-app-shell .wa-chat-menu.open .wa-chat-menu-panel {
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
@media (max-width: 600px) {
  .wa-web-shell.wa-app-shell .wa-chat-menu .wa-chat-menu-panel {
    left: 8px !important;
    right: auto !important;
    transform: none !important;
    width: min(260px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }
}
.wa-web-shell.wa-app-shell .wa-chat-mobile-meta {
  grid-area: side !important;
  width: 76px !important;
  min-height: 54px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding-top: 32px !important;
  pointer-events: none !important;
}
.wa-web-shell.wa-app-shell .wa-chat-card-date,
.wa-web-shell.wa-app-shell .wa-chat-row em,
.wa-web-shell.wa-app-shell .wa-chat-row i {
  display: none !important;
}
.wa-web-shell.wa-app-shell .wa-chat-side {
  grid-area: side !important;
  width: 88px !important;
  min-height: 58px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 7px !important;
  direction: ltr !important;
  justify-self: start !important;
}
.wa-web-shell.wa-app-shell .wa-chat-side-top {
  width: 88px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  min-width: 0 !important;
}
.wa-web-shell.wa-app-shell .wa-chat-side-time {
  min-width: 34px !important;
  font-size: 10px !important;
  font-weight: 1000 !important;
  color: #64748b !important;
  line-height: 1 !important;
  text-align: left !important;
  direction: ltr !important;
}
.wa-web-shell.wa-app-shell .wa-chat-side .wa-chat-mobile-meta {
  width: 46px !important;
  min-height: 30px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 0 !important;
  pointer-events: none !important;
  direction: rtl !important;
}

/* WhatsApp app reading comfort: keep bubbles away from phone edges. */
.wa-app-card .wa-web-messages {
  padding-left: 18px !important;
  padding-right: 18px !important;
  scroll-behavior: auto !important;
}
.wa-app-card .wa-web-messages > .wa-msg.in {
  margin-left: 4px !important;
}
.wa-app-card .wa-web-messages > .wa-msg.out {
  margin-right: 4px !important;
}

/* WhatsApp app composer comfort: keep input/audio bar off phone edges. */
.wa-app-card .wa-web-composer {
  margin: 0 10px 8px !important;
  padding: 8px 2px calc(12px + env(safe-area-inset-bottom)) !important;
  border-radius: 28px !important;
  z-index: 20 !important;
}

@media (max-width: 760px) {
  .mobile-order-list:not(:empty) {
    display: grid;
    gap: 12px;
  }

  .mobile-order-list:not(:empty) + .table-wrap {
    display: none !important;
  }

  .mobile-order-card {
    --card-accent: color-mix(in srgb, var(--row-bg, #cfd2e2) 70%, #10b981);
    position: relative;
    overflow: visible;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--card-accent) 20%, #ffffff);
    border-radius: 18px;
    background: color-mix(in srgb, var(--row-bg, #ffffff) 30%, #ffffff);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
  }

  .mobile-order-strip {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 18px 0 0 18px;
    background: var(--card-accent);
  }

  body[dir="rtl"] .mobile-order-strip {
    border-radius: 0 18px 18px 0;
  }

  .mobile-order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 2px;
  }

  .mobile-order-identity {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .mobile-order-name-line {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
  }

  .mobile-order-name-line > b {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
    font-size: 16px;
    font-weight: 1000;
    line-height: 1.2;
  }

  .mobile-order-badges {
    width: auto;
    margin: 0;
    justify-content: flex-start;
    gap: 4px;
  }

  .mobile-order-product {
    width: fit-content;
    max-width: 210px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 12.5px;
    font-weight: 800;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-order-price {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 7px 9px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .74);
    color: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .15);
  }

  .mobile-order-price b {
    font-size: 17px;
    font-weight: 1000;
    font-variant-numeric: tabular-nums;
  }

  .mobile-order-price span {
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
  }

  .mobile-order-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(132px, .72fr);
    gap: 9px;
    align-items: start;
  }

  .mobile-order-phone {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(91, 89, 240, .16);
    border-radius: 13px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 1000;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  }

  .mobile-order-phone svg {
    width: 15px;
    height: 15px;
    color: #2563eb;
  }

  .mobile-status-wrap,
  .mobile-order-status-box {
    position: relative;
    display: grid;
    gap: 7px;
    min-width: 0;
  }

  .mobile-status-pill,
  .mobile-order-status-box .pns-dropdown,
  .mobile-order-status-box .pns-confirm-dropdown {
    width: 100%;
    min-height: 42px;
    border-radius: 13px;
  }

  .mobile-status-wrap .status-menu {
    inset-inline-end: 0;
    inset-inline-start: auto;
    top: calc(100% + 6px);
    min-width: min(240px, calc(100vw - 34px));
    z-index: 95;
  }

  .mobile-order-status-box .postpone-note,
  .mobile-status-wrap .status-note {
    width: 100%;
    min-height: 38px;
    border-radius: 12px;
  }

  .mobile-no-answer-box {
    display: flex;
    justify-content: stretch;
    padding: 9px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 15px;
    background: rgba(239, 246, 255, .82);
  }

  .mobile-no-answer-box .no-answer-meta-pill {
    width: 100%;
    margin: 0;
    justify-content: center;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-order-delivery-fields {
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid rgba(16, 185, 129, .18);
    border-radius: 16px;
    background: rgba(236, 253, 245, .72);
  }

  .mobile-order-field {
    display: grid;
    gap: 6px;
  }

  .mobile-order-field small {
    color: #64748b;
    font-size: 11px;
    font-weight: 1000;
  }

  .mobile-order-input,
  .mobile-order-field .sheet-input {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    background: #fff;
    text-align: start;
  }

  .mobile-order-city-field .city-dropdown,
  .mobile-order-city-field .city-pill {
    width: 100%;
  }

  .mobile-order-city-field .city-pill {
    min-height: 44px;
    justify-content: space-between;
    border-radius: 14px;
    background: #fff;
  }

  .mobile-order-city-field .city-menu {
    width: 100%;
    min-width: min(280px, calc(100vw - 54px));
    inset-inline: 0 auto;
    top: calc(100% + 6px);
    z-index: 100;
  }

  .mobile-order-waiting-note {
    padding: 10px;
    border: 1px solid rgba(245, 158, 11, .22);
    border-radius: 16px;
    background: rgba(255, 251, 235, .78);
  }

  .mobile-order-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 8px;
  }

  .mobile-order-grid div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(226, 232, 240, .8);
    border-radius: 13px;
    background: rgba(255, 255, 255, .66);
  }

  .mobile-order-grid small {
    display: block;
    margin-bottom: 3px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 1000;
  }

  .mobile-order-grid span {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-size: 12.5px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-order-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
  }

  .mobile-order-select {
    flex: 0 0 auto;
  }

  .mobile-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    color: #475569;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-info-btn svg {
    width: 15px;
    height: 15px;
  }

  .mobile-order-number {
    margin-inline-start: auto;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 1000;
  }

  .mobile-quick-edit-grid {
    grid-template-columns: 1fr;
  }
}

