:root {
  --primary: #0F4C45;
  --primary-light: #1a6b62;
  --accent: #00BFA5;
  --accent-glow: rgba(0,191,165,0.15);
  --bg: #F4F6F9;
  --white: #FFFFFF;
  --text-dark: #111827;
  --text-gray: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sidebar-width: 240px;
  --topbar-height: 60px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: #F4F6F9;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: #F4F6F9;
  color: var(--text-dark);
  opacity: 0;
  animation: pageLoad 0.15s ease forwards;
}

@keyframes pageLoad {
  from { opacity: 0; }
  to   { opacity: 1; }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

body[data-page] {
  overflow: hidden;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #0d3d37 0%, #082e29 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 10px;
}

.sidebar-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.sidebar-logo span {
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sidebar-menu-label {
  margin: 2px 20px 8px;
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 0 8px;
  display: grid;
  gap: 2px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 8px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0 4px;
  color: rgba(255,255,255,0.72);
  border-left: 3px solid transparent;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255,255,255,0.09);
  color: #FFFFFF;
  transform: translateX(2px);
}

.nav-item.active {
  background: rgba(0,191,165,0.15);
  color: #FFFFFF;
  border-left-color: var(--accent);
}

.sidebar-profile {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F4C45, #00BFA5);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.profile-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-name {
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-plan {
  color: rgba(255,255,255,0.62);
  font-size: 11px;
}

.profile-plan-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  padding: 2px 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.86);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.logout-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,0.66);
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
}

.app-main {
  grid-column: 2;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid #F3F4F6;
  box-shadow: 0 1px 0 #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-gray);
  cursor: pointer;
}

.sidebar-toggle svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.page-title-wrap {
  display: grid;
  gap: 2px;
}

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.page-breadcrumb {
  margin: 0;
  font-size: 11px;
  color: var(--text-light);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search {
  width: 260px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #F9FAFB;
  padding: 0 14px;
  font-size: 13px;
  color: var(--text-dark);
}

.top-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--text-gray);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.icon-btn:hover {
  background: #F9FAFB;
  color: var(--text-dark);
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #FFFFFF;
}

.top-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F4C45, #00BFA5);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.page-content {
  padding: 24px;
  display: grid;
  gap: 24px;
}

.stagger {
  opacity: 0;
  transform: translateY(10px);
  animation: staggerIn 0.4s ease forwards;
}

.stagger:nth-child(1) { animation-delay: 0.05s; }
.stagger:nth-child(2) { animation-delay: 0.1s; }
.stagger:nth-child(3) { animation-delay: 0.15s; }
.stagger:nth-child(4) { animation-delay: 0.2s; }
.stagger:nth-child(5) { animation-delay: 0.25s; }
.stagger:nth-child(6) { animation-delay: 0.3s; }
.stagger:nth-child(7) { animation-delay: 0.35s; }
.stagger:nth-child(8) { animation-delay: 0.4s; }

.card {
  background: var(--white);
  border: 1px solid #F3F4F6;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #F9FAFB;
}

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.card-body {
  padding: 16px 18px 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #0F4C45, #1a6b62);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(15,76,69,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,76,69,0.34);
}

.btn-secondary {
  background: #FFFFFF;
  border-color: var(--border);
  color: #374151;
}

.btn-secondary:hover {
  background: #F9FAFB;
}

.btn-danger {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
}

.btn-danger:hover {
  background: #FEE2E2;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-gray);
}

.btn-ghost:hover {
  background: #F9FAFB;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-dark);
  padding: 10px 14px;
  font-size: 14px;
}

.textarea {
  min-height: 108px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

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

.stat-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.icon-messages {
  background: #EFF6FF;
  color: #3B82F6;
}

.icon-customers {
  background: #F0FDF4;
  color: #10B981;
}

.icon-response {
  background: #F5F3FF;
  color: #8B5CF6;
}

.icon-revenue {
  background: #FFFBEB;
  color: #F59E0B;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-gray);
}

.trend {
  font-size: 12px;
  font-weight: 600;
}

.trend.up {
  color: #10B981;
}

.trend.down {
  color: #EF4444;
}

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

.plan-upgrade-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0F4C45 0%, #1a6b5e 100%);
  border-radius: 12px;
  padding: 20px 24px;
}

.plan-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-badge-current {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
}

.plan-desc {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  margin: 0;
}

.plan-upgrade-card .btn {
  background: #fff;
  color: #0F4C45;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
}

