
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe3ef;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --success: #0f766e;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
body[dir="rtl"] { font-family: "Noto Naskh Arabic", Tahoma, Arial, sans-serif; }
.container { width: min(1120px, calc(100vw - 32px)); margin: 0 auto; }
.main-container { padding: 28px 0 56px; }

.topbar { background: #0f172a; color: white; position: sticky; top: 0; z-index: 20; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; }
.brand-block { display: flex; flex-direction: column; gap: 4px; }
.brand { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.02em; }
.subtitle { font-size: 0.92rem; color: rgba(255,255,255,0.74); }
.topnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topnav a { color: rgba(255,255,255,0.88); font-size: 0.95rem; }
.topnav a:hover { color: white; }
.lang-switcher { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-inline-start: 6px; }
.lang-pill { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); font-size: 0.92rem; }
.lang-pill.is-active { background: rgba(255,255,255,0.18); color: white; border-color: rgba(255,255,255,0.28); }

.hero-card, .detail-card, .login-card, .success-card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card, .detail-card, .success-card, .login-card { padding: 24px; }
.detail-card--plain { box-shadow: none; margin-bottom: 20px; }
.hero-card { margin-bottom: 24px; }

.section-block { margin-top: 28px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h1, .section-head h2 { margin: 0; }
.muted { color: var(--muted); }

.search-form .search-grid {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 14px;
  align-items: end;
}
.search-main, .search-side, .search-actions { display: flex; flex-direction: column; gap: 8px; }

.label { display: block; font-size: 0.92rem; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.input, .textarea, select.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.98rem;
  background: white;
  color: var(--text);
  outline: none;
}
.input:focus, .textarea:focus, select.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.textarea { resize: vertical; min-height: 120px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { filter: brightness(1.02); transform: translateY(-1px); }
.btn-secondary { background: white; border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: var(--surface-alt); }
.btn-link { padding: 0; color: var(--primary); background: none; border: none; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.category-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.category-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.category-card__title { font-size: 1.02rem; font-weight: 800; margin-bottom: 8px; }
.category-card__desc { color: var(--muted); line-height: 1.55; }

.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.faq-card h3 { margin: 0 0 10px; font-size: 1.06rem; line-height: 1.45; }
.answer-preview { color: var(--muted); line-height: 1.7; min-height: 78px; }
.faq-meta, .ticket-badges, .action-row, .card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.faq-meta { margin-bottom: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.action-row { margin-top: 20px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.compact-form .form-item--full { grid-column: span 2; }
.form-item--full { grid-column: span 2; }
.checkbox-item { display: flex; align-items: center; padding-top: 34px; }

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 16px;
  line-height: 1.6;
}
.notice.warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #fed7aa; }
.notice.error { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.detail-box, .detail-list div {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.detail-list { display: grid; gap: 10px; }
.rich-answer {
  line-height: 1.85;
  color: var(--text);
  word-break: break-word;
}

.timeline { display: grid; gap: 14px; }
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: white;
}
.timeline-item--internal { background: #fffef5; }
.timeline-item__meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 8px; }
.timeline-item__body { line-height: 1.75; }

.success-grid, .admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.stat-card__label { color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }
.stat-card__value { font-size: 1.4rem; font-weight: 900; }

.admin-panels {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.panel { padding: 20px; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel__head h2 { margin: 0; }

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.data-table th, .data-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
}
body[dir="rtl"] .data-table th,
body[dir="rtl"] .data-table td { text-align: right; }
body[dir="rtl"] .topbar__inner,
body[dir="rtl"] .section-head,
body[dir="rtl"] .panel__head { direction: rtl; }
body[dir="rtl"] .brand-block { align-items: flex-start; }
body[dir="rtl"] .topnav { justify-content: flex-start; }
.data-table th { color: var(--muted); font-weight: 700; }
.data-table tbody tr:hover { background: #fafcff; }

.attachment-list { margin: 10px 0 0; padding-left: 20px; }
body[dir="rtl"] .attachment-list { padding-right: 20px; padding-left: 0; }

.empty-state {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.login-card {
  width: min(520px, 100%);
  margin: 60px auto 0;
}

.extra-field { display: none; }
.extra-field.is-visible { display: block; }

@media (max-width: 920px) {
  .search-form .search-grid,
  .faq-list,
  .category-grid,
  .form-grid,
  .detail-grid,
  .success-grid,
  .admin-stats,
  .admin-panels,
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .form-item--full,
  .compact-form .form-item--full { grid-column: span 1; }
  .topbar__inner,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .topnav { justify-content: flex-start; }
  .search-actions { flex-direction: row; }
}


body.admin-shell { background: #f3f6fb; }
body.public-shell { background: var(--bg); }

.centered-card {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.notice.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 4px;
  color: var(--text);
}

.checkbox-row--compact { min-height: 36px; }

.btn-sm { padding: 8px 12px; font-size: 0.88rem; border-radius: 10px; }

.inline-form { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.input--sm { max-width: 160px; padding: 8px 10px; }

.admin-panels--wide { grid-template-columns: 1.2fr 0.8fr; }


.permission-editor {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.permission-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.permission-editor__head h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.permission-editor__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.permission-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-alt);
  padding: 16px;
}

.permission-card h3 {
  margin: 0 0 12px;
  font-size: 0.98rem;
}

.permission-grid {
  display: grid;
  gap: 12px;
}

.permission-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.permission-item--scope {
  padding: 12px;
}

.permission-editor__hint {
  margin-top: 12px;
}

/* v5.3 polish overrides */
:root {
  --bg: #eef3fb;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --text: #0f172a;
  --muted: #5b6b84;
  --line: #d7e0ee;
  --primary: #2f6fed;
  --primary-soft: #e7efff;
  --success: #0f766e;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

html, body {
  line-height: 1.55;
}

body {
  background:
    radial-gradient(circle at top right, rgba(47,111,237,0.08), transparent 32%),
    linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
}

.container {
  width: min(1220px, calc(100vw - 32px));
}

.main-container {
  padding: 28px 0 64px;
}

.topbar {
  position: sticky;
  top: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #081225 0%, #0d1d42 58%, #12326f 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 36px rgba(8, 18, 37, 0.28);
  backdrop-filter: blur(10px);
}

.topbar__glow {
  position: absolute;
  inset: auto -10% -35px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126,180,255,0.22), transparent 70%);
  pointer-events: none;
}

.topbar__inner {
  position: relative;
  align-items: flex-start;
  gap: 18px 26px;
  padding: 18px 0 20px;
}

.brand {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.subtitle {
  color: rgba(255,255,255,0.74);
  max-width: 420px;
}

.topbar__nav-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
}

.topnav {
  justify-content: flex-end;
  gap: 10px;
}

.topnav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.topnav__link:hover {
  color: #fff;
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.topnav__link.is-active {
  color: #fff;
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.26);
  box-shadow: 0 10px 18px rgba(8, 18, 37, 0.18);
}

.lang-switcher {
  margin-inline-start: 0;
  gap: 10px;
}

.lang-pill {
  min-height: 40px;
  padding: 9px 16px;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.lang-pill:hover {
  background: rgba(255,255,255,0.13);
}

.lang-pill.is-active {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.28);
}

.hero-card, .detail-card, .login-card, .success-card, .panel {
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.panel + .panel,
.detail-card + .panel,
.panel + .detail-card,
.detail-card + .detail-card {
  margin-top: 22px;
}

.panel--soft {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.panel__head--stacked {
  align-items: flex-start;
}

.panel__head h1,
.panel__head h2,
.section-head h1,
.section-head h2 {
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

.label {
  font-weight: 700;
  color: #5f718c;
}

.input, .textarea, select.input {
  border-radius: 14px;
  border-color: #d5deec;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input:hover, .textarea:hover, select.input:hover {
  border-color: #bfd0ea;
}

.input--ghost {
  background: #fff;
}

.textarea {
  min-height: 132px;
}

.btn {
  min-height: 44px;
  box-shadow: 0 10px 18px rgba(47,111,237,0.08);
}

.btn-primary {
  background: linear-gradient(135deg, #2f6fed 0%, #275ee0 100%);
}

.btn-secondary {
  background: rgba(255,255,255,0.96);
}

.btn-sm {
  min-height: 36px;
  box-shadow: none;
}

.checkbox-row {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fafcff 100%);
}

.checkbox-row--compact {
  min-height: 38px;
  padding: 7px 10px;
}

.notice {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.detail-box, .detail-list div {
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

.table-wrap--card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: auto;
  background: #fff;
}

.data-table {
  min-width: 100%;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faff;
  backdrop-filter: blur(8px);
}

.data-table th, .data-table td {
  padding: 14px 12px;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.data-table--phones td,
.data-table--phones th {
  white-space: nowrap;
}

.data-table--phones td:nth-child(2) {
  min-width: 170px;
  white-space: normal;
}

.data-table--phones td:last-child,
.data-table--phones th:last-child {
  min-width: 230px;
}

.table-primary {
  font-weight: 700;
  color: var(--text);
}

.table-secondary {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form--tight {
  gap: 8px;
}

.inline-form--status .input--sm {
  min-width: 128px;
  max-width: 160px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-pill--new {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.status-pill--dialed {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-pill--reached,
.status-pill--reached-flag {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.status-pill--follow_up {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.status-pill--invalid {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.status-pill--converted {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.status-pill--not-reached {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.search-form .search-grid,
.filter-grid {
  gap: 18px;
}

body[dir="rtl"] .brand-block {
  align-items: flex-start;
}

body[dir="rtl"] .topbar__nav-block {
  align-items: flex-start;
}

body[dir="rtl"] .topnav {
  justify-content: flex-start;
}

body[dir="rtl"] .input,
body[dir="rtl"] .textarea,
body[dir="rtl"] select.input,
body[dir="rtl"] .label,
body[dir="rtl"] .subtitle,
body[dir="rtl"] .muted,
body[dir="rtl"] .table-secondary {
  text-align: right;
}

body[dir="rtl"] .table-actions,
body[dir="rtl"] .inline-form {
  justify-content: flex-start;
}

@media (max-width: 1180px) {
  .topbar__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__nav-block {
    align-items: stretch;
  }

  .topnav {
    justify-content: flex-start;
  }
}

@media (max-width: 920px) {
  .container {
    width: min(100vw - 20px, 1220px);
  }

  .panel,
  .hero-card,
  .detail-card,
  .success-card,
  .login-card {
    padding: 18px;
  }

  .topnav__link,
  .lang-pill {
    min-height: 36px;
    padding: 8px 12px;
  }

  .table-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-form--status {
    width: 100%;
  }

  .inline-form--status .input--sm {
    max-width: none;
    width: 100%;
  }
}


/* V6 workspace */
.v6-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.v6-sidebar { position: sticky; top: 110px; max-height: calc(100vh - 140px); overflow: auto; }
.v6-record-list { display: flex; flex-direction: column; gap: 10px; }
.v6-record-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-alt);
}
.v6-record-card:hover,
.v6-record-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
  background: white;
}
.v6-record-card__title { font-weight: 800; margin-bottom: 4px; }
.v6-pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.v6-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.v6-log-form { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.meeting-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-alt);
}
.meeting-feed-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: white;
}
.meeting-feed-original { font-weight: 700; margin-bottom: 6px; }
.meeting-feed-translated { font-size: 1.05rem; line-height: 1.65; }
.pre-box {
  white-space: pre-wrap;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  line-height: 1.65;
}
@media (max-width: 900px) {
  .v6-workspace { grid-template-columns: 1fr; }
  .v6-sidebar { position: static; max-height: none; }
}


/* V6.1 refinement */
html { scroll-behavior: smooth; }
body { background: linear-gradient(180deg, #eef4ff 0%, #f6f8fc 220px, #f5f7fb 100%); }
.topbar { background: linear-gradient(135deg, #071a48 0%, #0d245d 45%, #163a8a 100%); box-shadow: 0 18px 40px rgba(7,26,72,.18); }
.topbar__inner { align-items: flex-start; padding: 22px 0 18px; }
.topbar__nav-block { display:flex; flex-direction:column; align-items:flex-end; gap:14px; }
.topnav { gap: 10px; }
.topnav__link { padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); transition: all .18s ease; }
.topnav__link:hover, .topnav__link.is-active { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.24); }
.panel { padding: 24px; border-color:#dde7f5; }
.panel--soft { background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,251,255,.96)); }
.notice { border:1px solid transparent; box-shadow: 0 8px 18px rgba(15,23,42,.05); }
.notice.success { background:#ecfdf5; color:#047857; border-color:#a7f3d0; }
.table-wrap--card { border:1px solid var(--line); border-radius:16px; overflow:auto; }
.data-table th { background:#f8fbff; position: sticky; top: 0; z-index: 1; }
.table-actions { display:flex; flex-direction:column; gap:8px; min-width: 132px; }
.inline-form--status { display:flex; flex-direction:column; gap:8px; }
.inline-form--status .btn { width:100%; }
.status-pill { display:inline-flex; align-items:center; padding:8px 12px; border-radius:999px; font-size:.84rem; font-weight:800; }
.status-pill--new { background:#eff6ff; color:#1d4ed8; }
.status-pill--dialed { background:#eff6ff; color:#2563eb; }
.status-pill--reached, .status-pill--converted { background:#ecfdf5; color:#047857; }
.status-pill--follow_up { background:#fff7ed; color:#b45309; }
.status-pill--invalid { background:#fef2f2; color:#b91c1c; }
.status-pill--reached-flag { background:#ecfdf5; color:#047857; }
.status-pill--not-reached { background:#f8fafc; color:#475569; }
.v6-workspace { display:grid; grid-template-columns: 320px 1fr; gap:20px; align-items:start; }
.v6-sidebar { position: sticky; top: 110px; max-height: calc(100vh - 140px); overflow:hidden; }
.v6-record-list { display:grid; gap:12px; overflow:auto; max-height: calc(100vh - 220px); padding-right:2px; }
.v6-record-card { border:1px solid var(--line); border-radius:18px; padding:16px; background:linear-gradient(180deg,#fff,#f8fbff); transition: all .18s ease; }
.v6-record-card:hover, .v6-record-card.is-active { border-color:#7aa2ff; box-shadow:0 12px 24px rgba(37,99,235,.12); transform: translateY(-1px); }
.v6-main { display:grid; gap:20px; }
.v6-pill-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.meeting-shell { display:grid; gap:18px; }
.meeting-layout { display:grid; grid-template-columns: 280px 1fr 340px; gap:18px; align-items:start; }
.meeting-toolbar, .meeting-side, .meeting-stage, .meeting-right { border-radius:24px; }
.meeting-controls-stack { display:grid; gap:14px; }
.meeting-control-buttons { display:flex; gap:10px; flex-wrap:wrap; }
.meeting-status-card { padding:14px; border-radius:18px; background:linear-gradient(180deg,#f5f9ff,#eef4ff); border:1px solid #d9e5fb; }
.meeting-status-card__label { color:var(--muted); font-size:.88rem; }
.meeting-status-card__value { font-size:1.1rem; font-weight:800; margin:6px 0; }
.meeting-participants { display:grid; gap:10px; }
.meeting-participant { display:flex; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.meeting-participant.is-self { border-color:#93c5fd; background:linear-gradient(180deg,#eff6ff,#fff); }
.meeting-avatar, .meeting-big-avatar { display:flex; align-items:center; justify-content:center; font-weight:900; color:#fff; background:linear-gradient(135deg,#2563eb,#4f46e5); border-radius:50%; }
.meeting-avatar { width:38px; height:38px; }
.meeting-big-avatar { width:78px; height:78px; font-size:2rem; }
.meeting-stage__tiles { display:grid; grid-template-columns: 1fr 260px; gap:16px; }
.meeting-video-tile { min-height:220px; border-radius:22px; padding:16px; background: radial-gradient(circle at top left, #1f3f8f, #0f172a 60%); color:#fff; display:flex; flex-direction:column; }
.meeting-video-tile--main { min-height:320px; }
.meeting-video-tile__name { font-weight:800; margin-bottom:12px; opacity:.95; }
.meeting-video-tile__body { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; text-align:center; }
.meeting-video-tile__body--small { color:rgba(255,255,255,.8); }
.meeting-feed { display:grid; gap:12px; max-height:420px; overflow:auto; }
.meeting-feed--large { min-height:240px; }
.meeting-feed-item { border:1px solid #dbe7ff; background:linear-gradient(180deg,#fff,#f8fbff); padding:14px 16px; border-radius:16px; }
.meeting-feed-item__meta { color:var(--muted); font-size:.82rem; margin-bottom:8px; }
.meeting-feed-original { font-weight:700; margin-bottom:8px; }
.meeting-feed-translated { color:#1d4ed8; }
.meeting-transcript-list { display:grid; gap:10px; max-height:720px; overflow:auto; }
.meeting-transcript-item { border:1px solid var(--line); border-radius:14px; padding:12px; background:#fff; }
.meeting-transcript-item__meta { color:var(--muted); font-size:.82rem; margin-bottom:6px; }
.meeting-manual-box { display:grid; gap:12px; }
.settings-grid { display:grid; grid-template-columns: 1.4fr 1fr; gap:20px; }
.settings-block-title { font-weight:900; font-size:1rem; color:#0f172a; padding-top:8px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 1000; display:grid; gap:10px; }
.toast { min-width: 260px; max-width: 420px; padding: 14px 16px; border-radius: 16px; color:#fff; box-shadow: 0 16px 36px rgba(15,23,42,.18); animation: toastIn .18s ease; }
.toast--success { background: linear-gradient(135deg,#059669,#10b981); }
.toast--error { background: linear-gradient(135deg,#dc2626,#ef4444); }
@keyframes toastIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (max-width: 1280px) { .meeting-layout { grid-template-columns: 1fr; } .meeting-side, .meeting-right { position: static; } }
@media (max-width: 960px) { .v6-workspace, .settings-grid, .admin-panels, .success-grid, .admin-stats, .detail-grid, .form-grid, .meeting-stage__tiles { grid-template-columns: 1fr; } .topbar__inner { flex-direction:column; align-items:flex-start; } .topbar__nav-block { align-items:flex-start; width:100%; } .v6-sidebar { position: static; max-height:none; } }

/* V6.1 advanced WhatsApp desk */
.desk-hero { display:grid; grid-template-columns: 1.2fr 1fr auto; gap:18px; align-items:center; }
.desk-hero h1 { margin:0 0 8px; }
.desk-kpis { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:10px; }
.desk-kpi { padding:14px; border-radius:18px; border:1px solid #dbe7ff; background:linear-gradient(180deg,#fff,#f8fbff); }
.desk-kpi span { color:var(--muted); font-size:.84rem; display:block; }
.desk-kpi strong { font-size:1.35rem; }
.desk-filter-grid { display:grid; grid-template-columns: 1fr 280px auto; gap:16px; align-items:end; }
.desk-workspace-v61 { display:grid; grid-template-columns: 390px minmax(0, 1fr); gap:20px; align-items:start; }
.desk-left-panel { position:sticky; top:112px; max-height:calc(100vh - 132px); overflow:hidden; display:flex; flex-direction:column; }
.desk-batch-box { display:grid; gap:10px; padding:14px; margin-bottom:14px; border:1px solid #cfe0ff; border-radius:18px; background:linear-gradient(180deg,#f8fbff,#eff6ff); }
.desk-batch-box__title { font-weight:900; }
.desk-list-tools { display:flex; align-items:center; justify-content:space-between; margin:8px 0 12px; }
.desk-record-list-v61 { overflow:auto; max-height:calc(100vh - 430px); padding-right:4px; }
.desk-record-row { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; align-items:center; margin-bottom:10px; }
.desk-record-check { width:18px; height:18px; }
.desk-record-card-v61 { display:block; padding:14px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(180deg,#fff,#f8fbff); transition:.18s ease; }
.desk-record-row.is-active .desk-record-card-v61, .desk-record-card-v61:hover { border-color:#7aa2ff; box-shadow:0 12px 28px rgba(37,99,235,.14); transform:translateY(-1px); }
.desk-record-card-v61__top { display:flex; justify-content:space-between; gap:8px; align-items:center; margin-bottom:8px; }
.desk-record-card-v61__meta { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:.86rem; margin-top:8px; }
.desk-main-v61 { display:grid; gap:20px; }
.desk-two-column { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:20px; align-items:start; }
.desk-profile-card { border-top:4px solid #2563eb; }
.account-inherit-panel { border-top:4px solid #f59e0b; }

/* V6.1 professional meeting room */
.meeting-pro-shell { display:grid; gap:18px; }
.meeting-pro-top { display:flex; justify-content:space-between; gap:18px; align-items:center; }
.meeting-pro-top h1 { margin:0 0 8px; }
.meeting-pro-top__actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.meeting-pro-layout { display:grid; grid-template-columns:310px minmax(0, 1fr) 360px; gap:18px; align-items:start; }
.meeting-pro-sidebar, .meeting-pro-right { position:sticky; top:112px; max-height:calc(100vh - 132px); overflow:auto; }
.meeting-pro-main { display:grid; gap:18px; min-width:0; }
.meeting-room-status { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid #dbe7ff; border-radius:18px; background:linear-gradient(180deg,#fff,#f8fbff); margin-bottom:14px; }
.meeting-room-status__dot { width:12px; height:12px; border-radius:50%; background:#94a3b8; box-shadow:0 0 0 6px rgba(148,163,184,.12); }
.meeting-room-status__dot.is-online { background:#10b981; box-shadow:0 0 0 6px rgba(16,185,129,.15); }
.meeting-control-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
.meeting-control-grid--wide { grid-template-columns:1fr; }
.host-control-box, .meeting-lang-box { display:grid; gap:10px; padding:14px; border:1px solid #dbe7ff; background:#f8fbff; border-radius:18px; margin-bottom:14px; }
.host-control-box__title { font-weight:900; }
.meeting-side-heading { margin-top:8px; }
.meeting-participant-list { display:grid; gap:10px; }
.meeting-participant-row { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.meeting-participant-row.is-self { border-color:#93c5fd; background:linear-gradient(180deg,#eff6ff,#fff); }
.meeting-participant-row.is-host .meeting-avatar { background:linear-gradient(135deg,#f59e0b,#ef4444); }
.meeting-participant-row.is-hand { border-color:#f59e0b; }
.meeting-participant-row__body { flex:1; min-width:0; }
.meeting-status-tags { display:flex; flex-wrap:wrap; gap:6px; color:var(--muted); font-size:.82rem; margin-top:4px; }
.host-inline-actions { display:flex; flex-wrap:wrap; gap:4px; justify-content:flex-end; max-width:110px; }
.host-inline-actions button { border:1px solid #dbe3ef; background:#fff; border-radius:999px; font-size:.72rem; padding:4px 7px; cursor:pointer; }
.meeting-video-stage { min-height:420px; }
.meeting-video-stage__head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:14px; }
.meeting-stage-badges { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.meeting-video-grid { display:grid; grid-template-columns:repeat(2, minmax(240px, 1fr)); gap:14px; }
.meeting-video-card { position:relative; min-height:260px; overflow:hidden; border-radius:24px; background:radial-gradient(circle at top left,#203d8f,#0f172a 65%); color:#fff; box-shadow:0 18px 38px rgba(15,23,42,.18); }
.meeting-video-card--local { min-height:340px; grid-column:span 2; }
.meeting-video-card video { width:100%; height:100%; min-height:inherit; object-fit:cover; display:block; background:#0f172a; }
.meeting-video-card__fallback { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:3rem; font-weight:900; background:radial-gradient(circle at center,#294aa5,#0f172a 70%); }
.meeting-video-card__name, .meeting-video-card__status { position:absolute; left:14px; padding:8px 12px; border-radius:999px; background:rgba(15,23,42,.58); backdrop-filter: blur(8px); }
.meeting-video-card__name { bottom:14px; font-weight:800; }
.meeting-video-card__status { top:14px; font-size:.82rem; }
.meeting-video-card.is-spotlight { outline:4px solid #f59e0b; }
.meeting-caption-split { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.caption-panel { min-height:320px; }
.caption-panel--translated { border-top:4px solid #2563eb; }
.caption-feed { display:flex; flex-direction:column; gap:12px; max-height:420px; overflow:auto; }
.caption-item { padding:14px; border:1px solid #dbe7ff; border-radius:16px; background:linear-gradient(180deg,#fff,#f8fbff); line-height:1.65; }
.caption-item--translated { background:linear-gradient(180deg,#eff6ff,#fff); color:#1d4ed8; font-weight:700; }
.caption-item__meta { color:var(--muted); font-size:.82rem; font-weight:600; margin-bottom:6px; }
.meeting-chat-feed { display:grid; gap:10px; max-height:220px; overflow:auto; }
.meeting-chat-item { border:1px solid var(--line); border-radius:14px; padding:10px 12px; background:#fff; }
.meeting-chat-send { display:grid; grid-template-columns:1fr auto; gap:8px; margin-top:10px; }
@media (max-width: 1380px) { .meeting-pro-layout { grid-template-columns:1fr; } .meeting-pro-sidebar, .meeting-pro-right, .desk-left-panel { position:static; max-height:none; } .desk-workspace-v61 { grid-template-columns:1fr; } .desk-record-list-v61 { max-height:none; } }
@media (max-width: 900px) { .desk-hero, .desk-filter-grid, .desk-two-column, .meeting-caption-split, .meeting-video-grid, .desk-kpis { grid-template-columns:1fr; } .meeting-video-card--local { grid-column:span 1; } .meeting-pro-top { flex-direction:column; align-items:flex-start; } }

/* V6.1.1 polish: beautiful admin shell + usable scrolling desk */
:root {
  --bg: #eef4ff;
  --surface: rgba(255,255,255,.96);
  --surface-alt: #f6f9ff;
  --line: #d8e4f7;
  --text: #06142f;
  --muted: #60708d;
  --primary: #2f6df6;
  --primary-2: #7c3aed;
  --primary-soft: #eaf1ff;
  --shadow: 0 20px 50px rgba(21, 50, 110, .10);
  --radius: 22px;
}
body {
  background:
    radial-gradient(circle at 8% -8%, rgba(47,109,246,.22), transparent 34%),
    radial-gradient(circle at 92% 2%, rgba(124,58,237,.16), transparent 30%),
    linear-gradient(180deg,#eef4ff 0%,#f8fbff 360px,#f5f7fb 100%);
}
.container { width: min(1580px, calc(100vw - 36px)); }
.main-container { padding-top: 26px; }
.topbar {
  background: linear-gradient(130deg, rgba(7,26,72,.98), rgba(13,37,93,.98) 45%, rgba(35,70,150,.96));
  border-bottom: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 48px rgba(5, 16, 46, .24);
}
.topbar__inner { padding: 18px 0 16px; }
.brand { font-size: 1.28rem; letter-spacing: .01em; }
.subtitle { color: rgba(255,255,255,.76); }
.topnav__link, .lang-pill {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.topnav__link:hover, .topnav__link.is-active, .lang-pill.is-active {
  background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.12));
  transform: translateY(-1px);
}
.panel, .hero-card, .detail-card, .login-card, .success-card {
  background: var(--surface);
  border: 1px solid rgba(216,228,247,.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.panel__head h1, .panel__head h2, h1, h2 { letter-spacing: -.025em; }
.btn { border-radius: 14px; box-shadow: 0 8px 20px rgba(15,23,42,.05); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  box-shadow: 0 14px 28px rgba(47,109,246,.22);
}
.btn-wa {
  background: linear-gradient(135deg, #10b981, #16a34a) !important;
  box-shadow: 0 14px 28px rgba(16,185,129,.22) !important;
}
.input, .textarea, select.input {
  border-color: #d6e2f4;
  background: linear-gradient(180deg,#fff,#fbfdff);
  border-radius: 15px;
}
.input:focus, .textarea:focus, select.input:focus { box-shadow: 0 0 0 5px rgba(47,109,246,.13); }
.desk-hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(440px, .9fr) auto;
  padding: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,246,255,.94));
}
.desk-kpi { border-radius: 20px; background: linear-gradient(180deg,#fff,#f3f7ff); }
.desk-workspace-v61 { grid-template-columns: 430px minmax(0, 1fr); gap: 24px; }
.desk-left-panel {
  position: sticky;
  top: 126px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  padding-right: 18px;
  scrollbar-gutter: stable;
}
#desk-batch-form { display: block; min-height: 0; }
.desk-record-list-v61 {
  overflow: visible;
  max-height: none;
  padding: 0 2px 18px 0;
}
.desk-record-row { align-items: stretch; }
.desk-record-card-v61 {
  border-radius: 20px;
  border-color: #d8e4f7;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.98));
  box-shadow: 0 10px 24px rgba(21,50,110,.05);
}
.desk-record-row.is-active .desk-record-card-v61,
.desk-record-card-v61:hover {
  border-color: rgba(47,109,246,.62);
  box-shadow: 0 18px 34px rgba(47,109,246,.16);
}
.desk-profile-card { border-top: 0; position: relative; overflow: hidden; }
.desk-profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg,#2f6df6,#7c3aed,#10b981);
}
.desk-profile-actions { justify-content: flex-end; }
.desk-two-column { grid-template-columns: minmax(0,1fr) 420px; }
.inbound-log-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #c8d6ee;
}
.admin-feedback-hero {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:28px;
}
.admin-feedback-success { border-left: 5px solid #10b981; }
.admin-feedback-card { max-width: 1120px; margin-inline: auto; }
.admin-feedback-form .extra-field { display:none; }
.admin-feedback-form .extra-field.is-visible { display:block; }
.table-wrap--card, .table-wrap { border-radius: 18px; }
.data-table th { background: linear-gradient(180deg,#f6f9ff,#eef4ff); color:#42526e; }
.data-table tbody tr:hover { background: rgba(47,109,246,.035); }
@media (max-width: 1380px) {
  .desk-left-panel { position: static; max-height: none; overflow: visible; }
  .desk-workspace-v61, .desk-hero, .desk-two-column { grid-template-columns: 1fr; }
}


/* V6.1.2 aesthetics */
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); }
.topbar__nav-block { gap: 12px; transition: all .22s ease; }
.topbar-toggle { align-self: flex-end; padding: 8px 14px; border-radius: 999px; border:1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color:#fff; cursor:pointer; }
.topbar__nav-block.is-collapsed .topnav, .topbar__nav-block.is-collapsed .lang-switch { display:none; }
.topbar__nav-block.is-collapsed { padding-bottom: 4px; }
.topnav { max-width: 1080px; justify-content:flex-end; }
.main-content { padding-top: 26px; }
.panel { border-radius: 22px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.input, .textarea, select.input { border-radius: 16px; background: #fbfdff; }
.btn { border-radius: 16px; font-weight: 800; }
.btn-primary { background: linear-gradient(135deg,#2563eb,#3b82f6); box-shadow: 0 14px 26px rgba(37,99,235,.22); }
.btn-secondary { background:#fff; }
.v6-record-card { background: linear-gradient(180deg,#ffffff 0%,#f5f9ff 100%); }
.v6-record-card .table-primary { font-size: 1.08rem; }
.v6-record-card .table-secondary { color:#64748b; }
.v6-main .panel { background: linear-gradient(180deg,#ffffff 0%,#fbfdff 100%); }
.desk-two-column { display:grid; grid-template-columns: 1.2fr .8fr; gap:18px; }
.status-pill { box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.notice { border-radius: 16px; }
@media (max-width: 960px){ .desk-two-column { grid-template-columns: 1fr; } .topbar-toggle { align-self:flex-start; } }

/* V6.2 executive business polish + one-window WhatsApp workflow */
:root {
  --executive-bg: #f4f7fb;
  --executive-ink: #07162f;
  --executive-muted: #5e6f8d;
  --executive-line: #d9e3f2;
  --executive-navy: #081b3e;
  --executive-blue: #2563eb;
  --executive-green: #10b981;
}
body.admin-shell {
  color: var(--executive-ink);
  background:
    radial-gradient(circle at 15% -10%, rgba(37,99,235,.14), transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(16,185,129,.10), transparent 28%),
    linear-gradient(180deg, #eef4fb 0%, var(--executive-bg) 340px, #f8fafc 100%);
}
.topbar {
  background:
    radial-gradient(circle at 90% 0%, rgba(59,130,246,.25), transparent 34%),
    linear-gradient(135deg, #06142f 0%, #0a2555 58%, #123a7b 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.topbar__inner {
  min-height: 104px;
  padding: 16px 0 15px;
  gap: 24px;
}
.brand-block { padding-top: 4px; }
.brand { font-size: 1.32rem; font-weight: 900; letter-spacing: -.02em; }
.subtitle { font-weight: 650; opacity: .86; }
.topnav { gap: 9px; max-width: 1120px; }
.topnav__link,
.lang-pill,
.topbar-toggle {
  border-radius: 999px;
  background: rgba(255,255,255,.095);
  border: 1px solid rgba(255,255,255,.145);
  color: rgba(255,255,255,.90);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 20px rgba(0,0,0,.08);
}
.topnav__link { padding: 9px 15px; font-weight: 750; }
.lang-pill { padding: 8px 14px; font-weight: 750; }
.topnav__link:hover,
.topnav__link.is-active,
.lang-pill.is-active {
  background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,.13));
  border-color: rgba(255,255,255,.32);
  transform: translateY(-1px);
}
.topbar__nav-block.is-collapsed .lang-switcher { display: none; }
.main-container { padding-top: 22px; }
.panel,
.hero-card,
.detail-card,
.login-card,
.success-card {
  border-color: rgba(217,227,242,.96);
  box-shadow: 0 18px 46px rgba(17, 34, 73, .085);
}
.panel { background: rgba(255,255,255,.965); }
.label { color: #4c5f7c; font-weight: 780; }
.input,
.textarea,
select.input {
  border-color: #d7e2f1;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  color: var(--executive-ink);
}
.btn {
  min-height: 44px;
  letter-spacing: -.01em;
  box-shadow: 0 10px 22px rgba(17,34,73,.07);
}
.btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb 58%, #3b82f6);
  box-shadow: 0 16px 32px rgba(37,99,235,.22);
}
.btn-secondary:hover { border-color: #b8c9e3; background: #f8fbff; }
.btn-wa {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  box-shadow: 0 16px 32px rgba(16,185,129,.22) !important;
}
.desk-hero {
  border: 1px solid rgba(217,227,242,.96);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(243,248,255,.96)),
    radial-gradient(circle at 96% 0%, rgba(37,99,235,.12), transparent 30%);
}
.desk-hero h1 { font-size: 1.55rem; }
.desk-kpis { align-items: stretch; }
.desk-kpi {
  min-height: 82px;
  border: 1px solid #dbe7f8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 12px 26px rgba(17,34,73,.045);
}
.desk-kpi span { color: var(--executive-muted); font-weight: 760; }
.desk-kpi strong { color: var(--executive-ink); }
.desk-left-panel {
  background: rgba(255,255,255,.94);
  border-radius: 24px;
}
.desk-batch-box {
  border: 1px solid #dbe7f8;
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74);
}
.desk-record-card-v61 {
  position: relative;
  overflow: hidden;
  border-color: #dbe6f5;
}
.desk-record-card-v61::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
}
.desk-record-row.is-active .desk-record-card-v61::before,
.desk-record-card-v61:hover::before { background: linear-gradient(180deg, var(--executive-blue), var(--executive-green)); }
.desk-record-card-v61__top strong { font-size: 1.02rem; letter-spacing: -.015em; }
.badge {
  background: #edf4ff;
  color: #1d4ed8;
  border: 1px solid #d3e4ff;
}
.desk-profile-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,253,255,.98));
}
.desk-profile-card::before {
  height: 6px;
  background: linear-gradient(90deg, #1d4ed8, #2563eb 45%, #10b981);
}
.desk-profile-actions {
  margin-top: 0;
  row-gap: 8px;
}
.desk-action-hint {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  font-size: .84rem;
  font-weight: 760;
}
.desk-two-column > .panel,
.desk-main-v61 > .panel { border-radius: 24px; }
.table-wrap--card { border-color: #dbe7f8; }
.data-table th { font-weight: 850; }
.data-table td { line-height: 1.55; }
.notice { line-height: 1.65; }
@media (max-width: 1380px) {
  .topbar__inner { min-height: unset; }
}
@media (max-width: 900px) {
  .topnav { max-width: 100%; }
  .desk-profile-actions { justify-content: flex-start; }
  .desk-action-hint { width: 100%; justify-content: center; }
}

/* V6.3 executive navigation cleanup + multilingual header */
.admin-shell .container { width: min(1560px, calc(100vw - 24px)); }
.topbar__inner {
  align-items: flex-start;
}
.topbar__nav-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  width: 100%;
}
.topbar-toggle {
  appearance: none;
  cursor: pointer;
  min-height: 38px;
  padding: 8px 14px;
  font-weight: 820;
}
.topbar__nav-block.is-collapsed .topnav,
.topbar__nav-block.is-collapsed .lang-menu { display: none; }
.topnav--grouped {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 100%;
  width: 100%;
  flex-wrap: wrap;
}
.nav-group,
.lang-menu { position: relative; }
.nav-group > summary,
.lang-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 850;
  color: rgba(255,255,255,.94);
  background: rgba(255,255,255,.105);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 10px 24px rgba(0,0,0,.10);
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.nav-group > summary::-webkit-details-marker,
.lang-menu > summary::-webkit-details-marker { display:none; }
.nav-group > summary::after,
.lang-menu > summary::after {
  content: "⌄";
  font-size: .9rem;
  opacity: .72;
  transform: translateY(-1px);
}
.nav-group[open] > summary,
.nav-group > summary:hover,
.lang-menu[open] > summary,
.lang-menu > summary:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,.13));
  border-color: rgba(255,255,255,.32);
  transform: translateY(-1px);
}
.nav-group__menu,
.lang-menu__dropdown {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 60;
  min-width: 238px;
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(8, 27, 62, .96);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 60px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}
.lang-menu__dropdown { min-width: 190px; max-height: 420px; overflow:auto; }
.nav-group__menu .topnav__link,
.lang-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 13px;
  color: rgba(255,255,255,.90);
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  font-weight: 780;
  white-space: nowrap;
}
.nav-group__menu .topnav__link:hover,
.nav-group__menu .topnav__link.is-active,
.lang-menu__item:hover,
.lang-menu__item.is-active {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}
.lang-menu__icon { filter: saturate(1.1); }
.lang-menu__current { max-width: 130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body[dir="rtl"] .topbar__nav-block { align-items: flex-start; }
body[dir="rtl"] .topbar-tools { justify-content: flex-start; }
body[dir="rtl"] .nav-group__menu,
body[dir="rtl"] .lang-menu__dropdown { inset-inline-start: 0; inset-inline-end: auto; }
@media (max-width: 980px) {
  .topbar__inner { flex-direction: column; align-items: stretch; }
  .topbar__nav-block { align-items: stretch; }
  .topbar-tools, .topnav--grouped { justify-content: flex-start; }
  .nav-group__menu, .lang-menu__dropdown { inset-inline-start: 0; inset-inline-end: auto; }
}
@media (max-width: 640px) {
  .admin-shell .container, .container { width: min(100% - 20px, 1560px); }
  .topnav--grouped { display: grid; grid-template-columns: 1fr 1fr; }
  .nav-group > summary { width: 100%; }
  .nav-group__menu, .lang-menu__dropdown { position: fixed; inset: auto 10px 12px 10px; max-height: 60vh; overflow:auto; }
}

/* V6.3 prettier panel/table rhythm */
.panel,
.detail-card,
.hero-card {
  border-radius: 22px;
}
.panel__head h1,
.panel__head h2,
.section-head h1,
.section-head h2 { letter-spacing: -.025em; }
.table-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e2eaf6;
  background: #fff;
}
.data-table thead th {
  background: linear-gradient(180deg, #f8fbff, #f1f6fd);
  color: #41536f;
  font-weight: 850;
}
.data-table tbody tr:hover { background: #f8fbff; }
.filter-grid,
.form-grid { gap: 18px; }
.btn-danger { background: linear-gradient(135deg, #b91c1c, #dc2626); color: #fff; box-shadow: 0 16px 32px rgba(220,38,38,.20); }
.btn-danger:hover { filter: brightness(1.02); transform: translateY(-1px); }
.action-row--compact { gap: 6px; flex-wrap: nowrap; }
.action-row--compact .btn { white-space: nowrap; }


/* V6.4 executive polish: fixed dropdown layering, cleaner admin surface, large-team usability */
:root {
  --v64-bg-1: #eef5ff;
  --v64-bg-2: #f8fbff;
  --v64-ink: #06142f;
  --v64-muted: #637493;
  --v64-line: #d9e6f7;
  --v64-card: rgba(255,255,255,.96);
  --v64-card-solid: #ffffff;
  --v64-blue: #2563eb;
  --v64-blue-2: #4f46e5;
  --v64-green: #10b981;
  --v64-shadow: 0 18px 48px rgba(21, 50, 110, .10);
  --v64-shadow-soft: 0 10px 28px rgba(21, 50, 110, .07);
}
html { scroll-padding-top: 150px; }
body.admin-shell {
  color: var(--v64-ink);
  background:
    radial-gradient(circle at 7% -8%, rgba(37,99,235,.18), transparent 34%),
    radial-gradient(circle at 96% 1%, rgba(16,185,129,.12), transparent 30%),
    linear-gradient(180deg, var(--v64-bg-1) 0%, var(--v64-bg-2) 330px, #f7f9fc 100%);
}
.topbar {
  position: sticky !important;
  top: 0;
  z-index: 5000 !important;
  overflow: visible !important;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% -25%, rgba(86,145,255,.32), transparent 38%),
    linear-gradient(135deg, #06142f 0%, #082458 58%, #123d86 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 20px 48px rgba(5,16,46,.24);
  backdrop-filter: blur(16px);
}
.topbar__glow { z-index: 0; opacity: .82; }
.topbar__inner {
  position: relative;
  z-index: 2;
  overflow: visible !important;
  display: grid !important;
  grid-template-columns: minmax(250px, .8fr) minmax(720px, 1.9fr);
  align-items: start !important;
  gap: 18px 26px !important;
  min-height: 126px;
  padding: 18px 0 18px !important;
}
.brand-block { min-width: 0; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.32rem !important;
  font-weight: 920 !important;
  letter-spacing: -.025em !important;
}
.brand::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #34d399);
  box-shadow: 0 0 0 6px rgba(96,165,250,.12), 0 0 28px rgba(52,211,153,.38);
}
.subtitle {
  color: rgba(255,255,255,.78) !important;
  font-weight: 700;
  letter-spacing: -.01em;
}
.topbar__nav-block {
  position: relative;
  z-index: 4;
  display: grid !important;
  grid-template-areas: "tools" "nav";
  justify-items: end;
  align-items: start;
  gap: 14px !important;
  min-width: 0;
  overflow: visible !important;
}
.topbar-tools {
  grid-area: tools;
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end !important;
  gap: 10px !important;
  overflow: visible !important;
}
.topbar-toggle,
.lang-menu > summary,
.nav-group > summary {
  min-height: 46px !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  color: rgba(255,255,255,.95) !important;
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 12px 26px rgba(0,0,0,.10) !important;
  font-weight: 880 !important;
  line-height: 1.15 !important;
  letter-spacing: -.015em;
}
.topbar-toggle:hover,
.lang-menu > summary:hover,
.nav-group > summary:hover,
.lang-menu[open] > summary,
.nav-group[open] > summary {
  background: linear-gradient(180deg, rgba(255,255,255,.27), rgba(255,255,255,.13)) !important;
  border-color: rgba(255,255,255,.34) !important;
  transform: translateY(-1px);
}
.topnav--grouped {
  grid-area: nav;
  width: auto !important;
  max-width: min(100%, 1120px) !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  overflow: visible !important;
  padding: 0 !important;
}
.nav-group,
.lang-menu {
  position: relative !important;
  z-index: 5100;
  overflow: visible !important;
}
.nav-group[open],
.lang-menu[open] { z-index: 5300; }
.nav-group__menu,
.lang-menu__dropdown {
  position: absolute !important;
  inset-block-start: calc(100% + 12px) !important;
  inset-inline-end: 0 !important;
  z-index: 5400 !important;
  min-width: 255px;
  max-width: min(360px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(12,31,70,.98), rgba(7,21,50,.98));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 28px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  overflow: visible;
}
.lang-menu__dropdown {
  min-width: 230px;
  max-height: min(520px, calc(100vh - 120px));
  overflow-y: auto !important;
  scrollbar-gutter: stable;
}
.nav-group__menu::before,
.lang-menu__dropdown::before {
  content: "";
  position: absolute;
  inset-block-start: -7px;
  inset-inline-end: 28px;
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  background: rgba(12,31,70,.98);
  border-left: 1px solid rgba(255,255,255,.12);
  border-top: 1px solid rgba(255,255,255,.12);
}
.nav-group__menu .topnav__link,
.lang-menu__item {
  position: relative;
  z-index: 1;
  min-height: 42px;
  padding: 11px 13px;
  border-radius: 14px;
  color: rgba(255,255,255,.92) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  font-weight: 820;
  white-space: nowrap;
}
.nav-group__menu .topnav__link:hover,
.nav-group__menu .topnav__link.is-active,
.lang-menu__item:hover,
.lang-menu__item.is-active {
  background: rgba(255,255,255,.13) !important;
  border-color: rgba(255,255,255,.16) !important;
  color: #fff !important;
}
.lang-menu__item.is-active::after,
.nav-group__menu .topnav__link.is-active::after {
  content: "✓";
  opacity: .88;
  font-weight: 900;
  margin-inline-start: 14px;
}
.topbar__nav-block.is-collapsed .topnav,
.topbar__nav-block.is-collapsed .lang-menu { display: none !important; }
.main-container { position: relative; z-index: 1; padding-top: 28px !important; }
.admin-shell .detail-card,
.admin-shell .panel,
.admin-shell .login-card,
.admin-shell .success-card,
.admin-shell .hero-card {
  background: var(--v64-card);
  border: 1px solid rgba(217,230,247,.96) !important;
  box-shadow: var(--v64-shadow) !important;
  border-radius: 28px !important;
}
.admin-shell .detail-card--plain {
  position: relative;
  overflow: hidden;
  padding: 30px 30px 28px !important;
  border: 1px solid rgba(211,225,246,.96) !important;
  background:
    radial-gradient(circle at 96% 0%, rgba(37,99,235,.13), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.97)) !important;
}
.admin-shell .detail-card--plain::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #4f46e5 48%, #10b981);
}
.admin-shell h1 {
  font-size: clamp(1.75rem, 1.28rem + 1.2vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.admin-shell h2 { letter-spacing: -.035em; }
.admin-shell .muted { color: var(--v64-muted); }
.admin-stats,
.success-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
  gap: 16px !important;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 105px;
  padding: 22px 24px !important;
  border-radius: 20px !important;
  border: 1px solid var(--v64-line) !important;
  background: linear-gradient(180deg, #fff, #f7fbff) !important;
  box-shadow: var(--v64-shadow-soft);
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -38px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.12), transparent 68%);
}
.stat-card__label { font-weight: 780; color: var(--v64-muted) !important; }
.stat-card__value { font-size: 1.62rem !important; font-weight: 940 !important; letter-spacing: -.035em; }
.admin-panels,
.admin-panels--wide {
  gap: 24px !important;
  align-items: start;
}
.panel { padding: 26px !important; }
.panel__head {
  gap: 16px;
  margin-bottom: 18px;
  align-items: flex-start !important;
}
.btn {
  border-radius: 15px !important;
  min-height: 44px;
  padding: 11px 18px !important;
  font-weight: 840 !important;
  letter-spacing: -.015em;
  box-shadow: 0 10px 22px rgba(17,34,73,.06);
}
.btn-sm { min-height: 36px !important; padding: 7px 12px !important; font-size: .88rem !important; }
.btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb 58%, #3b82f6) !important;
  color: #fff !important;
  box-shadow: 0 16px 30px rgba(37,99,235,.22) !important;
}
.btn-secondary {
  background: linear-gradient(180deg,#fff,#f8fbff) !important;
  border-color: var(--v64-line) !important;
}
.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  color: white !important;
  border-color: transparent !important;
}
.input, .textarea, select.input {
  border-color: #d6e2f4 !important;
  background: linear-gradient(180deg, #fff, #fbfdff) !important;
  border-radius: 16px !important;
}
.table-wrap {
  border-radius: 20px !important;
  border: 1px solid #dce8f7 !important;
  box-shadow: 0 8px 22px rgba(21,50,110,.04);
}
.data-table th {
  background: linear-gradient(180deg, #f6f9ff, #edf4ff) !important;
  color: #34476a;
  font-weight: 900 !important;
}
.data-table td { border-color: #e7eef8 !important; }
.data-table tbody tr:hover { background: #f8fbff; }
.filter-grid,
.form-grid { gap: 18px !important; }
.action-row--compact { gap: 8px !important; margin: 0 !important; }
body[dir="rtl"] .topbar__inner { grid-template-columns: minmax(720px, 1.9fr) minmax(250px, .8fr); }
body[dir="rtl"] .topbar__nav-block { justify-items: start; }
body[dir="rtl"] .topbar-tools { justify-content: flex-start !important; }
body[dir="rtl"] .topnav--grouped { justify-content: flex-start !important; }
body[dir="rtl"] .nav-group__menu,
body[dir="rtl"] .lang-menu__dropdown {
  inset-inline-start: 0 !important;
  inset-inline-end: auto !important;
}
body[dir="rtl"] .nav-group__menu::before,
body[dir="rtl"] .lang-menu__dropdown::before {
  inset-inline-start: 28px;
  inset-inline-end: auto;
}
@media (max-width: 1180px) {
  .topbar__inner {
    grid-template-columns: 1fr !important;
    min-height: unset;
  }
  body[dir="rtl"] .topbar__inner { grid-template-columns: 1fr !important; }
  .topbar__nav-block { justify-items: stretch; }
  .topbar-tools { justify-content: flex-start !important; }
  .topnav--grouped { justify-content: flex-start !important; }
  .nav-group__menu,
  .lang-menu__dropdown {
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
  }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 110px; }
  .container, .admin-shell .container { width: min(100% - 20px, 1560px) !important; }
  .topbar__inner { padding: 13px 0 !important; }
  .brand { font-size: 1.08rem !important; }
  .topbar-tools { width: 100% !important; }
  .topbar-toggle, .lang-menu > summary { flex: 1 1 auto; }
  .topnav--grouped { display: grid !important; grid-template-columns: 1fr; width: 100% !important; }
  .nav-group > summary { width: 100%; justify-content: space-between !important; }
  .nav-group__menu,
  .lang-menu__dropdown {
    position: fixed !important;
    inset: auto 10px 14px 10px !important;
    max-width: none !important;
    max-height: min(68vh, 560px) !important;
    overflow-y: auto !important;
  }
  .nav-group__menu::before,
  .lang-menu__dropdown::before { display:none; }
  .panel, .admin-shell .detail-card--plain { padding: 20px !important; border-radius: 22px !important; }
  .panel__head { flex-direction: column; }
}

/* V6.4 active group indicator without forcing dropdowns open on page load */
.nav-group.is-current-group > summary {
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.15)) !important;
  border-color: rgba(255,255,255,.38) !important;
}
.nav-group.is-current-group > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 14px rgba(52,211,153,.74);
}

/* V6.5 enterprise layout correction: no whole-page horizontal drift, local scrolling only */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
*, *::before, *::after { box-sizing: border-box; }
body.admin-shell {
  background:
    radial-gradient(circle at 16% -8%, rgba(45,102,230,.14), transparent 34%),
    radial-gradient(circle at 92% 7%, rgba(16,185,129,.10), transparent 30%),
    linear-gradient(180deg, #eef5ff 0%, #f7fbff 42%, #ffffff 100%) !important;
}
.admin-shell .container,
.container,
.main-container,
.topbar,
.topbar__inner,
.panel,
.detail-card,
.table-wrap,
.desk-workspace-v61,
.desk-main-v61,
.desk-left-panel,
.desk-two-column,
.form-grid,
.filter-grid,
.admin-panels,
.stats-panel-v65,
.stats-hero-v65 {
  min-width: 0 !important;
  max-width: 100% !important;
}
.admin-shell .container,
.container {
  width: min(100% - 28px, 1680px) !important;
}
.topbar {
  overflow: visible !important;
  isolation: isolate;
  box-shadow: 0 16px 42px rgba(10,31,72,.18);
}
.topbar__inner {
  width: min(100% - 20px, 1680px) !important;
  margin-inline: auto;
}
.topbar__nav-block,
.topnav--grouped,
.topbar-tools {
  max-width: 100% !important;
  min-width: 0 !important;
  flex-wrap: wrap !important;
}
.nav-group,
.lang-menu { max-width: 100%; }
.nav-group__menu,
.lang-menu__dropdown {
  z-index: 5000 !important;
}
.table-wrap,
.table-wrap--card {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.table-wrap::-webkit-scrollbar,
.desk-left-panel::-webkit-scrollbar,
.desk-record-list-v61::-webkit-scrollbar { height: 10px; width: 10px; }
.table-wrap::-webkit-scrollbar-thumb,
.desk-left-panel::-webkit-scrollbar-thumb,
.desk-record-list-v61::-webkit-scrollbar-thumb {
  background: rgba(77,112,166,.38);
  border-radius: 999px;
}
.table-wrap::-webkit-scrollbar-track,
.desk-left-panel::-webkit-scrollbar-track,
.desk-record-list-v61::-webkit-scrollbar-track { background: rgba(226,235,248,.72); border-radius: 999px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table--phones { min-width: 1180px; }
.data-table--analytics { min-width: 1040px; }
.data-table th,
.data-table td { vertical-align: middle; }
.table-actions,
.action-row,
.desk-profile-actions,
.meeting-pro-top__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}
.table-actions--compact .btn,
.desk-profile-actions .btn { white-space: nowrap; }
.desk-workspace-v61 {
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr) !important;
  gap: 20px !important;
  overflow: visible !important;
}
.desk-main-v61,
.desk-left-panel,
.desk-profile-card,
.desk-two-column > * { min-width: 0 !important; }
.desk-left-panel {
  padding-right: 10px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.desk-record-card-v61,
.desk-record-card-v61 * { min-width: 0; }
.desk-record-card-v61__top,
.desk-record-card-v61__meta { flex-wrap: wrap; }
.desk-record-card-v61__top strong,
.table-primary,
.table-secondary,
.muted {
  overflow-wrap: anywhere;
}
.desk-main-v61 > .panel,
.desk-two-column > .panel,
.desk-profile-card {
  width: 100% !important;
}
.desk-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 620px) auto !important;
  overflow: hidden;
}
.desk-kpis { min-width: 0; }
.desk-kpi { min-width: 0; }
.desk-profile-actions {
  justify-content: flex-end;
  align-items: center;
}
.desk-action-hint {
  white-space: normal !important;
  max-width: 100%;
  text-align: center;
}
.desk-two-column {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px) !important;
  gap: 20px !important;
}
.form-grid,
.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}
.form-item--full { grid-column: 1 / -1; }
.input,
.textarea,
select.input {
  max-width: 100%;
  width: 100%;
}

/* V6.5 collapsible WhatsApp desk panels: reduce clutter without hiding context */
.collapsible-panel {
  position: relative;
  transition: box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.collapsible-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.collapsible-panel__head h2 { margin-bottom: 6px; }
.collapsible-panel__body {
  display: block;
  min-width: 0;
}
.collapsible-panel.is-collapsed .collapsible-panel__body {
  display: none !important;
}
.collapsible-panel.is-collapsed {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,255,.96)) !important;
}
.collapsible-panel.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 24px 0 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.22), transparent);
}
.collapsible-panel .btn[data-collapse-toggle] {
  min-height: 38px !important;
  padding: 8px 13px !important;
  box-shadow: none !important;
  white-space: nowrap;
}

/* V6.5 cleaned WhatsApp lifecycle badges */
.badge--wa-status {
  border-radius: 999px !important;
  padding: 6px 10px !important;
  font-weight: 880 !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.badge--new_not_contacted {
  color: #334155 !important;
  background: #f1f5f9 !important;
  border-color: #dbe4ee !important;
}
.badge--contacted_not_opened {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  border-color: #bfd7ff !important;
}
.badge--contacted_opened {
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}
.badge--invalid {
  color: #b91c1c !important;
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

/* V6.5 analytics polish */
.stats-hero-v65,
.stats-panel-v65 {
  background:
    radial-gradient(circle at 100% 0%, rgba(37,99,235,.10), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.97)) !important;
}
.stats-filter-v65 {
  align-items: end;
}
.stats-cards-v65 .stat-card {
  min-height: 118px;
}
.stats-cards-v65 .stat-card__value {
  font-size: 1.78rem !important;
}
.trend-badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 850;
}
.trend-badge--trend_up { color:#047857; background:#ecfdf5; border-color:#a7f3d0; }
.trend-badge--trend_down { color:#b91c1c; background:#fff1f2; border-color:#fecdd3; }
.trend-badge--trend_flat { color:#475569; background:#f8fafc; border-color:#e2e8f0; }

/* V6.5 calmer large-form pages */
.panel--soft,
.admin-shell .panel {
  border-color: rgba(210,225,246,.94) !important;
}
.panel__head--stacked p { max-width: 860px; }
.compact-form.form-grid {
  row-gap: 18px !important;
}
.label {
  color: #33486b !important;
  font-weight: 840 !important;
}
.input:hover,
.textarea:hover,
select.input:hover { border-color: #b9cef0 !important; }
.input:focus,
.textarea:focus,
select.input:focus {
  border-color: #7aa2ff !important;
  box-shadow: 0 0 0 5px rgba(37,99,235,.12) !important;
}

@media (max-width: 1480px) {
  .desk-workspace-v61 { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important; }
  .desk-two-column { grid-template-columns: 1fr !important; }
  .desk-hero { grid-template-columns: 1fr !important; }
  .desk-profile-actions { justify-content: flex-start; }
}
@media (max-width: 1180px) {
  .desk-workspace-v61 { grid-template-columns: 1fr !important; }
  .desk-left-panel { position: static !important; max-height: none !important; overflow: visible !important; padding-right: 0 !important; }
  .desk-record-list-v61 { max-height: none !important; overflow: visible !important; }
}
@media (max-width: 760px) {
  .admin-shell .container,
  .container { width: min(100% - 16px, 1680px) !important; }
  .data-table--phones { min-width: 980px; }
  .data-table--analytics { min-width: 920px; }
  .collapsible-panel__head { flex-direction: column; }
  .collapsible-panel .btn[data-collapse-toggle] { width: 100%; justify-content: center; }
}
/* V6.5 hotfix: decorative header glow must never create horizontal page width */
.topbar__glow {
  inset: auto 0 -36px auto !important;
  width: min(26vw, 260px) !important;
  height: min(26vw, 260px) !important;
  max-width: 100% !important;
}

/* V6.6 reliability and executive UI refresh */
.toast-stack { right: 24px !important; bottom: 28px !important; z-index: 9000 !important; }
.toast {
  min-width: min(420px, calc(100vw - 48px)) !important;
  max-width: min(520px, calc(100vw - 48px)) !important;
  color: #fff !important;
  font-weight: 820;
  line-height: 1.55;
  word-break: break-word;
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(14px);
}
.toast--warning { background: linear-gradient(135deg,#b45309,#f59e0b) !important; color:#fff !important; }
.toast--success { background: linear-gradient(135deg,#047857,#10b981) !important; }
.toast--error { background: linear-gradient(135deg,#b91c1c,#ef4444) !important; }
.btn-wa,
#btn-open-whatsapp-main {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #fff !important;
  box-shadow: 0 16px 30px rgba(16,185,129,.24) !important;
}
#btn-open-whatsapp-main:hover { transform: translateY(-1px); filter: brightness(1.03); }
#btn-open-whatsapp-app { border-color: #b9d0ef !important; }
.desk-profile-card.is-collapsed .desk-action-hint {
  background: rgba(236,253,245,.92);
  border-color: #a7f3d0;
  color: #047857;
}

.alert-grid-v66 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.alert-card-v66 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid #d9e6f7;
  background: linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow: 0 10px 26px rgba(21,50,110,.06);
}
.alert-card-v66__icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  font-weight: 950;
}
.alert-card-v66--warning .alert-card-v66__icon { background:#fff7ed; color:#b45309; }
.alert-card-v66--danger .alert-card-v66__icon { background:#fff1f2; color:#b91c1c; }
.alert-card-v66--info .alert-card-v66__icon { background:#eff6ff; color:#2563eb; }
.alert-card-v66--success .alert-card-v66__icon { background:#ecfdf5; color:#047857; }
.alert-card-v66__title { font-weight: 900; margin-bottom: 3px; letter-spacing:-.015em; }
.alert-card-v66__text { color: var(--v64-muted); font-size: .92rem; line-height: 1.55; }

.chart-grid-v66 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 18px;
}
.chart-card-v66 {
  border: 1px solid #d9e6f7;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow: 0 10px 28px rgba(21,50,110,.055);
}
.chart-card-v66 h3 { margin: 0 0 14px; letter-spacing:-.03em; }
.bar-list-v66 { display: grid; gap: 12px; }
.bar-row-v66 { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.bar-row-v66__label { font-weight: 820; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row-v66__track { height: 12px; border-radius: 999px; background: #e8eef8; overflow: hidden; }
.bar-row-v66__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg,#2563eb,#10b981); min-width: 3px; }
.bar-row-v66__value { font-weight: 900; color: #0f172a; }
.trend-chart-v66 { display: flex; align-items: end; gap: 10px; min-height: 160px; padding: 10px 4px 0; overflow-x: auto; }
.trend-col-v66 { min-width: 62px; display: grid; grid-template-rows: 1fr auto auto; gap: 7px; align-items: end; text-align: center; }
.trend-col-v66__bar { width: 100%; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg,#2563eb,#60a5fa); min-height: 5px; box-shadow: 0 10px 20px rgba(37,99,235,.18); }
.trend-col-v66__value { font-weight: 900; font-size: .92rem; }
.trend-col-v66__label { color: var(--v64-muted); font-size: .72rem; line-height: 1.2; }

.meeting-share-banner-v66 {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg,#eff6ff,#f8fbff);
  border: 1px solid #cfe0ff;
  color: #1e3a8a;
  font-weight: 760;
  line-height: 1.55;
}
.meeting-video-card.is-sharing-screen {
  border: 2px solid rgba(16,185,129,.72) !important;
  box-shadow: 0 20px 42px rgba(16,185,129,.20) !important;
}
.meeting-video-card.is-sharing-screen .meeting-video-card__status {
  background: rgba(16,185,129,.18);
  color: #ecfdf5;
}

@media (max-width: 980px) {
  .chart-grid-v66 { grid-template-columns: 1fr; }
  .bar-row-v66 { grid-template-columns: 1fr; gap: 6px; }
  .bar-row-v66__value { justify-self: start; }
}
.api-health-card-v66 {
  border-radius: 18px;
  padding: 15px 16px;
  border: 1px solid #d9e6f7;
  background: linear-gradient(180deg,#ffffff,#f8fbff);
}
.api-health-card-v66.is-ready { border-color: #a7f3d0; background: linear-gradient(180deg,#ecfdf5,#ffffff); }
.api-health-card-v66.is-missing { border-color: #fed7aa; background: linear-gradient(180deg,#fff7ed,#ffffff); }
.api-health-card-v66 p { margin: 6px 0 0; }

/* =========================================================
   V6.7 Premium Comfort Refresh
   Focus: calmer workspace, clearer WhatsApp actions, better readability.
   ========================================================= */
:root {
  --v67-ink: #0b1220;
  --v67-muted: #61708a;
  --v67-line: rgba(137, 155, 189, .30);
  --v67-card: rgba(255, 255, 255, .86);
  --v67-card-solid: #ffffff;
  --v67-primary: #2563eb;
  --v67-primary-2: #0ea5e9;
  --v67-green: #10b981;
  --v67-shadow: 0 24px 70px rgba(30, 64, 175, .12);
  --v67-shadow-soft: 0 14px 34px rgba(15, 23, 42, .08);
}

body {
  color: var(--v67-ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(96,165,250,.22), transparent 32%),
    radial-gradient(circle at 96% 10%, rgba(45,212,191,.18), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #eef5ff 42%, #f8fbff 100%);
}

.admin-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.42), transparent 62%);
  z-index: -1;
}

.container,
.admin-shell main.container {
  max-width: 1580px;
}

.topbar {
  border-bottom: 1px solid rgba(255,255,255,.20);
  background: linear-gradient(135deg, rgba(12, 24, 52, .96), rgba(20, 75, 150, .92));
  box-shadow: 0 20px 55px rgba(15,23,42,.20);
}

.topbar__glow {
  opacity: .92;
  filter: blur(10px);
}

.brand {
  letter-spacing: -.045em;
}

.topnav__link,
.nav-group > summary,
.topbar-toggle,
.lang-menu > summary {
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.panel,
.desk-filter-panel,
.desk-left-panel,
.desk-profile-card,
.collapsible-panel,
.chart-card-v66,
.api-health-card-v66 {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border: 1px solid var(--v67-line);
  border-radius: 28px;
  box-shadow: var(--v67-shadow-soft);
  backdrop-filter: blur(18px);
}

.panel--soft,
.desk-hero {
  background:
    radial-gradient(circle at 8% 0%, rgba(96,165,250,.22), transparent 28%),
    radial-gradient(circle at 94% 16%, rgba(16,185,129,.18), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82));
  border: 1px solid rgba(190, 212, 255, .62);
  box-shadow: var(--v67-shadow);
}

.desk-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  padding: 34px 38px;
  overflow: hidden;
  position: relative;
}

.desk-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  top: -120px;
  width: 310px;
  height: 310px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37,99,235,.18), transparent 68%);
}

.desk-hero h1 {
  font-size: clamp(2.05rem, 3.4vw, 3.6rem);
  letter-spacing: -.07em;
  margin-bottom: 8px;
}

.desk-hero .muted {
  max-width: 760px;
  color: #5d6b83;
  font-size: 1.02rem;
  line-height: 1.72;
}

.desk-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 14px;
}

.desk-kpi {
  min-width: 118px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(248,251,255,.66));
  border: 1px solid rgba(177, 199, 238, .58);
  box-shadow: 0 12px 28px rgba(37,99,235,.08), inset 0 1px 0 rgba(255,255,255,.82);
}

.desk-kpi span {
  display: block;
  color: #64748b;
  font-weight: 800;
  font-size: .82rem;
  margin-bottom: 8px;
}

.desk-kpi strong {
  font-size: 1.8rem;
  letter-spacing: -.05em;
}

.desk-filter-panel {
  position: sticky;
  top: 10px;
  z-index: 8;
  padding: 22px 26px;
}

.desk-filter-grid {
  align-items: end;
}

.input,
.textarea,
select.input {
  border-color: rgba(148,163,184,.38);
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 0 rgba(15,23,42,.02);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.input:focus,
.textarea:focus,
select.input:focus {
  border-color: rgba(37,99,235,.68);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12), 0 12px 26px rgba(37,99,235,.08);
  background: #fff;
}

.btn {
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: -.015em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, border-color .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--v67-primary), var(--v67-primary-2));
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(37,99,235,.23);
}

.btn-primary:hover {
  box-shadow: 0 18px 34px rgba(37,99,235,.28);
  filter: saturate(1.05);
}

.btn-secondary {
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(148,163,184,.34);
  color: #15223a;
}

.btn-secondary:hover {
  border-color: rgba(37,99,235,.36);
  box-shadow: 0 12px 26px rgba(15,23,42,.08);
}

.btn-wa,
.btn-wa.btn-primary {
  background: linear-gradient(135deg, #0aa66a, #10b981);
  border: 0;
  color: #fff;
  box-shadow: 0 18px 36px rgba(16,185,129,.28);
}

.btn-wa:hover {
  box-shadow: 0 22px 44px rgba(16,185,129,.34);
}

.desk-workspace-v61 {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.desk-left-panel {
  max-height: calc(100vh - 116px);
  overflow: auto;
  scrollbar-width: thin;
}

.desk-batch-box {
  border-radius: 24px;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 38px rgba(37,99,235,.22);
}

.desk-batch-box .input {
  background: rgba(255,255,255,.96);
}

.desk-record-list-v61 {
  gap: 12px;
}

.desk-record-row {
  border-radius: 22px;
  padding: 3px;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.desk-record-row:hover {
  transform: translateY(-1px);
}

.desk-record-row.is-active {
  background: linear-gradient(135deg, #2563eb, #10b981);
  box-shadow: 0 18px 34px rgba(37,99,235,.18);
}

.desk-record-card-v61 {
  border-radius: 19px;
  border: 1px solid rgba(148,163,184,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.88));
  box-shadow: 0 10px 26px rgba(15,23,42,.055);
}

.desk-record-row.is-active .desk-record-card-v61 {
  border-color: rgba(255,255,255,.78);
}

.badge,
.badge--wa-status {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: -.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.desk-profile-card {
  border-top: 6px solid transparent;
  border-image: linear-gradient(90deg, #2563eb, #10b981) 1;
}

.desk-profile-actions {
  gap: 10px;
}

.desk-action-hint {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #047857;
  background: linear-gradient(180deg, #ecfdf5, #f7fffb);
  border: 1px solid #a7f3d0;
  font-weight: 800;
  line-height: 1.35;
}

.collapsible-panel {
  overflow: hidden;
}

.collapsible-panel__body {
  animation: v67PanelIn .22s ease;
}

@keyframes v67PanelIn {
  from { opacity: .35; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.table-wrap--card,
.data-table {
  border-radius: 20px;
}

.data-table th {
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  color: #334155;
  font-weight: 950;
}

.notice {
  border-radius: 18px;
  border-color: rgba(148,163,184,.30);
  background: rgba(255,255,255,.78);
}

.toast,
.toast-container .toast {
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15,23,42,.18);
}

.lang-menu__dropdown,
.nav-group__menu {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 60px rgba(15,23,42,.26);
  backdrop-filter: blur(18px);
}

@media (max-width: 1180px) {
  .desk-hero { grid-template-columns: 1fr; }
  .desk-kpis { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .desk-workspace-v61 { grid-template-columns: 1fr; }
  .desk-left-panel { max-height: none; }
}

@media (max-width: 720px) {
  .panel,
  .desk-hero,
  .desk-filter-panel {
    border-radius: 22px;
  }
  .desk-hero { padding: 24px 18px; }
  .desk-kpis { grid-template-columns: 1fr; }
  .desk-profile-actions .btn,
  .desk-profile-actions .desk-action-hint,
  .desk-filter-grid .btn {
    width: 100%;
    justify-content: center;
  }
  .desk-filter-panel { position: static; }
}


/* V6.8 professional account editor, chat, audit and reminder polish */
.user-editor-shell .panel__head{align-items:flex-start;}
.user-editor-form{display:grid;gap:22px;}
.form-section-card{border:1px solid rgba(148,163,184,.22);border-radius:22px;background:linear-gradient(180deg,#ffffff,#f8fbff);padding:22px;box-shadow:0 18px 40px rgba(15,23,42,.06);}
.form-section-card__head{margin-bottom:16px;}
.form-section-card__head h2{margin:0 0 6px;font-size:1.12rem;}
.user-switch-shell{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:16px;}
.user-switch-card{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:118px;padding:20px 22px;border-radius:22px;border:1px solid rgba(148,163,184,.22);background:linear-gradient(135deg,#f8fbff,#ffffff);box-shadow:0 18px 40px rgba(15,23,42,.06);}
.user-switch-card h3{margin:0 0 6px;font-size:1rem;}
.modern-switch{display:inline-flex;align-items:center;gap:12px;white-space:nowrap;font-weight:900;color:#0f172a;}
.modern-switch input{position:absolute;opacity:0;pointer-events:none;}
.modern-switch span{position:relative;width:52px;height:30px;border-radius:999px;background:#cbd5e1;box-shadow:inset 0 2px 8px rgba(15,23,42,.16);transition:all .18s ease;}
.modern-switch span::after{content:"";position:absolute;top:4px;left:4px;width:22px;height:22px;border-radius:999px;background:#fff;box-shadow:0 4px 10px rgba(15,23,42,.20);transition:all .18s ease;}
.modern-switch input:checked + span{background:linear-gradient(135deg,#2563eb,#16a34a);}
.modern-switch input:checked + span::after{transform:translateX(22px);}
.permission-groups--accordion{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.permission-card--accordion{padding:0;overflow:hidden;background:#fff;border-radius:20px;border:1px solid rgba(148,163,184,.22);box-shadow:0 14px 32px rgba(15,23,42,.05);}
.permission-card--accordion summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;background:linear-gradient(180deg,#f8fbff,#eef5ff);}
.permission-card--accordion summary::-webkit-details-marker{display:none;}
.permission-card--accordion .permission-grid{padding:18px 20px 20px;}
.permission-arrow{width:34px;height:34px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#fff;color:#2563eb;font-weight:900;box-shadow:inset 0 0 0 1px rgba(37,99,235,.12);transition:transform .18s ease;}
.permission-card--accordion[open] .permission-arrow{transform:rotate(180deg);}
.sticky-form-actions{position:sticky;bottom:12px;z-index:5;display:flex;justify-content:flex-start;padding:14px;border-radius:20px;background:rgba(255,255,255,.78);backdrop-filter:blur(16px);border:1px solid rgba(148,163,184,.18);box-shadow:0 18px 42px rgba(15,23,42,.12);}
.checkbox-row{align-self:start;}
.followup-field.is-due .input{border-color:#f59e0b!important;box-shadow:0 0 0 5px rgba(245,158,11,.14)!important;}
.form-warning{margin-top:8px;color:#b45309;font-weight:850;line-height:1.5;}
.panel--narrow{max-width:760px;margin-inline:auto;}
.internal-chat-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;min-height:640px;}
.internal-chat-sidebar{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid rgba(148,163,184,.22);border-radius:22px;background:linear-gradient(180deg,#f8fbff,#fff);overflow:auto;}
.chat-room-section-title{margin:12px 8px 4px;color:#64748b;font-size:.78rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;}
.chat-room-item{border:0;border-radius:16px;padding:13px 14px;background:#fff;color:#334155;font-weight:850;text-align:left;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(148,163,184,.20);transition:all .16s ease;}
.chat-room-item:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.08), inset 0 0 0 1px rgba(37,99,235,.18);}
.chat-room-item.is-active{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;box-shadow:0 16px 36px rgba(37,99,235,.24);}
.internal-chat-main{display:grid;grid-template-rows:auto 1fr auto;border:1px solid rgba(148,163,184,.22);border-radius:24px;background:#fff;overflow:hidden;box-shadow:0 18px 42px rgba(15,23,42,.06);}
.internal-chat-header{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid rgba(148,163,184,.16);background:linear-gradient(180deg,#f8fbff,#fff);}
.internal-chat-feed{padding:20px;overflow:auto;background:linear-gradient(180deg,#f8fafc,#ffffff);}
.chat-bubble{max-width:78%;margin:0 0 14px;padding:12px 14px;border-radius:18px;background:#fff;border:1px solid rgba(148,163,184,.16);box-shadow:0 12px 28px rgba(15,23,42,.08);}
.chat-bubble.is-self{margin-left:auto;background:#eff6ff;border-color:rgba(37,99,235,.18);}
.chat-bubble__meta{font-size:.78rem;color:#64748b;font-weight:800;margin-bottom:6px;}
.chat-bubble__body{white-space:pre-wrap;word-break:break-word;line-height:1.65;}
.internal-chat-compose{padding:18px 20px;border-top:1px solid rgba(148,163,184,.16);background:#fff;}
.audit-pre{max-width:520px;max-height:140px;overflow:auto;margin:0;white-space:pre-wrap;word-break:break-word;font-size:.78rem;color:#334155;}
@media (max-width: 1100px){.permission-groups--accordion,.user-switch-shell,.internal-chat-layout{grid-template-columns:1fr;}.sticky-form-actions{position:static;}}

/* =========================
   V6.9 unified business UI / org / chat / ticket polish
   ========================= */
.panel, .detail-card, .form-section-card {
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 22px 60px rgba(15,23,42,.08);
}
.panel__head { gap: 16px; }
.panel__collapse-btn { margin-left: auto; white-space: nowrap; }
.panel.is-panel-collapsed > :not(.panel__head) { display: none !important; }
.professional-table tbody tr { transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.professional-table tbody tr:hover { background: #f8fbff; box-shadow: inset 3px 0 0 #2563eb; }
.unified-filter-card { padding: 18px; border-radius: 22px; background: linear-gradient(180deg,#f8fbff,#fff); border: 1px solid rgba(148,163,184,.20); }
.status-pill, .priority-badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 6px 12px; border-radius: 999px; font-weight: 900; font-size: 13px;
  border: 1px solid rgba(148,163,184,.22); background: #f8fafc; color: #334155;
}
.status-pill--warning { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.status-pill--info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-pill--done { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.status-pill--muted { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }
.priority-badge--urgent { background: #fef2f2; color: #b91c1c; border-color: #fecaca; box-shadow: 0 0 0 4px rgba(239,68,68,.08); }
.priority-badge--high { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.priority-badge--normal { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.priority-badge--low { background: #f8fafc; color: #64748b; border-color: #cbd5e1; }
.ticket-stat-grid, .org-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(160px,1fr)); gap:16px; margin:18px 0; }
.stat-card { padding:18px 20px; border-radius:22px; background:linear-gradient(180deg,#f8fbff,#fff); border:1px solid rgba(148,163,184,.22); }
.stat-card span { display:block; color:#64748b; font-weight:800; margin-bottom:8px; }
.stat-card strong { font-size:30px; color:#0f172a; }
.stat-card--warning { background:linear-gradient(180deg,#fff7ed,#fff); }
.stat-card--danger { background:linear-gradient(180deg,#fef2f2,#fff); }
.stat-card--success { background:linear-gradient(180deg,#ecfdf5,#fff); }
.ticket-row--done { opacity:.76; background:linear-gradient(90deg,rgba(16,185,129,.08),transparent 36%); }
.ticket-row--hot { background:linear-gradient(90deg,rgba(239,68,68,.10),transparent 40%); box-shadow: inset 4px 0 0 #ef4444; }
.ticket-row--new { background:linear-gradient(90deg,rgba(245,158,11,.10),transparent 40%); box-shadow: inset 4px 0 0 #f59e0b; }
.ticket-row--open { box-shadow: inset 4px 0 0 #3b82f6; }

.lark-chat-layout { display:grid; grid-template-columns: 330px minmax(0,1fr); min-height: 720px; border:1px solid rgba(148,163,184,.18); border-radius:24px; overflow:hidden; background:#fff; }
.lark-chat-sidebar { background:linear-gradient(180deg,#f8fbff,#f1f5f9); border-right:1px solid rgba(148,163,184,.22); padding:16px; display:flex; flex-direction:column; gap:12px; }
.lark-chat-sidebar__head { display:flex; justify-content:space-between; align-items:center; }
.lark-conversation-list { display:flex; flex-direction:column; gap:8px; overflow:auto; padding-right:4px; }
.conversation-item { width:100%; display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px; border:none; border-radius:18px; background:rgba(255,255,255,.82); text-align:left; cursor:pointer; box-shadow: inset 0 0 0 1px rgba(148,163,184,.18); }
.conversation-item.is-active { background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; box-shadow:0 18px 36px rgba(37,99,235,.28); }
.conversation-item.is-active .conversation-item__last, .conversation-item.is-active .conversation-item__time { color:rgba(255,255,255,.76); }
.conversation-item__avatar { width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#e0f2fe; }
.room-avatar { width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:900; background:#dbeafe; color:#1d4ed8; }
.online-dot { width:14px; height:14px; border-radius:50%; background:#cbd5e1; box-shadow:0 0 0 7px #f1f5f9; }
.online-dot.is-online { background:#22c55e; box-shadow:0 0 0 7px #dcfce7; }
.conversation-item__title { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.conversation-item__last { color:#64748b; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:170px; }
.conversation-item__time { color:#94a3b8; font-size:11px; white-space:nowrap; }
.unread-badge { display:inline-flex; min-width:22px; height:22px; border-radius:999px; background:#ef4444; color:white; font-size:12px; font-weight:900; align-items:center; justify-content:center; padding:0 6px; }
.lark-chat-main { display:grid; grid-template-rows:auto 1fr auto; min-width:0; }
.lark-chat-header { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:18px 22px; border-bottom:1px solid rgba(148,163,184,.18); background:linear-gradient(180deg,#fff,#f8fbff); }
.lark-chat-header h2 { margin:0; }
.lark-chat-search { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.lark-chat-feed { padding:24px; overflow:auto; background:linear-gradient(180deg,#f8fafc,#fff); }
.chat-message { max-width:72%; margin:0 0 16px; padding:13px 15px; border-radius:18px 18px 18px 6px; background:#fff; border:1px solid rgba(148,163,184,.18); box-shadow:0 14px 30px rgba(15,23,42,.07); }
.chat-message.is-self { margin-left:auto; border-radius:18px 18px 6px 18px; background:#eff6ff; border-color:#bfdbfe; }
.chat-message__meta { font-size:12px; font-weight:800; color:#64748b; margin-bottom:7px; }
.chat-message__body { white-space:pre-wrap; word-break:break-word; line-height:1.65; }
.chat-read-state { margin-left:8px; color:#2563eb; }
.chat-attachment { margin-top:8px; display:inline-flex; padding:8px 10px; border-radius:12px; background:#f8fafc; border:1px solid rgba(148,163,184,.22); font-weight:800; }
.lark-chat-compose { padding:18px 22px; border-top:1px solid rgba(148,163,184,.18); background:#fff; }
.lark-chat-compose__bar { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-top:10px; }
.file-pill { display:inline-flex; align-items:center; gap:8px; padding:10px 12px; border-radius:999px; background:#f8fafc; border:1px solid rgba(148,163,184,.22); font-weight:800; cursor:pointer; }
.file-pill input { display:none; }

.org-tree-list, .team-admin-grid, .rank-group-grid, .team-directory-grid { display:grid; gap:14px; }
.org-tree-row { --indent: calc(var(--level) * 34px); margin-left: var(--indent); display:grid; grid-template-columns:44px minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:14px 16px; border-radius:18px; background:#fff; border:1px solid rgba(148,163,184,.20); box-shadow:0 10px 26px rgba(15,23,42,.05); }
.org-tree-row__avatar, .member-chip__avatar { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:900; background:linear-gradient(135deg,#dbeafe,#e0f2fe); color:#1d4ed8; }
.org-tree-row__main { display:flex; flex-direction:column; gap:3px; }
.org-tree-row__meta { color:#64748b; font-weight:800; }
.rank-card, .team-directory-card, .team-admin-card { border:1px solid rgba(148,163,184,.22); border-radius:20px; background:linear-gradient(180deg,#f8fbff,#fff); overflow:hidden; }
.rank-card summary, .team-directory-card summary, .team-admin-card summary { list-style:none; cursor:pointer; display:flex; justify-content:space-between; gap:12px; align-items:center; padding:16px 18px; }
.rank-card summary::-webkit-details-marker, .team-directory-card summary::-webkit-details-marker, .team-admin-card summary::-webkit-details-marker { display:none; }
.rank-card__members, .team-member-strip { padding:0 18px 18px; display:flex; flex-wrap:wrap; gap:10px; }
.member-chip, .member-mini { display:inline-flex; gap:9px; align-items:center; padding:9px 12px; border-radius:16px; background:#fff; border:1px solid rgba(148,163,184,.18); }
.member-chip small { display:block; color:#64748b; margin-top:2px; }
.team-directory-card__meta { padding:0 18px 12px; color:#64748b; font-weight:800; }
.team-admin-card form { padding:0 18px 18px; }

@media (max-width: 980px) {
  .lark-chat-layout { grid-template-columns:1fr; }
  .lark-chat-sidebar { border-right:none; border-bottom:1px solid rgba(148,163,184,.22); max-height:330px; }
  .ticket-stat-grid, .org-kpi-grid { grid-template-columns:repeat(2,minmax(140px,1fr)); }
  .org-tree-row { margin-left:0; grid-template-columns:44px minmax(0,1fr); }
  .org-tree-row__meta { grid-column:2; }
}
@media (max-width: 640px) {
  .ticket-stat-grid, .org-kpi-grid { grid-template-columns:1fr; }
  .chat-message { max-width:92%; }
  .lark-chat-header { align-items:flex-start; flex-direction:column; }
}

/* V6.10 system guide and language-polish UI */
.guide-hero .guide-summary-grid,
.guide-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.guide-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}
.guide-section-card {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248,251,255,.95), rgba(255,255,255,.95));
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
  overflow: hidden;
}
.guide-section-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}
.guide-section-card > summary::-webkit-details-marker,
.guide-unavailable > summary::-webkit-details-marker { display: none; }
.guide-feature-list { display: grid; gap: 12px; padding: 16px; }
.guide-feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: #fff;
}
.guide-feature-item h3 { margin: 0 0 6px; font-size: 16px; }
.guide-feature-item p { margin: 0; }
.guide-feature-item.is-enabled { border-left: 4px solid #2563eb; }
.guide-feature-item.is-disabled { opacity: .68; background: #f8fafc; }
.guide-unavailable { margin: 0 16px 16px; border-top: 1px dashed rgba(148,163,184,.35); }
.guide-unavailable > summary { cursor: pointer; padding: 14px 2px; font-weight: 850; color: #64748b; }
.guide-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
}
@media (max-width: 1000px) {
  .guide-summary-grid,
  .guide-section-grid,
  .guide-tips-grid { grid-template-columns: 1fr; }
}