.plan-upgrade-card .btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.plan-upgrade-card.pro .plan-badge-current {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.plan-upgrade-card.agency .plan-badge-current {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.quick-actions .btn {
  width: 100%;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-chip.connected {
  background: #DCFCE7;
  color: #166534;
}

.status-chip.disconnected {
  background: #FEE2E2;
  color: #991B1B;
}

.status-chip.connecting {
  background: #FEF3C7;
  color: #92400E;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  background: #F9FAFB;
  padding: 11px 10px;
  border-bottom: 1px solid #EEF0F2;
}

tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #F3F4F6;
  font-size: 13px;
  color: #1F2937;
}

tbody tr:hover {
  background: #F9FAFB;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--text-gray);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.badge.pending {
  background: #FEF3C7;
  color: #92400E;
}

.badge.resolved {
  background: #D1FAE5;
  color: #065F46;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

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

.toolbar-actions .select {
  min-width: 140px;
}

.catalog-search {
  width: min(360px, 100%);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.catalog-grid > .empty-state {
  grid-column: 1 / -1;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.location-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.location-option input {
  display: none;
}

.location-card {
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #FFFFFF;
  color: #334155;
}

.location-card span {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

.location-card strong {
  display: block;
  font-size: 13px;
  color: #0F172A;
}

.location-card small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748B;
}

.location-option input:checked + .location-card {
  border-color: #0F4C45;
  background: #F0FDF4;
  box-shadow: 0 6px 16px rgba(15,76,69,0.14);
}

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

.staff-grid > .empty-state {
  grid-column: 1 / -1;
}

.staff-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #E5E7EB;
  text-align: center;
  display: grid;
  gap: 12px;
}

.staff-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F4C45, #00BFA5);
  color: #FFFFFF;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.staff-info {
  display: grid;
  gap: 4px;
}

.staff-info h3 {
  margin: 0;
  font-size: 16px;
  color: #0F172A;
}

.staff-info p {
  margin: 0;
  color: #64748B;
  font-size: 13px;
}

.staff-phone {
  color: #334155 !important;
  font-weight: 600;
}

.staff-status {
  font-size: 13px;
  font-weight: 700;
}

.available {
  color: #10B981;
}

.unavailable {
  color: #EF4444;
}

.staff-actions {
  display: grid;
  gap: 8px;
}

.staff-actions .btn {
  width: 100%;
}

.product-card {
  background: #FFFFFF;
  border: 1px solid #F3F4F6;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-image-wrap {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.product-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,24,39,0.24), transparent 56%);
  pointer-events: none;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-body {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.product-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.product-price {
  margin: 0;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
}

.meta-category {
  background: #F0FDF4;
  color: #065F46;
}

.meta-stock.in {
  background: #DCFCE7;
  color: #166534;
}

.meta-stock.out {
  background: #FEE2E2;
  color: #B91C1C;
}

.meta-variant {
  background: #EEF6FF;
  color: #1D4ED8;
}

.meta-related {
  background: #ECFEFF;
  color: #155E75;
}

.product-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-status-badge.published {
  background: rgba(16,185,129,0.9);
  color: #FFFFFF;
}

.product-status-badge.draft {
  background: rgba(71,85,105,0.9);
  color: #FFFFFF;
}

.product-card.is-draft {
  border-color: rgba(148,163,184,0.48);
}

.product-card.is-draft .product-image {
  filter: grayscale(18%) saturate(80%);
}

.product-card.is-draft .product-name,
.product-card.is-draft .product-price {
  color: #334155;
}

.product-draft-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(148,163,184,0.08) 0%, rgba(148,163,184,0.18) 100%);
}

.card-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: var(--transition);
}

.product-card:hover .card-actions {
  opacity: 1;
  transform: translateY(0);
}

.card-actions .btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
}

.ghost-danger {
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: #DC2626;
}

.ghost-danger:hover {
  background: #FEE2E2;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(45,55,72,0.18), rgba(2,6,23,0.72));
  backdrop-filter: blur(8px) saturate(120%);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(12px, 2.8vh, 28px) 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 1200;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFDFF 100%);
  border-radius: 20px;
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: 0 26px 72px rgba(2,6,23,0.34);
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
  margin: auto;
  position: relative;
}

.modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00D4AA, #4A90E2);
  z-index: 2;
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid #EDEFF4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 3;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.01em;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #DDE3EC;
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  border-color: #00BFA5;
  color: #0F7A6E;
  background: #F7FFFC;
}

.modal-body {
  padding: 18px 22px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow-y: auto;
  min-height: 0;
  align-content: start;
}

.modal-body > input[type="hidden"] {
  display: none;
}

.modal-body > .form-group,
.modal-body > .toggle-label,
.modal-body > .checkbox-row {
  grid-column: 1 / -1;
}

.modal-body > .form-group.half {
  grid-column: span 1;
}

.modal-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid #EDF1F6;
  background: linear-gradient(180deg, rgba(255,255,255,0.76) 0%, #FFFFFF 35%);
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.card-footer-inline {
  padding-top: 0;
  padding-right: 18px;
  padding-bottom: 18px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-group {
  display: grid;
  gap: 7px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.field-label small {
  color: #94A3B8;
  font-weight: 500;
}

.variant-type-row {
  display: grid;
  gap: 8px;
}

.variant-input-area {
  margin-top: 8px;
  border: 1px dashed #D9E2EC;
  border-radius: 12px;
  background: #F8FAFC;
  padding: 10px;
}

.variant-panel {
  display: grid;
  gap: 8px;
}

.variant-panel small {
  font-size: 12px;
  color: #64748B;
}

.size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-chips label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  cursor: pointer;
  color: #334155;
  background: #FFFFFF;
  transition: var(--transition);
}

.size-chips label input {
  margin: 0;
}

.size-chips label:has(input:checked) {
  background: #0F4C45;
  color: #FFFFFF;
  border-color: #0F4C45;
}

.color-picker-row {
  display: grid;
  gap: 8px;
}

.color-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px auto;
  gap: 8px;
  align-items: center;
}

.color-name {
  min-width: 0;
}

.color-swatch {
  width: 52px;
  height: 42px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid #D9E2EC;
  cursor: pointer;
  background: #FFFFFF;
}

.btn-icon {
  min-height: 40px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 10px;
}

.btn-compact {
  padding: 7px 12px;
  min-height: 38px;
  font-size: 13px;
}

.cross-sell-select {
  min-height: 112px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.cross-sell-select option {
  padding: 6px 8px;
}

.status-toggle {
  display: grid;
  gap: 10px;
}

.status-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  color: #334155;
  background: #FFFFFF;
  cursor: pointer;
  transition: var(--transition);
}

.status-toggle input {
  accent-color: #00BFA5;
}

.status-toggle label:has(input:checked) {
  border-color: #0F7A6E;
  background: #ECFDF5;
}

.form-group small {
  color: #64748B;
  font-size: 12px;
}

.modal .input,
.modal .textarea,
.modal .select {
  min-height: 46px;
  border: 1px solid #D9E2EC;
  border-radius: 12px;
  background: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.modal .textarea {
  min-height: 128px;
}

.modal .input::placeholder,
.modal .textarea::placeholder {
  color: #94A3B8;
}

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

.modal .input:focus,
.modal .textarea:focus,
.modal .select:focus {
  border-color: #00BFA5;
  box-shadow: 0 0 0 4px rgba(0,191,165,0.12);
}

.upload-area {
  border: 2px dashed #CBD5E1;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  background: linear-gradient(135deg, #F8FBFF 0%, #F3FAFF 100%);
}

.upload-area:hover {
  border-color: #00BFA5;
  box-shadow: 0 10px 22px rgba(15,23,42,0.08);
}

.upload-placeholder {
  padding: 26px 14px;
  text-align: center;
  color: #64748B;
}

.upload-placeholder span {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #FFFFFF;
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
  box-shadow: 0 10px 18px rgba(74,144,226,0.24);
}

.upload-placeholder p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1F2937;
}

.upload-placeholder small {
  display: block;
  margin-top: 6px;
  color: #64748B;
}

.upload-area img[id$="Preview"] {
  width: 100% !important;
  height: 190px !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  margin: 8px;
  width: calc(100% - 16px) !important;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 12px;
}

.toggle-label input {
  accent-color: #00BFA5;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 12px;
}

.checkbox-row input {
  accent-color: var(--accent);
}

.modal-footer .btn {
  min-width: 130px;
  border-radius: 12px;
  font-weight: 700;
  padding: 10px 18px;
}

.modal-footer .btn-primary {
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
  border-color: transparent;
}

.modal-footer .btn-secondary {
  background: #FFFFFF;
  border-color: #D9E2EC;
  color: #334155;
}

.csv-modal {
  width: min(920px, calc(100vw - 32px));
}

.csv-instructions {
  border: 1px solid #DDE7F2;
  border-radius: 12px;
  background: #F8FAFC;
  padding: 12px;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.csv-instructions p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1F2937;
}

.csv-instructions code {
  display: block;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 10px 12px;
  color: #0F172A;
  font-size: 12px;
  overflow-x: auto;
}

.csv-upload {
  margin-bottom: 12px;
  min-height: 116px;
  display: grid;
  place-items: center;
}

.csv-upload p {
  margin: 0;
  font-weight: 600;
  color: #475569;
}

.csv-preview {
  border: 1px solid #DDE7F2;
  border-radius: 12px;
  background: #FFFFFF;
  padding: 12px;
}

.csv-preview h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #1F2937;
}

.csv-table-wrap {
  max-height: 300px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

#csvTable th,
#csvTable td {
  white-space: nowrap;
}

.csv-footer-inline {
  border-top: 0;
  padding: 12px 0 0;
}

.conversation-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 132px);
}

.customers-panel,
.chat-panel {
  height: 100%;
}

.customer-list {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.page-info {
  font-size: 13px;
  color: var(--text-gray);
}

.customer-item {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.customer-item:hover {
  background: #F9FAFB;
}

.customer-item.active {
  background: #F0FDF4;
  border-left-color: var(--accent);
}

.customer-item strong {
  font-size: 13px;
}

.customer-item span {
  color: var(--text-gray);
  font-size: 12px;
}

.chat-panel .card-header {
  align-items: center;
}

.chat-title {
  display: grid;
  gap: 2px;
}

.chat-title h3 {
  margin: 0;
  font-size: 15px;
}

.chat-title p {
  margin: 0;
  font-size: 12px;
  color: var(--text-gray);
}

.chat-messages {
  height: calc(100vh - 280px);
  overflow-y: auto;
  display: grid;
  gap: 12px;
}

.message-row {
  display: grid;
  gap: 8px;
}

.bubble {
  max-width: min(72%, 520px);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  line-height: 1.5;
}

.bubble.customer {
  background: #FFFFFF;
  justify-self: start;
}

.bubble.ai {
  background: #F0FDF4;
  justify-self: end;
}

.bubble-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.bubble-time-right {
  text-align: right;
}

.chat-actions {
  display: flex;
  gap: 8px;
}

.mobile-chat-back {
  display: none;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.bar-chart {
  height: 280px;
  display: grid;
  align-items: end;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.bar-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  position: relative;
}

.bar-fill-wrap {
  width: 100%;
  height: 210px;
  display: flex;
  align-items: flex-end;
}

.bar-fill {
  width: 100%;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #0F4C45, #00BFA5);
  height: var(--bar-height, 20%);
  animation: growBar 0.7s ease forwards;
  transform-origin: bottom;
}

.bar-label {
  font-size: 11px;
  color: var(--text-gray);
}

.bar-tooltip {
  position: absolute;
  top: -6px;
  transform: translateY(-100%);
  background: #111827;
  color: #FFFFFF;
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.bar-item:hover .bar-tooltip {
  opacity: 1;
}

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

.kpi-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #F9FAFB;
  font-size: 13px;
}

.kpi-line strong {
  color: var(--text-dark);
}

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

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--text-gray);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.preset-btn:hover {
  border-color: var(--accent);
  color: var(--primary);
  background: #F0FDFA;
}

.preview-chat {
  display: grid;
  gap: 12px;
}

.preview-bubble {
  max-width: 82%;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}

.preview-bubble.user {
  background: #FFFFFF;
  justify-self: start;
}

.preview-bubble.ai {
  background: #DCFCE7;
  justify-self: end;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.settings-section + .settings-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #F3F4F6;
}

.settings-section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #1F2937;
}

.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 13px;
  color: #374151;
}

.payment-option input {
  accent-color: var(--accent);
}

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

.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.empty-state svg {
  width: 70px;
  height: 70px;
  stroke: #CBD5E1;
  fill: none;
  stroke-width: 1.7;
}

.empty-state h4 {
  margin: 14px 0 6px;
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  color: var(--text-gray);
  font-size: 13px;
}

.empty-state .btn {
  margin-top: 14px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #E5E7EB;
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: shimmer 1.2s infinite;
}

.skeleton-card {
  background: #FFFFFF;
  border: 1px solid #F3F4F6;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.skeleton-line {
  height: 12px;
}

.skeleton-line.short {
  width: 50%;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 1400;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  border-radius: 999px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.22s ease forwards;
}

.toast svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

.toast.success {
  background: #10B981;
}

.toast.error {
  background: #EF4444;
}

.helper-text {
  color: var(--text-gray);
  font-size: 12px;
}

.compact-empty {
  min-height: 160px;
}

.customer-foot {
  font-size: 11px;
  color: var(--text-light);
}

.row-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.row-actions .btn {
  flex: 1;
}

.quick-buttons {
  display: grid;
  gap: 10px;
}

.wa-phone {
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 0;
}

.wa-status-connected {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 12px;
}

.wa-status-disconnected {
  background: #fff8f8;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 12px;
}

.wa-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-status-header strong {
  color: #111827;
}

.wa-signal {
  margin-left: auto;
  color: #16a34a;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.wa-number {
  margin: 0;
  color: #166534;
  font-size: 16px;
  font-weight: 700;
}

.wa-helper {
  margin: 0;
  font-size: 13px;
  color: #6B7280;
}

.wa-status-connecting .wa-helper {
  text-align: center;
}

.wa-qr-shell {
  background: linear-gradient(165deg, #fffbeb 0%, #fff8f1 48%, #ffffff 100%);
  border-color: #fcd34d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.wa-qr-frame {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed #D1D5DB;
  background:
    linear-gradient(#FFFFFF, #FFFFFF) padding-box,
    repeating-linear-gradient(
      45deg,
      rgba(15,76,69,0.04) 0,
      rgba(15,76,69,0.04) 10px,
      rgba(0,191,165,0.02) 10px,
      rgba(0,191,165,0.02) 20px
    ) border-box;
}

.wa-qr-code {
  margin: 0;
  display: flex;
  justify-content: center;
}

.qr-safe-wrap {
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  box-shadow: var(--shadow-sm);
  padding: 12px;
  box-sizing: border-box;
}

.qr-safe-wrap canvas,
.qr-safe-wrap img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.wa-qr-countdown {
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  color: #92400E;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #FDE68A;
  background: #FFFBEB;
  padding: 6px 12px;
  width: fit-content;
}

.btn-disconnect {
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: #B91C1C;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-disconnect:hover {
  background: #FEE2E2;
}

.wa-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

.wa-dot.connected { background: #10B981; }
.wa-dot.connecting { background: #F59E0B; }
.wa-dot.disconnected { background: #EF4444; }

.wa-qr {
  margin-top: 12px;
  margin-bottom: 10px;
  display: grid;
  justify-items: start;
  gap: 8px;
}

.qr-image {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  padding: 12px;
  box-sizing: border-box;
}

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

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 900;
}

.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes growBar {
  from {
    transform: scaleY(0.1);
    opacity: 0.55;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

@media (max-width: 1199px) {
  .overview-grid,
  .analytics-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-layout {
    grid-template-columns: 1fr;
  }

  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-main {
    grid-column: 1;
  }

  .topbar {
    padding: 0 14px;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-search {
    display: none;
  }

  .page-content {
    padding: 16px;
    gap: 16px;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .location-toggle {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .staff-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .conversation-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .chat-panel {
    display: none;
  }

  .conversation-layout.chat-open .chat-panel {
    display: block;
  }

  .conversation-layout.chat-open .customers-panel {
    display: none;
  }

  .mobile-chat-back {
    display: inline-flex;
    margin-right: 8px;
  }

  .chat-messages {
    height: calc(100vh - 320px);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 16px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-body > .form-group.half {
    grid-column: 1 / -1;
  }

  .modal-footer {
    justify-content: stretch;
    gap: 8px;
  }

  .modal-footer .btn {
    flex: 1;
    min-width: 0;
  }

  .color-row {
    grid-template-columns: 1fr;
  }

  .btn-icon {
    width: 100%;
  }

  .cross-sell-select {
    min-height: 100px;
  }

  .csv-modal {
    width: calc(100vw - 12px);
  }

  .csv-instructions code {
    white-space: nowrap;
  }
}

/* Dashboard Custom Theme (requested palette) */
body[data-page="dashboard"] {
  background:
    radial-gradient(circle at 50% 46%, rgba(245,240,236,0.96) 0%, rgba(245,240,236,0.86) 24%, rgba(245,240,236,0.4) 50%, rgba(245,240,236,0) 74%),
    radial-gradient(circle at 0% 100%, rgba(212,184,232,0.72) 0%, rgba(212,184,232,0) 58%),
    radial-gradient(circle at 100% 100%, rgba(248,232,224,0.75) 0%, rgba(248,232,224,0) 56%),
    linear-gradient(135deg, #A8C8F0 0%, #B8E8E0 100%);
}

body[data-page="dashboard"] .app-main {
  position: relative;
  background: transparent;
}

body[data-page="dashboard"] .app-main > *:not(.dashboard-vectors) {
  position: relative;
  z-index: 1;
}

body[data-page="dashboard"] .dashboard-vectors {
  position: fixed;
  inset: 0 0 0 var(--sidebar-width);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

body[data-page="dashboard"] .vector-blob {
  position: absolute;
  border-radius: 46% 54% 58% 42% / 41% 40% 60% 59%;
  background: linear-gradient(165deg, rgba(255,255,255,0.48), rgba(255,255,255,0.12));
  border: 1px solid rgba(255,255,255,0.34);
  backdrop-filter: blur(2px);
  animation: vectorFloat 14s ease-in-out infinite;
}

body[data-page="dashboard"] .blob-one {
  width: 280px;
  height: 280px;
  top: 74px;
  right: 70px;
  animation-delay: 0s;
}

body[data-page="dashboard"] .blob-two {
  width: 220px;
  height: 220px;
  bottom: 60px;
  right: 220px;
  animation-delay: -5s;
}

body[data-page="dashboard"] .blob-three {
  width: 210px;
  height: 210px;
  left: 42px;
  bottom: 120px;
  animation-delay: -9s;
}

body[data-page="dashboard"] .brand-orb {
  position: absolute;
  top: 92px;
  left: 60px;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
  box-shadow: 0 14px 28px rgba(74,144,226,0.34);
  animation: orbPulse 4.2s ease-in-out infinite;
}

body[data-page="dashboard"] .brand-chat-bubble {
  position: absolute;
  inset: 19px 22px 23px 22px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(17,24,39,0.16);
}

body[data-page="dashboard"] .brand-chat-bubble::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #FFFFFF;
  transform: rotate(45deg);
  border-bottom-right-radius: 4px;
}

body[data-page="dashboard"] .sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.58) 100%);
  border-right: 1px solid rgba(15,122,110,0.2);
  backdrop-filter: blur(14px);
  box-shadow: 10px 0 36px rgba(79,70,229,0.08);
}

body[data-page="dashboard"] .sidebar-logo {
  border-bottom-color: rgba(15,122,110,0.16);
}

body[data-page="dashboard"] .sidebar-logo span {
  color: #0F7A6E;
}

body[data-page="dashboard"] .sidebar-menu-label {
  color: rgba(15,23,42,0.5);
}

body[data-page="dashboard"] .nav-item {
  color: #334155;
  border-left-width: 4px;
}

body[data-page="dashboard"] .nav-item:hover {
  background: rgba(255,255,255,0.64);
  color: #0F7A6E;
}

body[data-page="dashboard"] .nav-item.active {
  background: rgba(0,212,170,0.2);
  color: #0F7A6E;
  border-left-color: #00D4AA;
}

body[data-page="dashboard"] .sidebar-profile {
  border-top-color: rgba(15,122,110,0.18);
  background: rgba(255,255,255,0.5);
}

body[data-page="dashboard"] .profile-avatar {
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
}

body[data-page="dashboard"] .profile-name {
  color: #1F2937;
}

body[data-page="dashboard"] .profile-plan-badge {
  background: rgba(0,212,170,0.18);
  color: #0F7A6E;
}

body[data-page="dashboard"] .logout-btn {
  color: #475569;
}

body[data-page="dashboard"] .logout-btn:hover {
  background: rgba(0,212,170,0.16);
  color: #0F7A6E;
}

body[data-page="dashboard"] .topbar {
  background: rgba(255,255,255,0.62);
  border-bottom: 1px solid rgba(255,255,255,0.54);
  box-shadow: 0 6px 20px rgba(148,163,184,0.14);
  backdrop-filter: blur(12px);
}

body[data-page="dashboard"] .page-breadcrumb {
  color: #475569;
}

body[data-page="dashboard"] .top-search {
  background: rgba(255,255,255,0.75);
  border-color: rgba(148,163,184,0.35);
}

body[data-page="dashboard"] .top-avatar {
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
}

body[data-page="dashboard"] .card {
  background: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 10px 26px rgba(15,23,42,0.08);
  backdrop-filter: blur(8px);
}

body[data-page="dashboard"] .card:hover {
  box-shadow: 0 14px 30px rgba(15,23,42,0.12);
}

body[data-page="dashboard"] .stat-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body[data-page="dashboard"] .stat-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -34px;
  top: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 70%);
}

body[data-page="dashboard"] .stat-card > * {
  position: relative;
  z-index: 1;
}

body[data-page="dashboard"] .stat-icon,
body[data-page="dashboard"] .icon-messages,
body[data-page="dashboard"] .icon-customers,
body[data-page="dashboard"] .icon-response,
body[data-page="dashboard"] .icon-revenue {
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(74,144,226,0.24);
}

body[data-page="dashboard"] .stat-value {
  color: #0F172A;
}

body[data-page="dashboard"] .trend.up {
  color: #0F7A6E;
}

body[data-page="dashboard"] .btn-primary {
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 16px rgba(74,144,226,0.24);
}

body[data-page="dashboard"] .btn-primary:hover {
  box-shadow: 0 12px 22px rgba(74,144,226,0.3);
}

body[data-page="dashboard"] .btn-secondary:hover {
  border-color: rgba(15,122,110,0.38);
  color: #0F7A6E;
}

body[data-page="dashboard"] .wa-status-connected {
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(184,232,224,0.44));
  border-color: rgba(0,212,170,0.45);
}

body[data-page="dashboard"] .wa-status-disconnected {
  background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(248,232,224,0.58));
  border-color: rgba(248,173,173,0.44);
}

body[data-page="dashboard"] .wa-qr-shell {
  background: linear-gradient(165deg, rgba(255,255,255,0.95) 0%, rgba(245,240,236,0.86) 100%);
}

body[data-page="dashboard"] .wa-qr-frame {
  background:
    linear-gradient(#FFFFFF, #FFFFFF) padding-box,
    linear-gradient(135deg, rgba(0,212,170,0.2), rgba(74,144,226,0.18)) border-box;
  border: 1px dashed transparent;
}

body[data-page="dashboard"] .bubble.customer,
body[data-page="dashboard"] .preview-bubble.user {
  background: #FFFFFF;
}

@keyframes vectorFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -14px, 0) rotate(6deg);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

@keyframes orbPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 14px 28px rgba(74,144,226,0.34);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 20px 34px rgba(74,144,226,0.42);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 14px 28px rgba(74,144,226,0.34);
  }
}

@media (max-width: 768px) {
  body[data-page="dashboard"] .dashboard-vectors {
    inset: 0;
  }

  body[data-page="dashboard"] .brand-orb {
    width: 74px;
    height: 74px;
    top: 78px;
    left: 22px;
  }

  body[data-page="dashboard"] .brand-chat-bubble {
    inset: 15px 17px 18px 17px;
  }

  body[data-page="dashboard"] .blob-one {
    width: 200px;
    height: 200px;
    right: -16px;
  }
}

/* Mirror dashboard palette + vectors on all app pages */
body[data-page] {
  background:
    radial-gradient(circle at 50% 46%, rgba(245,240,236,0.96) 0%, rgba(245,240,236,0.86) 24%, rgba(245,240,236,0.4) 50%, rgba(245,240,236,0) 74%),
    radial-gradient(circle at 0% 100%, rgba(212,184,232,0.72) 0%, rgba(212,184,232,0) 58%),
    radial-gradient(circle at 100% 100%, rgba(248,232,224,0.75) 0%, rgba(248,232,224,0) 56%),
    linear-gradient(135deg, #A8C8F0 0%, #B8E8E0 100%);
}

body[data-page] .app-main {
  position: relative;
  background: transparent;
  isolation: isolate;
}

body[data-page] .app-main::before,
body[data-page] .app-main::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body[data-page] .app-main::before {
  width: 300px;
  height: 300px;
  right: 34px;
  top: 78px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.58), rgba(255,255,255,0.06));
  animation: vectorFloat 14s ease-in-out infinite;
}

body[data-page] .app-main::after {
  width: 230px;
  height: 230px;
  left: calc(var(--sidebar-width) + 26px);
  bottom: 70px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.5), rgba(255,255,255,0.08));
  animation: vectorFloat 17s ease-in-out -6s infinite;
}

body[data-page] .app-main > *:not(.dashboard-vectors) {
  position: relative;
  z-index: 1;
}

body[data-page] .sidebar-logo span {
  color: #0F7A6E;
}

body[data-page] .sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(234,248,247,0.72) 100%);
  border-right: 1px solid rgba(15,122,110,0.18);
  backdrop-filter: blur(14px);
  box-shadow: 8px 0 28px rgba(15,23,42,0.08);
}

body[data-page] .sidebar-logo {
  border-bottom-color: rgba(15,122,110,0.14);
}

body[data-page] .sidebar-menu-label {
  color: rgba(51,65,85,0.66);
}

body[data-page] .nav-item {
  color: #334155;
  border-left-width: 4px;
}

body[data-page] .nav-item:hover {
  color: #0F7A6E;
  background: rgba(255,255,255,0.64);
}

body[data-page] .nav-item.active {
  color: #0F7A6E;
  background: rgba(0,212,170,0.22);
  border-left-color: #00D4AA;
}

body[data-page] .sidebar-profile {
  border-top-color: rgba(15,122,110,0.14);
  background: rgba(255,255,255,0.55);
}

body[data-page] .profile-name {
  color: #1F2937;
}

body[data-page] .profile-plan-badge {
  background: rgba(0,212,170,0.16);
  color: #0F7A6E;
}

body[data-page] .logout-btn {
  color: #64748B;
}

body[data-page] .logout-btn:hover {
  color: #0F7A6E;
  background: rgba(0,212,170,0.16);
}

body[data-page] .profile-avatar,
body[data-page] .top-avatar,
body[data-page] .stat-icon,
body[data-page] .icon-messages,
body[data-page] .icon-customers,
body[data-page] .icon-response,
body[data-page] .icon-revenue {
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
  color: #FFFFFF;
}

body[data-page] .card {
  background: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 10px 26px rgba(15,23,42,0.08);
  backdrop-filter: blur(8px);
}

body[data-page] .btn-primary {
  background: linear-gradient(180deg, #00D4AA 0%, #4A90E2 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 16px rgba(74,144,226,0.24);
}

body[data-page] .bubble.customer,
body[data-page] .preview-bubble.user {
  background: #FFFFFF;
}

@media (max-width: 768px) {
  body[data-page] .app-main::before {
    width: 180px;
    height: 180px;
    right: -20px;
    top: 90px;
  }

  body[data-page] .app-main::after {
    width: 160px;
    height: 160px;
    left: 8px;
    bottom: 12px;
  }
}

/* Service Variants Section */
body[data-page] .variants-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #F8FAFC;
  border-radius: 8px;
  cursor: pointer;
  margin: 16px 0;
}

body[data-page] .variants-toggle input {
  display: none;
}

body[data-page] .toggle-switch {
  width: 40px;
  height: 22px;
  background: #CBD5E1;
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

body[data-page] .toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

body[data-page] .variants-toggle input:checked + .toggle-switch {
  background: #0F4C45;
}

body[data-page] .variants-toggle input:checked + .toggle-switch::after {
  transform: translateX(18px);
}

body[data-page] .toggle-text {
  font-size: 14px;
  color: #374151;
}

body[data-page] .variants-section {
  display: none;
  margin-bottom: 16px;
}

body[data-page] .variants-section.show {
  display: block;
}

body[data-page] .variants-grid-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 80px 32px;
  gap: 8px;
  font-size: 12px;
  color: #64748B;
  padding: 8px 0;
  font-weight: 500;
}

body[data-page] .service-variant-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 80px 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

body[data-page] .service-variant-row input[type="text"],
body[data-page] .service-variant-row input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  background: white;
}

body[data-page] .service-variant-row input:focus {
  border-color: #0F4C45;
  outline: none;
}

body[data-page] .service-variant-row .toggle-switch {
  width: 36px;
  height: 20px;
}

body[data-page] .service-variant-row .toggle-switch::after {
  width: 14px;
  height: 14px;
  top: 3px;
  left: 3px;
}

body[data-page] .service-variant-row input:checked + .toggle-switch {
  background: #0F4C45;
}

body[data-page] .service-variant-row input:checked + .toggle-switch::after {
  transform: translateX(16px);
}

body[data-page] .btn-remove-variant {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-page] .btn-remove-variant:hover {
  color: #EF4444;
}

body[data-page] .btn-add-variant {
  background: none;
  border: none;
  color: #0F4C45;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  margin-top: 4px;
}

body[data-page] .btn-add-variant:hover {
  text-decoration: underline;
}

/* Staff Section */
body[data-page] .staff-row {
  display: grid;
  grid-template-columns: 1fr 1fr 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

body[data-page] .staff-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  background: white;
}

body[data-page] .staff-row input:focus {
  border-color: #0F4C45;
  outline: none;
}

body[data-page] .btn-remove-staff {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-page] .btn-remove-staff:hover {
  color: #EF4444;
}

body[data-page] .btn-add-staff {
  background: none;
  border: none;
  color: #0F4C45;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  margin-top: 4px;
}

body[data-page] .btn-add-staff:hover {
  text-decoration: underline;
}
