:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #101828;
  --muted: #667085;
  --primary: #0f766e;
  --primary-dark: #0b4f4a;
  --primary-soft: #e6fffb;
  --blue: #2563eb;
  --purple: #7c3aed;
  --green: #16a34a;
  --orange: #ea580c;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --sidebar: #0b1220;
  --sidebar-2: #101828;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-xs: 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-sm: 0 8px 22px rgba(16, 24, 40, .08);
  --shadow-md: 0 18px 45px rgba(16, 24, 40, .12);
  --content-max: 1680px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* v72 - Marketing center redesign */
.marketing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(14, 165, 233, .18);
  background: linear-gradient(135deg, rgba(240, 249, 255, .96), rgba(236, 253, 245, .92));
  border-radius: 8px;
  margin-bottom: 16px;
}
.marketing-hero h1 { margin: 6px 0 8px; font-size: clamp(1.55rem, 2.5vw, 2.35rem); font-weight: 900; color: #0f172a; }
.marketing-hero p { margin: 0; color: #475569; max-width: 760px; line-height: 1.9; }
.marketing-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.marketing-flow, .marketing-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.flow-step, .kpi-card {
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
}
.flow-step { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px; }
.flow-step span { grid-row: 1 / span 2; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #0f766e; color: #fff; font-weight: 900; }
.flow-step strong { font-size: .98rem; }
.flow-step small, .kpi-card small { color: #64748b; }
.kpi-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.kpi-card span { color: #475569; font-weight: 800; }
.kpi-card strong { font-size: 2rem; line-height: 1; font-weight: 950; }
.marketing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.marketing-panel { border: 1px solid rgba(148, 163, 184, .22); border-radius: 8px; background: rgba(255,255,255,.96); padding: 18px; margin-bottom: 18px; }
.priority-panel { border-color: rgba(20, 184, 166, .35); }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-title-row h2 { font-size: 1.2rem; margin: 2px 0 0; font-weight: 900; color: #0f172a; }
.action-list, .opportunity-list, .delivery-list { display: flex; flex-direction: column; gap: 10px; }
.action-item, .opportunity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, .16);
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
}
.action-item strong, .opportunity-row strong { display: block; font-weight: 900; }
.action-item small, .opportunity-row small { display: block; color: #64748b; line-height: 1.7; }
.action-item > span, .opportunity-row > span { flex: 0 0 auto; border-radius: 999px; background: #e0f2fe; color: #075985; padding: 7px 10px; font-weight: 900; font-size: .82rem; }
.campaign-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.campaign-overview-card { border: 1px solid rgba(148, 163, 184, .24); border-radius: 8px; padding: 14px; background: #fff; }
.campaign-card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.campaign-card-head strong { display: block; font-weight: 900; color: #0f172a; }
.campaign-card-head small { display: block; color: #64748b; line-height: 1.65; margin-top: 4px; }
.status-pill { align-self: flex-start; border-radius: 999px; padding: 6px 9px; font-size: .78rem; font-weight: 900; background: #fee2e2; color: #991b1b; }
.status-pill.ok { background: #dcfce7; color: #166534; }
.campaign-mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.campaign-mini-stats span { border-radius: 8px; background: #f8fafc; padding: 9px 6px; text-align: center; }
.campaign-mini-stats b { display: block; font-size: 1.15rem; }
.campaign-mini-stats small { color: #64748b; font-size: .76rem; }
.campaign-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.campaign-card-actions a { text-align: center; text-decoration: none; border: 1px solid rgba(14, 165, 233, .22); border-radius: 8px; padding: 9px 8px; color: #075985; font-weight: 900; background: #f0f9ff; }
.split-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.split-stat span, .delivery-row { border-radius: 8px; background: #f8fafc; padding: 12px; }
.split-stat b { display: block; font-size: 1.65rem; color: #0f172a; }
.split-stat small, .delivery-row small { color: #64748b; display: block; }
.delivery-row strong { display: block; color: #0f172a; }
.empty-state { padding: 16px; border-radius: 8px; background: #f8fafc; color: #64748b; text-align: center; }
.compact-marketing-hero { padding: 20px; }
.compact-marketing-hero h1 { font-size: clamp(1.45rem, 2.1vw, 2rem); }
.campaign-workflow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.campaign-builder-clean { padding: 0; overflow: hidden; }
.campaign-builder-clean > .section-title-row { padding: 18px 18px 0; }
.campaign-form-clean { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.form-section-card {
  border: 1px solid rgba(148, 163, 184, .22);
  background: #fff;
  border-radius: 8px;
  padding: 16px;
}
.form-section-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
}
.advanced-campaign-settings {
  border: 1px dashed rgba(15, 118, 110, .32);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0;
}
.advanced-campaign-settings summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
  color: #0f766e;
}
.advanced-campaign-settings .form-grid { padding: 0 16px 16px; }
.campaign-save-bar {
  position: sticky;
  bottom: calc(76px + var(--safe-bottom));
  z-index: 5;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
}
.campaign-management-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-actions, .four-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.campaign-card-actions form { margin: 0; }
.campaign-card-actions button {
  width: 100%;
  border: 1px solid rgba(14, 165, 233, .22);
  border-radius: 8px;
  padding: 9px 8px;
  color: #075985;
  font-weight: 900;
  background: #f0f9ff;
}
.campaign-card-actions button.danger { background: #fff1f2; color: #be123c; border-color: rgba(244, 63, 94, .22); }
.compact-history-panel { margin-bottom: 90px; }
.ad-composer-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 14px; }
.ad-composer-grid .form-section-card { grid-column: 1; }
.ad-composer-grid .wide { grid-column: 1 / -1; }
.telegram-preview-card {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  position: sticky;
  top: 18px;
  border: 1px solid rgba(20, 184, 166, .28);
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}
.telegram-preview {
  margin-top: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .24);
  padding: 16px;
}
.telegram-preview strong { display: block; color: #0f172a; font-size: 1.05rem; }
.telegram-preview p { color: #475569; line-height: 1.8; margin: 10px 0 14px; white-space: pre-wrap; }
.ad-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-linked-campaign {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0fdfa;
  color: #115e59;
  margin-bottom: 12px;
}
.ad-linked-campaign b { font-weight: 900; }
.ad-linked-campaign small { color: #0f766e; }
@media (max-width: 1199px) {
  .marketing-hero, .section-title-row { flex-direction: column; align-items: stretch; }
  .marketing-hero-actions { justify-content: stretch; }
  .marketing-hero-actions .btn { flex: 1; }
  .marketing-flow, .marketing-kpis, .marketing-grid, .campaign-card-grid, .campaign-management-grid, .ad-card-grid, .ad-composer-grid { grid-template-columns: 1fr; }
  .telegram-preview-card { grid-column: auto; grid-row: auto; position: static; }
  .campaign-save-bar { position: static; flex-direction: column; }
  .three-actions, .four-actions { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 118, 110, .10), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(37, 99, 235, .10), transparent 26%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
img { max-width: 100%; }
code { direction: ltr; unicode-bidi: plaintext; }
.muted { color: var(--muted) !important; }
.small, small { font-size: 12px; }

h1, h2, h3, h4 { color: var(--text); font-weight: 900; letter-spacing: -.35px; }
h1 { margin: 0 0 8px; font-size: clamp(24px, 2.5vw, 38px); }
h2 { margin: 0 0 16px; font-size: clamp(18px, 1.55vw, 25px); }
h3 { margin: 0 0 12px; font-size: 17px; }

/* ===== Layout ===== */
.admin-shell { padding: 0; }
.app-sidebar {
  position: fixed;
  inset: 18px 18px 18px auto;
  width: 308px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(18, 32, 55, .98), rgba(11, 18, 32, .98)),
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, .20), transparent 32%);
  box-shadow: 0 30px 80px rgba(16, 24, 40, .22);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 14px;
  color: #fff;
}
.sidebar-brand.compact { padding: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  box-shadow: 0 16px 35px rgba(20,184,166,.25);
  font-size: 22px;
}
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong, .brand-copy h5 { font-weight: 900; }
.brand-copy span { color: rgba(255,255,255,.62); font-size: 12px; }

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 16px 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  color: #fff;
  background: rgba(255,255,255,.06);
}
.avatar, .user-chip > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-weight: 900;
}
.sidebar-profile strong { display: block; font-size: 14px; }
.sidebar-profile small { color: rgba(255,255,255,.60); }

.sidebar-nav, .mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 14px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.24) transparent;
}
.sidebar-nav { flex: 1; }
.nav-group-label {
  margin: 14px 10px 6px;
  color: rgba(255,255,255,.42);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .6px;
}
.sidebar-nav a, .mobile-menu-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 15px;
  color: rgba(255,255,255,.78);
  font-weight: 800;
  font-size: 13.5px;
  transition: .16s ease;
}
.sidebar-nav a span, .mobile-menu-list a span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,.075);
}
.sidebar-nav a:hover, .sidebar-nav a.active,
.mobile-menu-list a:hover, .mobile-menu-list a.active {
  color: #fff;
  background: rgba(255,255,255,.12);
  transform: translateX(-2px);
}
.sidebar-nav a.active { box-shadow: inset -3px 0 0 #14b8a6; }
.sidebar-footer { padding: 12px 14px 18px; }
.logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  color: #fff !important;
  background: rgba(220, 38, 38, .18) !important;
}

.main-layout {
  min-height: 100vh;
  margin-right: 344px;
  padding: 18px 22px 54px;
}
.app-topbar {
  position: sticky;
  top: 18px;
  z-index: 30;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  min-height: 74px;
  margin: 0 auto 22px;
  padding: 12px 16px;
  border: 1px solid rgba(228, 231, 236, .88);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}
.app-topbar .eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.app-topbar strong { font-weight: 900; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px 4px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
}
.user-chip > span { background: linear-gradient(135deg, var(--primary), var(--blue)); }
.page-container { max-width: var(--content-max); margin: 0 auto; }
.content.app-content { margin-right: 0; padding: 0; max-width: none; }

/* ===== Mobile / Tablet ===== */
.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(228, 231, 236, .85);
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(14px);
}
.menu-trigger, .topbar-icon-link {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
}
.mobile-brand { display: grid; text-align: center; }
.mobile-brand strong { font-weight: 900; }
.mobile-brand small { color: var(--muted); }
.app-offcanvas { background: var(--sidebar); color: #fff; }
.app-offcanvas .btn-close { filter: invert(1); opacity: .9; }
.mobile-menu-list { padding: 0; max-height: calc(100vh - 105px); }
.mobile-bottom-nav {
  position: fixed;
  right: 10px;
  left: 10px;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(228, 231, 236, .95);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}
.mobile-bottom-nav a {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 48px;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}
.mobile-bottom-nav a:hover, .mobile-bottom-nav a.active { color: var(--primary); background: var(--primary-soft); }
.mobile-bottom-nav span { font-size: 18px; line-height: 1; }

/* ===== Page building blocks ===== */
.page-header, .page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-header p, .page-heading p { margin: 4px 0 0; }
.panel, .card-section {
  margin: 18px 0;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(228, 231, 236, .92);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
}
.panel.highlight, .card-section.highlight, .highlight {
  border-color: rgba(15, 118, 110, .25);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(236,253,245,.78));
}
.compact-panel { padding: 18px; }
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.notice, .alert, .admin-alert {
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 800;
}
.ok-note, .success-note, .alert-success { background: #ecfdf3 !important; color: #027a48 !important; border-color: #abefc6 !important; }
.danger-note, .alert-danger { background: #fef3f2 !important; color: #b42318 !important; border-color: #fecdca !important; }
.alert-warning { background: #fffaeb !important; color: #b54708 !important; border-color: #fedf89 !important; }

/* ===== Stats / cards ===== */
.cards, .stats-grid, .dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.card, .stat-card {
  position: relative;
  min-height: 124px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(228, 231, 236, .92) !important;
  border-radius: var(--radius-lg) !important;
  background: #fff !important;
  box-shadow: var(--shadow-sm);
}
.card::before, .stat-card::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  left: -35px;
  bottom: -42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, .20), transparent 70%);
}
.card span, .stat-card span { display: block; color: var(--muted); font-weight: 900; }
.card strong, .stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(25px, 2.4vw, 38px);
  line-height: 1.05;
  font-weight: 950;
}
.card small, .stat-card small { color: var(--muted); }
.money-card strong, .status-word { font-size: clamp(18px, 2vw, 28px) !important; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.compact-dual-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

/* ===== Tables ===== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(228, 231, 236, .95);
  border-radius: var(--radius);
  background: #fff;
}
table, .table {
  width: 100%;
  min-width: 780px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
}
th, td, .table > :not(caption) > * > * {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle;
  text-align: right;
  background: transparent;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475467;
  font-size: 12.5px;
  font-weight: 950;
  background: #f9fafb !important;
  white-space: nowrap;
}
tr:last-child td { border-bottom: 0 !important; }
tr:hover td { background: #fcfcfd; }
.compact-table th, .compact-table td,
.admin-compact-table th, .admin-compact-table td { padding: 10px 10px; font-size: 13px; }
.compact-table-wrap table { min-width: 420px; }
.category-table-wrap table { min-width: 960px; }
.content-table { min-width: 960px; }
.amount-pill, .badge, .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #eff4ff;
  color: #3538cd;
  border: 1px solid #d1e0ff;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.badge.ok, .badge.bg-success, .badge.success { background: #ecfdf3 !important; color: #027a48 !important; border-color: #abefc6 !important; }
.badge.off, .badge.danger, .badge.bg-danger { background: #fef3f2 !important; color: #b42318 !important; border-color: #fecdca !important; }
.badge.bg-warning { background: #fffaeb !important; color: #b54708 !important; border-color: #fedf89 !important; }
.amount-pill { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }

/* ===== Buttons ===== */
.btn, button, .mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 15px;
  border: 0 !important;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #14b8a6);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .18);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  transition: .16s ease;
}
.btn:hover, button:hover, .mini:hover { transform: translateY(-1px); filter: brightness(.98); box-shadow: 0 16px 32px rgba(15,118,110,.20); }
button:disabled, .btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary, .btn-main { background: linear-gradient(135deg, var(--primary), #14b8a6) !important; }
.btn-success { background: linear-gradient(135deg, #15803d, #22c55e) !important; }
.btn-warning, .btn-secondary-custom, .btn.secondary, .secondary { background: linear-gradient(135deg, #475467, #667085) !important; color: #fff !important; }
.btn-danger, .btn-danger-custom, button.danger, .danger { background: linear-gradient(135deg, var(--danger), #ef4444) !important; color: #fff !important; }
.btn-soft, .btn.ghost, .ghost {
  background: #f2f4f7 !important;
  color: var(--text) !important;
  box-shadow: none !important;
  border: 1px solid var(--border) !important;
}
.btn-sm, .btn-sm-fixed { min-height: 36px; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; }
.btn-equal { min-width: 160px; }
.wide-btn { width: 100%; }
.quick-actions, .server-actions, .inline-actions, .coupon-actions, .horizontal-actions, .form-actions-bar, .update-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.action-grid, .dashboard-secondary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.action-grid .btn { width: 100%; }
.action-stack, .compact-actions, .equal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.action-stack form, .inline-actions form, .coupon-actions form, .update-actions form { margin: 0; }
.equal-actions .btn, .equal-actions button, .equal-actions .mini { min-width: 108px; }

/* ===== Forms ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 15px;
  align-items: end;
}
.compact-form-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.stack-form, .login-form { display: grid; gap: 14px; }
.form-grid label, .stack-form label, .login-form label, .filter-row label, .inline-form label, .coupon-form label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 900;
}
.form-grid input, .form-grid select, .form-grid textarea,
.stack-form input, .stack-form select, .stack-form textarea,
.login-form input, .login-form select, .login-form textarea,
.filter-row input, .filter-row select,
.inline-form input, .inline-form select,
.coupon-form input,
.row-form input, .small-form input, .coupon-form input,
.table-input-sm, .table-input-md, .table-input-lg {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: .14s ease;
}
.form-grid textarea, .stack-form textarea, .login-form textarea { min-height: 112px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus,
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus,
.login-form input:focus, .filter-row input:focus, .filter-row select:focus {
  border-color: rgba(15,118,110,.55);
  box-shadow: 0 0 0 4px rgba(15,118,110,.10);
}
.wide, .form-grid .wide { grid-column: 1 / -1; }
.check, .switch-line {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row !important;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font-weight: 900;
}
.check input, .switch-line input { width: auto !important; min-height: auto !important; }
.emoji-input { text-align: center; font-size: 20px; }
.table-input-sm { max-width: 70px; }
.table-input-md { min-width: 160px; }
.table-input-lg { min-width: 280px; }
.filter-row, .inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.filter-row label, .inline-form label { min-width: 180px; }
.row-form { display: grid; grid-template-columns: 80px 170px minmax(240px, 1fr) 90px; gap: 9px; align-items: center; }
.row-form.stacked { grid-template-columns: repeat(2, minmax(160px, 1fr)); min-width: 480px; }

/* ===== Dashboard extras ===== */
.compact-overview-panel { margin-top: 22px; }
.dashboard-actions-panel { background: linear-gradient(135deg, #ffffff, #f8fafc); }
.status-cell { white-space: nowrap; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
}
.chip b { color: var(--primary); }
.telegram-preview {
  max-width: 520px;
  padding: 18px;
  border: 1px solid #d0d5dd;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-xs);
}
.telegram-preview strong { display: block; margin-bottom: 8px; }
.preview-card { border-style: dashed; }
.server-status { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.server-status .wide { grid-column: 1 / -1; }

/* ===== Auth / public pages ===== */
.login-body, .coupon-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 22% 12%, rgba(20,184,166,.20), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(37,99,235,.18), transparent 28%),
    linear-gradient(135deg, #0b1220, #101828 48%, #0f766e);
}
.login-card, .coupon-card {
  width: min(100%, 520px);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}
.merchant-auth-card { width: min(100%, 760px); }
.login-logo, .coupon-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  font-size: 30px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.login-brand span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: var(--primary-soft);
  font-size: 26px;
}
.login-links a { color: var(--primary); font-weight: 900; }
.coupon-code {
  padding: 14px;
  margin: 14px 0;
  border: 1px dashed var(--primary);
  border-radius: 18px;
  background: #f0fdfa;
  color: var(--primary-dark);
  text-align: center;
  font-weight: 950;
  font-size: 22px;
  direction: ltr;
}
.qr { display: block; width: 220px; height: 220px; object-fit: contain; margin: 12px auto; }

/* ===== Merchant standalone dashboard ===== */
.merchant-shell { background: var(--bg); }
.merchant-dashboard-content {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 24px;
}

/* ===== Responsive ===== */
@media (max-width: 1399px) {
  .cards, .stats-grid, .dashboard-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .main-layout { margin-right: 0; padding: 18px 16px 96px; }
  .page-container { max-width: 100%; }
  .cards, .stats-grid, .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-dual-tables, .grid { grid-template-columns: 1fr; }
  .page-header, .page-heading { margin-top: 10px; }
}
@media (max-width: 767px) {
  body { background: #f8fafc; }
  .main-layout { padding: 14px 10px 94px; }
  .panel, .card-section { padding: 14px; border-radius: 20px; margin: 14px 0; }
  .cards, .stats-grid, .dashboard-cards { grid-template-columns: 1fr; gap: 12px; }
  .card, .stat-card { min-height: 112px; padding: 16px; }
  .form-grid, .compact-form-grid { grid-template-columns: 1fr; }
  .filter-row, .inline-form, .quick-actions, .server-actions, .inline-actions, .coupon-actions, .horizontal-actions, .form-actions-bar, .update-actions { align-items: stretch; }
  .filter-row label, .inline-form label { min-width: 100%; }
  .btn, button, .mini { width: 100%; min-height: 44px; }
  .topbar-actions { display: none; }
  .page-header, .page-heading, .section-title-row { display: block; }
  .table-wrap { border-radius: 16px; }
  table, .table { min-width: 760px; }
  th, td, .table > :not(caption) > * > * { padding: 10px 9px; font-size: 12.5px; }
  .server-status { grid-template-columns: 1fr; }
  .server-status .wide { grid-column: auto; }
  .row-form, .row-form.stacked { grid-template-columns: 1fr; min-width: 0; }
  .login-body, .coupon-body { padding: 14px; align-items: start; }
  .login-card, .coupon-card { margin-top: 28px; border-radius: 24px; }
  .merchant-dashboard-content { padding: 12px 10px 90px; }
}
@media (max-width: 420px) {
  .mobile-bottom-nav { right: 6px; left: 6px; border-radius: 20px; }
  .mobile-bottom-nav a { min-height: 44px; font-size: 11px; }
  h1 { font-size: 23px; }
}

@media print {
  .app-sidebar, .app-topbar, .mobile-topbar, .mobile-bottom-nav, .sidebar-footer, .btn, button { display: none !important; }
  .main-layout { margin: 0; padding: 0; }
  .panel, .card, .stat-card { box-shadow: none; border: 1px solid #ddd; }
}
.check-row {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row !important;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font-weight: 900;
}
.check-row input { width: auto !important; min-height: auto !important; }

/* =========================================================
   v37 critical layout fix: do not depend on Bootstrap d-* or offcanvas classes
   ========================================================= */
.desktop-sidebar { display: flex !important; }
.desktop-topbar { display: flex !important; }
.mobile-only { display: none !important; }

.app-sidebar {
  position: fixed !important;
  top: 18px !important;
  right: 18px !important;
  bottom: 18px !important;
  left: auto !important;
  width: 308px !important;
  height: auto !important;
  z-index: 50 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.sidebar-nav {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.sidebar-nav a,
.mobile-menu-list a {
  display: flex !important;
  flex-direction: row !important;
  width: 100% !important;
  white-space: nowrap !important;
}
.main-layout {
  margin-right: 344px !important;
  margin-left: 0 !important;
}
.app-topbar {
  display: flex !important;
  flex-direction: row !important;
}

.mobile-drawer,
.mobile-menu-backdrop {
  display: none !important;
}
.mobile-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(88vw, 360px) !important;
  z-index: 200 !important;
  overflow-y: auto !important;
  padding: 14px !important;
  background: var(--sidebar) !important;
  color: #fff !important;
  transform: translateX(105%);
  transition: transform .22s ease;
  box-shadow: -22px 0 70px rgba(15, 23, 42, .24);
}
.mobile-drawer-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 6px 16px !important;
}
.menu-close {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
  font-size: 26px !important;
  line-height: 1 !important;
}
.mobile-menu-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 190 !important;
  background: rgba(15, 23, 42, .50) !important;
  backdrop-filter: blur(3px);
}
body.mobile-menu-open .mobile-drawer {
  display: block !important;
  transform: translateX(0) !important;
}
body.mobile-menu-open .mobile-menu-backdrop {
  display: block !important;
}

@media (max-width: 1199px) {
  .desktop-sidebar,
  .desktop-topbar,
  .app-sidebar.desktop-sidebar {
    display: none !important;
  }
  .mobile-only,
  .mobile-topbar.mobile-only,
  .mobile-bottom-nav.mobile-only {
    display: flex !important;
  }
  .mobile-drawer.mobile-only,
  .mobile-menu-backdrop.mobile-only {
    display: none !important;
  }
  .main-layout {
    margin-right: 0 !important;
    padding-top: 16px !important;
  }
  .mobile-menu-list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }
}

/* ===== v66 Keep mobile topbar order stable at every viewport width ===== */
.mobile-topbar.mobile-only,
.merchant-mobile-topbar.mobile-only {
  grid-template-columns: 48px minmax(0, 1fr) 48px !important;
  grid-template-rows: 48px !important;
  direction: ltr !important;
  align-items: center !important;
  align-content: center !important;
}

.mobile-topbar .logout-icon,
.merchant-mobile-topbar .logout-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
}

.mobile-topbar .mobile-brand,
.merchant-mobile-topbar .mobile-brand {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: center !important;
}

.mobile-topbar .menu-trigger,
.merchant-mobile-topbar .menu-trigger {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
}

.mobile-topbar .topbar-icon-link.logout-icon,
.merchant-mobile-topbar .topbar-icon-link.logout-icon {
  background: linear-gradient(145deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
}

.mobile-topbar .logout-icon .power-svg,
.merchant-mobile-topbar .logout-icon .power-svg {
  stroke: #fff !important;
}

/* ===== v70 Bot control polish ===== */
.bot-control-hero {
  align-items: stretch !important;
}

.bot-hero-state {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: min(320px, 100%);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.bot-hero-state span,
.bot-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.bot-hero-state strong {
  font-size: 28px;
  line-height: 1.1;
}

.bot-hero-state small {
  color: var(--muted);
  line-height: 1.55;
  font-weight: 800;
}

.bot-hero-state.running,
.bot-status-card.ok {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #fff, #f0fdf4);
}

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

.bot-status-card {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.bot-status-card strong {
  font-size: 24px;
  line-height: 1.2;
  word-break: break-word;
}

.bot-status-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.bot-status-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.bot-action-panel .section-title-row {
  margin-bottom: 12px;
}

.bot-readiness-panel .section-title-row {
  align-items: center;
  margin-bottom: 12px;
}

.compact-actions {
  justify-content: end;
}

.bot-readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.readiness-item {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.readiness-item.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.readiness-item.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.readiness-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.readiness-item strong {
  font-size: 20px;
  line-height: 1.2;
  word-break: break-word;
}

.readiness-item small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
  word-break: break-word;
}

.bot-actions-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-monitor-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .75fr);
}

.bot-log-box {
  max-height: 460px;
  white-space: pre-wrap;
}

.bot-tips-panel .notes {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .bot-status-grid,
  .bot-actions-row,
  .bot-monitor-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== v69 Dashboard daily pulse ===== */
.dashboard-pulse-panel {
  display: grid;
  grid-template-columns: minmax(190px, .75fr) minmax(0, 2fr);
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--primary-soft) 70%, #fff));
  box-shadow: var(--shadow-xs);
}

.pulse-head {
  display: grid;
  align-content: center;
  gap: 6px;
  padding-inline: 4px;
}

.pulse-head span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
}

.pulse-head strong {
  font-size: 18px;
  line-height: 1.45;
}

.pulse-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.pulse-list a {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 13px;
  color: var(--text) !important;
  text-decoration: none !important;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
}

.pulse-list a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
}

.pulse-list b {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.pulse-list span {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.pulse-list small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .dashboard-pulse-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .dashboard-pulse-panel {
    padding: 13px;
    border-radius: 18px;
  }

  .pulse-list {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pulse-list a {
    min-height: 86px;
    padding: 11px;
  }
}

/* ===== v68 Dashboard command center polish ===== */
.dashboard-hero {
  align-items: stretch !important;
  gap: 18px !important;
}

.dashboard-hero > div:first-child {
  display: grid;
  align-content: center;
  gap: 8px;
}

.dashboard-hero .quick-actions {
  align-content: center;
  min-width: min(310px, 100%);
}

.dashboard-command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: -4px 0 16px;
}

.command-tile {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 16px;
  color: var(--text) !important;
  text-decoration: none !important;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.command-tile:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.command-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.command-tile strong {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
  letter-spacing: 0;
}

.command-tile small {
  color: var(--muted);
  font-weight: 800;
}

.command-tile.primary {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--primary-soft) 64%, #fff));
}

.decision-grid-priority {
  grid-template-columns: minmax(280px, 1.2fr) repeat(auto-fit, minmax(230px, 1fr));
}

.decision-card.featured {
  border-width: 2px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .09);
}

.decision-card.featured .decision-card-head strong {
  font-size: 18px;
}

.decision-card .btn {
  min-height: 40px;
}

.dashboard-cards .card {
  min-height: 132px;
  align-content: space-between;
}

.compact-overview-panel {
  overflow: hidden;
}

@media (max-width: 980px) {
  .dashboard-command-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid-priority {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .dashboard-hero {
    text-align: right;
  }

  .dashboard-hero .quick-actions {
    width: 100%;
  }

  .dashboard-command-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .command-tile {
    min-height: 92px;
    padding: 13px;
    border-radius: 16px;
  }

  .command-tile strong {
    font-size: 24px;
  }
}

/* ===== v67 Final topbar order lock ===== */
.mobile-topbar.mobile-only,
.merchant-mobile-topbar.mobile-only {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 48px !important;
  grid-template-rows: 48px !important;
  direction: ltr !important;
  align-items: center !important;
  align-content: center !important;
  justify-items: center !important;
}

.mobile-topbar .logout-icon,
.merchant-mobile-topbar .logout-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
}

.mobile-topbar .mobile-brand,
.merchant-mobile-topbar .mobile-brand {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: center !important;
}

.mobile-topbar .menu-trigger,
.merchant-mobile-topbar .menu-trigger {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
}

.mobile-topbar .topbar-icon-link.logout-icon,
.merchant-mobile-topbar .topbar-icon-link.logout-icon {
  background: linear-gradient(145deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .34) !important;
}

.mobile-topbar .logout-icon .power-svg,
.merchant-mobile-topbar .logout-icon .power-svg {
  stroke: #fff !important;
}

@media (min-width: 1200px) {
  .mobile-only,
  .mobile-topbar,
  .mobile-bottom-nav,
  .mobile-drawer,
  .mobile-menu-backdrop {
    display: none !important;
  }
}


/* =========================================================
   v38 premium color theme + merchant portal alignment
   لتغيير الألوان لاحقاً: عدّل المتغيرات التالية فقط
   ========================================================= */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-dark: #312e81;
  --primary-soft: #eef2ff;
  --accent: #f59e0b;
  --accent-soft: #fffbeb;
  --blue: #2563eb;
  --purple: #7c3aed;
  --green: #16a34a;
  --orange: #ea580c;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --sidebar: #111827;
  --sidebar-2: #1e1b4b;
}
body {
  background:
    radial-gradient(circle at 9% 8%, rgba(79,70,229,.13), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(245,158,11,.13), transparent 24%),
    linear-gradient(180deg, #fbfbff 0%, var(--bg) 100%) !important;
}
.app-sidebar {
  background:
    linear-gradient(180deg, rgba(30,27,75,.98), rgba(17,24,39,.98)),
    radial-gradient(circle at 18% 0%, rgba(245,158,11,.18), transparent 34%) !important;
}
.brand-mark, .login-logo, .coupon-logo {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  box-shadow: 0 18px 40px rgba(79,70,229,.24) !important;
}
.sidebar-nav a.active { box-shadow: inset -3px 0 0 var(--accent) !important; }
.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active { color: var(--primary) !important; background: var(--primary-soft) !important; }
.panel.highlight,
.card-section.highlight,
.highlight {
  border-color: rgba(79,70,229,.22) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(238,242,255,.78)) !important;
}
.card::before,
.stat-card::before { background: radial-gradient(circle, rgba(79,70,229,.18), transparent 70%) !important; }
.amount-pill { background: var(--primary-soft) !important; color: var(--primary-dark) !important; border-color: #c7d2fe !important; }
.btn, button, .mini,
.btn-primary, .btn-main { background: linear-gradient(135deg, var(--primary), #7c3aed) !important; box-shadow: 0 12px 26px rgba(79,70,229,.20) !important; }
.btn:hover, button:hover, .mini:hover { box-shadow: 0 18px 36px rgba(79,70,229,.22) !important; }
.btn-soft, .btn.ghost, .ghost { background: #f8fafc !important; color: var(--text) !important; box-shadow: none !important; border: 1px solid var(--border) !important; }
.badge, .pill { background: var(--primary-soft); color: var(--primary-dark); border-color: #c7d2fe; }
.premium-pill { background: var(--accent-soft) !important; color: #92400e !important; border-color: #fde68a !important; }
.login-body, .coupon-body {
  background:
    radial-gradient(circle at 22% 12%, rgba(79,70,229,.26), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(245,158,11,.20), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e1b4b 52%, #312e81) !important;
}

/* Merchant auth redesigned */
.auth-split-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 18px;
  align-items: stretch;
}
.auth-hero-panel,
.auth-form-panel,
.solo-auth-card,
.modern-coupon-card {
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 32px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 32px 90px rgba(0,0,0,.26);
}
.auth-hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: clamp(26px, 4vw, 42px);
  color: #fff;
  background:
    radial-gradient(circle at 10% 10%, rgba(245,158,11,.26), transparent 32%),
    linear-gradient(150deg, #111827, #1e1b4b 48%, #4f46e5) !important;
}
.auth-hero-panel::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  left: -75px;
  bottom: -85px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
}
.auth-hero-panel h1 { color: #fff; margin-top: 22px; max-width: 520px; }
.auth-hero-panel p { color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.9; max-width: 520px; }
.large-mark { width: 70px !important; height: 70px !important; border-radius: 26px !important; font-size: 31px !important; }
.mini-mark { width: 54px !important; height: 54px !important; border-radius: 20px !important; flex: 0 0 54px; }
.auth-feature-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.auth-feature-list span {
  display: inline-flex;
  width: fit-content;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #fff;
  font-weight: 900;
}
.auth-form-panel { padding: clamp(24px, 4vw, 38px); }
.wide-auth-form { min-width: 0; }
.auth-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.auth-card-head .eyebrow,
.merchant-page-header .eyebrow { display: block; color: var(--muted); font-size: 12px; font-weight: 950; margin-bottom: 4px; }
.auth-card-head h2 { margin: 0 0 4px; font-size: clamp(22px, 2.2vw, 32px); font-weight: 950; }
.auth-links-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.auth-links-row a { color: var(--primary); font-weight: 950; }
.solo-auth-card { width: min(540px, 100%); padding: clamp(22px, 4vw, 34px); }
.compact-auth-page { align-items: center !important; }
.form-grid .wide { grid-column: 1 / -1; }

/* Merchant portal */
.merchant-portal-shell .merchant-sidebar .sidebar-brand .brand-copy span { color: rgba(255,255,255,.65); }
.merchant-page-header {
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid rgba(226,232,240,.92);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 10%, rgba(79,70,229,.10), transparent 34%),
    linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: var(--shadow-sm);
}
.merchant-stats-grid .stat-card { min-height: 132px; }
.merchant-offer-card { scroll-margin-top: 100px; }
.ltr-code { direction: ltr; unicode-bidi: plaintext; }
.coupon-details-grid {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fafc;
}
.modern-coupon-card { width: min(560px, 100%); padding: clamp(22px, 4vw, 34px); }

@media (max-width: 992px) {
  .auth-split-shell { grid-template-columns: 1fr; }
  .auth-hero-panel { min-height: auto; }
}
@media (max-width: 767px) {
  .auth-split-shell { gap: 12px; }
  .auth-hero-panel, .auth-form-panel, .solo-auth-card, .modern-coupon-card { border-radius: 24px; }
  .auth-feature-list span { width: 100%; }
  .auth-links-row { justify-content: center; text-align: center; }
}

/* v39 neighborhoods page helpers */
.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: end;
}
.grid-form label { display: grid; gap: 7px; font-weight: 800; color: var(--text); }
.grid-form input, .grid-form select {
  width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 12px; background: #fff; color: var(--text);
}
.table-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-actions form { margin: 0; }
.btn.xs, button.xs { min-height: 32px; padding: 6px 10px; border-radius: 10px; font-size: 12px; }
.btn.primary, button.primary { background: linear-gradient(135deg, var(--primary), #7c3aed) !important; color: #fff !important; }
.badge.bad { background: rgba(220,38,38,.12); color: #b91c1c; }

/* =========================================================
   v40 settings page + merchant portal unified with dashboard
   ========================================================= */
.settings-warning-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border-color: rgba(245, 158, 11, .24) !important;
  background: linear-gradient(180deg, #fff, #fffbeb) !important;
}
.settings-page-form { display: grid; gap: 18px; }
.settings-group-card { scroll-margin-top: 110px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.settings-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.settings-field.wide { grid-column: 1 / -1; }
.field-title { font-weight: 950; color: var(--text); }
.field-help { color: var(--muted); line-height: 1.7; }
.settings-field input,
.settings-field textarea,
.settings-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--text);
  outline: none;
}
.settings-field textarea { min-height: 96px; resize: vertical; }
.settings-field input:focus,
.settings-field textarea:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(79,70,229,.10);
  background: #fff;
}
.toggle-setting-row,
.clear-secret-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  color: var(--muted);
  font-weight: 900;
}
.toggle-setting-row input,
.clear-secret-row input { width: 18px !important; min-height: 18px !important; }
.secret-status {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 950;
}
.sticky-save-bar {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 22px;
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.merchant-portal-shell .app-sidebar {
  background:
    linear-gradient(180deg, rgba(30,27,75,.98), rgba(17,24,39,.98)),
    radial-gradient(circle at 18% 0%, rgba(245,158,11,.18), transparent 34%) !important;
}
.merchant-portal-shell .page-container { max-width: var(--content-max); }
.merchant-portal-shell .app-topbar,
.merchant-portal-shell .merchant-page-header,
.merchant-portal-shell .card-section,
.merchant-auth-body .auth-form-panel,
.merchant-auth-body .solo-auth-card,
.merchant-auth-body .modern-coupon-card {
  border-color: rgba(226,232,240,.92) !important;
  box-shadow: var(--shadow-sm) !important;
}
.merchant-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.merchant-portal-shell .stat-card { border-color: rgba(226,232,240,.95); }
.merchant-portal-shell .table-wrap { background: #fff; }
.merchant-auth-body .auth-split-shell { width: min(1180px, 100%); }
.merchant-auth-body .auth-form-panel,
.merchant-auth-body .solo-auth-card { background: rgba(255,255,255,.98) !important; }
.merchant-auth-body .auth-hero-panel {
  background:
    radial-gradient(circle at 12% 12%, rgba(245,158,11,.22), transparent 32%),
    linear-gradient(150deg, #111827, #1e1b4b 46%, #4f46e5) !important;
}

@media (max-width: 767px) {
  .settings-warning-card, .sticky-save-bar, .merchant-page-header { display: block; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-field.wide { grid-column: auto; }
  .sticky-save-bar .btn { margin-bottom: 8px; }
}

/* v41 إضافات التحكم والصلاحيات والـ QR */
.log-box {
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 560px;
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,.25);
  font-size: 12px;
  line-height: 1.7;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.permission-grid > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248,250,252,.92);
  border: 1px solid rgba(226,232,240,.95);
}
.permission-grid strong { color: var(--text); font-weight: 950; }
.permission-grid span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.bot-message-form textarea {
  min-height: 130px;
  line-height: 1.8;
}
.qr-thumb {
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 4px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(226,232,240,.95);
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}
.qr-box {
  display: grid;
  place-items: center;
  gap: 8px;
  margin: 12px 0 16px;
}
.qr-box .qr,
.coupon-card .qr {
  width: min(220px, 80vw);
  height: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.badge.off,
.badge.bg-off {
  background: #fee2e2 !important;
  color: #991b1b !important;
}
.sidebar-nav a[href="/admin/system-logs"] span,
.mobile-menu-list a[href="/admin/system-logs"] span { filter: saturate(1.2); }

@media (max-width: 767px) {
  .log-box { max-height: 420px; font-size: 11px; }
  .qr-thumb { width: 48px; height: 48px; }
}

/* =========================================================
   v43 لوحة ألوان موحدة ومتناسقة لكل لوحة
   - الإدارة: أزرق سماوي + تركواز
   - التاجر: أخضر + ذهبي
   - الموزع: بنفسجي + برتقالي
   ========================================================= */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0284c7;
  --primary-dark: #075985;
  --primary-soft: #e0f2fe;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --blue: #0284c7;
  --purple: #7c3aed;
  --green: #16a34a;
  --orange: #f97316;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --sidebar: #0f172a;
  --sidebar-2: #164e63;
  --theme-primary: #0284c7;
  --theme-primary-dark: #075985;
  --theme-secondary: #14b8a6;
  --theme-soft: #e0f2fe;
  --theme-soft-2: #ccfbf1;
  --theme-glow: rgba(2, 132, 199, .18);
  --theme-glow-strong: rgba(2, 132, 199, .26);
  --theme-sidebar-start: #082f49;
  --theme-sidebar-end: #0f172a;
  --theme-sidebar-glow: rgba(20, 184, 166, .20);
}

body.main-admin-shell,
body.admin-login-body {
  --primary: #0284c7;
  --primary-dark: #075985;
  --primary-soft: #e0f2fe;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --theme-primary: #0284c7;
  --theme-primary-dark: #075985;
  --theme-secondary: #14b8a6;
  --theme-soft: #e0f2fe;
  --theme-soft-2: #ccfbf1;
  --theme-glow: rgba(2, 132, 199, .18);
  --theme-glow-strong: rgba(2, 132, 199, .28);
  --theme-sidebar-start: #082f49;
  --theme-sidebar-end: #0f172a;
  --theme-sidebar-glow: rgba(20, 184, 166, .20);
}

body.merchant-portal-shell,
body.merchant-auth-body {
  --primary: #15803d;
  --primary-dark: #14532d;
  --primary-soft: #dcfce7;
  --accent: #d97706;
  --accent-soft: #fef3c7;
  --theme-primary: #15803d;
  --theme-primary-dark: #14532d;
  --theme-secondary: #d97706;
  --theme-soft: #dcfce7;
  --theme-soft-2: #fef3c7;
  --theme-glow: rgba(21, 128, 61, .18);
  --theme-glow-strong: rgba(21, 128, 61, .28);
  --theme-sidebar-start: #064e3b;
  --theme-sidebar-end: #111827;
  --theme-sidebar-glow: rgba(217, 119, 6, .22);
}

body.distributor-shell {
  --primary: #7c3aed;
  --primary-dark: #4c1d95;
  --primary-soft: #f3e8ff;
  --accent: #f97316;
  --accent-soft: #ffedd5;
  --theme-primary: #7c3aed;
  --theme-primary-dark: #4c1d95;
  --theme-secondary: #f97316;
  --theme-soft: #f3e8ff;
  --theme-soft-2: #ffedd5;
  --theme-glow: rgba(124, 58, 237, .18);
  --theme-glow-strong: rgba(124, 58, 237, .28);
  --theme-sidebar-start: #2e1065;
  --theme-sidebar-end: #111827;
  --theme-sidebar-glow: rgba(249, 115, 22, .22);
}

body.public-coupon-body {
  --primary: #0f766e;
  --primary-dark: #134e4a;
  --primary-soft: #ccfbf1;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --theme-primary: #0f766e;
  --theme-primary-dark: #134e4a;
  --theme-secondary: #f59e0b;
  --theme-soft: #ccfbf1;
  --theme-soft-2: #fef3c7;
  --theme-glow: rgba(15, 118, 110, .18);
  --theme-glow-strong: rgba(15, 118, 110, .28);
  --theme-sidebar-start: #134e4a;
  --theme-sidebar-end: #0f172a;
  --theme-sidebar-glow: rgba(245, 158, 11, .22);
}

body {
  background:
    radial-gradient(circle at 10% 8%, var(--theme-glow), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(20,184,166,.11), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%) !important;
}

body.merchant-portal-shell,
body.merchant-auth-body {
  background:
    radial-gradient(circle at 10% 8%, rgba(21,128,61,.14), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(217,119,6,.13), transparent 26%),
    linear-gradient(180deg, #fbfefc 0%, #f4f8f5 100%) !important;
}

body.distributor-shell {
  background:
    radial-gradient(circle at 10% 8%, rgba(124,58,237,.14), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(249,115,22,.13), transparent 26%),
    linear-gradient(180deg, #fcfbff 0%, #f7f4fb 100%) !important;
}

.app-sidebar,
.merchant-portal-shell .app-sidebar {
  background:
    radial-gradient(circle at 18% 0%, var(--theme-sidebar-glow), transparent 36%),
    linear-gradient(180deg, var(--theme-sidebar-start), var(--theme-sidebar-end)) !important;
  border-color: rgba(255,255,255,.10) !important;
}

.brand-mark,
.login-logo,
.coupon-logo,
.user-chip > span,
.large-mark,
.mini-mark {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary)) !important;
  box-shadow: 0 18px 38px var(--theme-glow-strong) !important;
}

.sidebar-nav a.active,
.mobile-menu-list a.active {
  background: rgba(255,255,255,.14) !important;
  box-shadow: inset -3px 0 0 var(--theme-secondary) !important;
}
.sidebar-nav a span,
.mobile-menu-list a span { background: rgba(255,255,255,.09) !important; }
.sidebar-nav a:hover,
.mobile-menu-list a:hover { background: rgba(255,255,255,.12) !important; }

.app-topbar,
.mobile-topbar,
.panel,
.card-section,
.card,
.stat-card,
.table-wrap,
.settings-field,
.permission-grid > div,
.coupon-details-grid {
  border-color: rgba(226,232,240,.96) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .075) !important;
}

.panel.highlight,
.card-section.highlight,
.highlight,
.merchant-page-header {
  border-color: rgba(2, 132, 199, .20) !important;
  background:
    radial-gradient(circle at 0% 15%, var(--theme-glow), transparent 36%),
    linear-gradient(180deg, #ffffff, var(--theme-soft)) !important;
}
body.merchant-portal-shell .panel.highlight,
body.merchant-portal-shell .card-section.highlight,
body.merchant-portal-shell .highlight,
body.merchant-portal-shell .merchant-page-header { border-color: rgba(21,128,61,.20) !important; }
body.distributor-shell .panel.highlight,
body.distributor-shell .card-section.highlight,
body.distributor-shell .highlight { border-color: rgba(124,58,237,.20) !important; }

.card::before,
.stat-card::before {
  background: radial-gradient(circle, var(--theme-glow), transparent 70%) !important;
}

/* ألوان الأزرار موحدة داخل كل لوحة */
.btn,
button,
.mini,
.btn-primary,
.btn-main,
.btn.primary,
button.primary,
.btn-success,
.btn-warning,
.btn-secondary-custom,
.btn.secondary,
.secondary {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary)) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 12px 26px var(--theme-glow) !important;
}
.btn:hover,
button:hover,
.mini:hover {
  box-shadow: 0 18px 38px var(--theme-glow-strong) !important;
  filter: saturate(1.05) brightness(.99) !important;
}
.btn-soft,
.btn.ghost,
.ghost,
.topbar-icon-link,
.menu-trigger {
  background: #ffffff !important;
  color: var(--theme-primary-dark) !important;
  border: 1px solid rgba(2, 132, 199, .18) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06) !important;
}
body.merchant-portal-shell .btn-soft,
body.merchant-auth-body .btn-soft,
body.merchant-portal-shell .btn.ghost,
body.merchant-portal-shell .ghost,
body.merchant-portal-shell .topbar-icon-link,
body.merchant-portal-shell .menu-trigger { border-color: rgba(21,128,61,.18) !important; }
body.distributor-shell .btn-soft,
body.distributor-shell .btn.ghost,
body.distributor-shell .ghost,
body.distributor-shell .topbar-icon-link,
body.distributor-shell .menu-trigger { border-color: rgba(124,58,237,.18) !important; }
.btn-soft:hover,
.btn.ghost:hover,
.ghost:hover,
.topbar-icon-link:hover,
.menu-trigger:hover {
  background: var(--theme-soft) !important;
  color: var(--theme-primary-dark) !important;
}
.btn-danger,
.btn-danger-custom,
button.danger,
.danger,
.logout-link {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(220, 38, 38, .18) !important;
}
.logout-link:hover,
.btn-danger:hover,
button.danger:hover { box-shadow: 0 18px 38px rgba(220,38,38,.22) !important; }

.amount-pill,
.badge,
.pill,
.secret-status {
  background: var(--theme-soft) !important;
  color: var(--theme-primary-dark) !important;
  border-color: rgba(2, 132, 199, .20) !important;
}
body.merchant-portal-shell .amount-pill,
body.merchant-portal-shell .badge,
body.merchant-portal-shell .pill,
body.merchant-auth-body .pill { border-color: rgba(21,128,61,.20) !important; }
body.distributor-shell .amount-pill,
body.distributor-shell .badge,
body.distributor-shell .pill { border-color: rgba(124,58,237,.20) !important; }
.premium-pill {
  background: var(--theme-soft-2) !important;
  color: var(--theme-secondary) !important;
  border-color: rgba(217,119,6,.24) !important;
}
.chip b,
.login-links a,
.auth-links-row a { color: var(--theme-primary) !important; }

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.login-form input:focus,
.filter-row input:focus,
.filter-row select:focus,
.settings-field input:focus,
.settings-field textarea:focus,
.grid-form input:focus,
.grid-form select:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 4px var(--theme-glow) !important;
  background: #fff !important;
}

.login-body,
.coupon-body {
  background:
    radial-gradient(circle at 18% 12%, var(--theme-glow-strong), transparent 32%),
    radial-gradient(circle at 84% 16%, rgba(20, 184, 166, .20), transparent 30%),
    linear-gradient(135deg, var(--theme-sidebar-end), var(--theme-sidebar-start) 52%, var(--theme-primary-dark)) !important;
}
body.merchant-auth-body.login-body,
body.merchant-auth-body.coupon-body {
  background:
    radial-gradient(circle at 18% 12%, rgba(21,128,61,.28), transparent 32%),
    radial-gradient(circle at 84% 16%, rgba(217,119,6,.22), transparent 30%),
    linear-gradient(135deg, #111827, #064e3b 52%, #14532d) !important;
}

.auth-hero-panel,
.merchant-auth-body .auth-hero-panel {
  background:
    radial-gradient(circle at 12% 12%, rgba(217,119,6,.22), transparent 32%),
    linear-gradient(150deg, var(--theme-sidebar-end), var(--theme-sidebar-start) 48%, var(--theme-primary)) !important;
}

.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active {
  color: var(--theme-primary) !important;
  background: var(--theme-soft) !important;
}
.coupon-code {
  border-color: var(--theme-primary) !important;
  background: var(--theme-soft) !important;
  color: var(--theme-primary-dark) !important;
}
.log-box {
  background: linear-gradient(180deg, #0f172a, var(--theme-sidebar-start)) !important;
}

/* =========================================================
   v45 إصلاحات حفظ الإعدادات + تجاوب الجوال وترتيب النماذج
   ========================================================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
.main-layout,
.page-container,
.card-section,
.panel,
.table-wrap,
.settings-grid,
.form-grid {
  min-width: 0;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.settings-page-head {
  align-items: center;
}
.email-help-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid rgba(2, 132, 199, .16);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, var(--theme-soft));
  color: var(--text);
  line-height: 1.8;
}
.email-help-box strong {
  flex: 0 0 auto;
  font-weight: 950;
  color: var(--theme-primary-dark);
}
.email-help-box span {
  min-width: 0;
}
.responsive-settings-form .secret-status {
  width: fit-content;
}
.settings-field input[dir="ltr"],
.form-grid input[dir="ltr"],
.filter-row input[dir="ltr"],
td[dir="ltr"] {
  text-align: left;
  direction: ltr;
  unicode-bidi: plaintext;
}
.sticky-save-bar {
  flex-wrap: wrap;
}
.mobile-drawer {
  max-width: 92vw !important;
}
.mobile-bottom-nav {
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)) !important;
}
.table-wrap {
  max-width: 100%;
}
.admin-compact-table td,
.admin-compact-table th {
  white-space: normal;
}
.admin-compact-table td:nth-child(2),
.admin-compact-table td:nth-child(5) {
  word-break: break-word;
}

@media (max-width: 1199px) {
  .main-layout {
    padding-inline: 14px !important;
  }
  .mobile-topbar.mobile-only {
    display: flex !important;
  }
  .mobile-bottom-nav.mobile-only {
    display: grid !important;
  }
}

@media (max-width: 767px) {
  .main-layout {
    padding: 12px 9px calc(112px + var(--safe-bottom)) !important;
  }
  .mobile-topbar {
    min-height: 58px;
    padding: 8px 10px;
  }
  .page-header,
  .page-heading,
  .settings-page-head,
  .merchant-page-header {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }
  .page-actions,
  .section-title-row {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .page-actions .btn,
  .section-title-row .btn,
  .section-title-row .chip {
    width: 100%;
  }
  .panel,
  .card-section,
  .settings-field,
  .card,
  .stat-card {
    border-radius: 18px !important;
  }
  .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .settings-field {
    padding: 12px;
  }
  .email-help-box,
  .settings-warning-card {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .form-grid,
  .compact-form-grid,
  .responsive-settings-form,
  .grid-form,
  .server-status {
    grid-template-columns: 1fr !important;
  }
  .filter-row,
  .inline-form,
  .quick-actions,
  .server-actions,
  .inline-actions,
  .coupon-actions,
  .horizontal-actions,
  .form-actions-bar,
  .update-actions,
  .table-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .filter-row label,
  .inline-form label,
  .form-grid label,
  .grid-form label {
    min-width: 0 !important;
    width: 100%;
  }
  input,
  select,
  textarea,
  .settings-field input,
  .settings-field textarea,
  .settings-field select,
  .form-grid input,
  .form-grid select,
  .form-grid textarea {
    min-height: 46px;
    font-size: 16px !important;
  }
  .btn,
  button,
  .mini {
    width: 100%;
    white-space: normal;
  }
  .sticky-save-bar {
    right: 8px;
    left: 8px;
    bottom: calc(78px + var(--safe-bottom));
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
    border-radius: 18px;
  }
  .sticky-save-bar .btn {
    margin-bottom: 0 !important;
  }
  .table-wrap {
    border-radius: 14px;
  }
  table,
  .table {
    min-width: 640px;
  }
  .admin-compact-table {
    min-width: 680px;
  }
  th,
  td,
  .table > :not(caption) > * > * {
    padding: 9px 8px;
    font-size: 12px;
  }
  .mobile-bottom-nav {
    right: 8px;
    left: 8px;
    bottom: calc(8px + var(--safe-bottom));
    padding: 6px;
    border-radius: 20px;
  }
  .mobile-bottom-nav a {
    min-height: 46px;
    font-size: 11px;
  }
  .mobile-menu-list a {
    min-height: 46px;
    white-space: normal !important;
  }
}

@media (max-width: 420px) {
  .main-layout {
    padding-inline: 7px !important;
  }
  .panel,
  .card-section {
    padding: 12px;
  }
  table,
  .table {
    min-width: 600px;
  }
  .admin-compact-table {
    min-width: 640px;
  }
}

/* v46: صفحات الصحة والنسخ والصيانة */
.stat-card.success { border-color: rgba(34, 197, 94, .35) !important; }
.stat-card.warning { border-color: rgba(245, 158, 11, .42) !important; }
.stat-card.danger { border-color: rgba(239, 68, 68, .38) !important; }
.mini-info {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(248, 250, 252, .78);
  min-height: 78px;
}
.mini-info small {
  display: block;
  color: var(--muted);
  font-weight: 900;
  margin-bottom: 8px;
}
.mini-info code {
  white-space: normal;
  word-break: break-word;
  color: #0f172a;
}
.empty-state {
  border: 1px dashed rgba(148, 163, 184, .55);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(248, 250, 252, .65);
  font-weight: 800;
}
.action-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.action-group form { display: inline; }
.action-group .btn { border-radius: 12px !important; }
.stack-form .form-control,
.stack-form .btn { width: 100%; }
@media (max-width: 768px) {
  .action-group { width: 100%; justify-content: stretch; }
  .action-group .btn,
  .action-group form { flex: 1 1 100%; width: 100%; }
  .action-group form .btn { width: 100%; }
}

/* =========================================================
   v52 dashboard cleanup: قوائم مرتبة + إصلاح أزرار الجوال
   ========================================================= */
:root {
  --sidebar-width-clean: 292px;
}

.clean-sidebar-nav .nav-accordion {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
}
.clean-sidebar-nav .nav-accordion + .nav-accordion { margin-top: 6px; }
.clean-sidebar-nav .nav-accordion summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 10px 12px;
  list-style: none;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}
.clean-sidebar-nav .nav-accordion summary::-webkit-details-marker { display: none; }
.clean-sidebar-nav .nav-accordion summary::after {
  content: "⌄";
  margin-inline-start: auto;
  color: rgba(255,255,255,.68);
  font-size: 14px;
  transition: transform .16s ease;
}
.clean-sidebar-nav .nav-accordion[open] summary::after { transform: rotate(180deg); }
.clean-sidebar-nav .summary-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 9px;
  background: rgba(255,255,255,.10);
}
.clean-sidebar-nav .nav-accordion-links {
  display: grid;
  gap: 5px;
  padding: 0 8px 9px;
}
.clean-sidebar-nav .nav-accordion-links a {
  min-height: 37px !important;
  padding: 8px 10px !important;
  border-radius: 13px !important;
  font-size: 12.5px !important;
}
.clean-sidebar-nav .nav-advanced summary { color: rgba(255,255,255,.82); }

.app-sidebar {
  width: var(--sidebar-width-clean) !important;
}
.main-layout {
  margin-right: calc(var(--sidebar-width-clean) + 36px) !important;
}
.sidebar-brand { padding-top: 16px !important; }
.sidebar-profile { margin-bottom: 10px !important; }
.sidebar-profile strong { font-size: 13px !important; }
.sidebar-profile small { font-size: 11px !important; }

.app-topbar { min-height: 66px !important; border-radius: 22px !important; }
.app-topbar strong { font-size: 17px !important; }
.topbar-actions .btn { min-height: 36px !important; padding: 7px 11px !important; font-size: 12px !important; }

.btn, button, .mini {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 12.5px;
}
.btn-sm, .btn-sm-fixed {
  min-height: 34px !important;
  padding: 7px 11px !important;
  font-size: 11.8px !important;
}

.card, .stat-card { min-height: 108px !important; }
.card strong, .stat-card strong { font-size: clamp(21px, 2vw, 31px) !important; }
.card span, .stat-card span { font-size: 12px !important; }
th, td, .table > :not(caption) > * > * { font-size: 12.4px !important; }
th { font-size: 11.4px !important; }

/* إصلاح سبب ظهور زر القائمة عريض ومخرب شكل الهيدر في الجوال */
@media (max-width: 1199px) {
  .desktop-sidebar,
  .desktop-topbar,
  .app-sidebar.desktop-sidebar {
    display: none !important;
  }

  .mobile-topbar.mobile-only {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 8px;
    min-height: 60px;
    padding: 8px 10px;
  }

  .menu-trigger,
  .menu-close,
  .topbar-icon-link {
    width: auto !important;
    min-width: 40px !important;
    max-width: 58px !important;
    height: 40px !important;
    padding: 0 9px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .menu-trigger { grid-column: 1; }
  .mobile-brand {
    grid-column: 2;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    line-height: 1.25;
  }
  .mobile-brand strong,
  .mobile-brand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-brand strong { font-size: 13px; }
  .mobile-brand small { font-size: 10.5px; opacity: .78; }
  .topbar-icon-link { grid-column: 3; font-weight: 900; }

  .main-layout {
    margin-right: 0 !important;
    padding: 14px 12px 90px !important;
  }

  .mobile-drawer {
    width: min(88vw, 360px) !important;
  }

  .mobile-menu-list .nav-accordion summary {
    min-height: 43px;
    font-size: 13px;
  }

  .mobile-menu-list .nav-accordion-links a {
    min-height: 39px !important;
    font-size: 12.6px !important;
  }

  .cards,
  .stats-grid,
  .dashboard-cards,
  .grid,
  .compact-dual-tables,
  .server-status,
  .auth-split-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .form-grid,
  .compact-form-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  body { font-size: 13px; }
  h1 { font-size: 22px !important; }
  h2 { font-size: 18px !important; }

  .btn,
  button,
  .mini {
    font-size: 12.5px !important;
  }

  .menu-trigger,
  .menu-close,
  .topbar-icon-link {
    width: auto !important;
    min-width: 40px !important;
    max-width: 58px !important;
  }

  .page-header,
  .page-heading,
  .section-title-row {
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .panel,
  .card-section {
    margin: 12px 0 !important;
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .stats-grid,
  .cards,
  .dashboard-cards,
  .merchant-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .stat-card,
  .card {
    min-height: 96px !important;
    padding: 13px !important;
    border-radius: 18px !important;
  }

  .stat-card strong,
  .card strong {
    font-size: 24px !important;
  }

  .stat-card small,
  .card small {
    font-size: 10.5px !important;
  }

  .quick-actions,
  .form-actions-bar,
  .inline-actions,
  .coupon-actions,
  .horizontal-actions,
  .update-actions {
    width: 100%;
  }

  .quick-actions .btn,
  .form-actions-bar .btn,
  .form-actions-bar button,
  .inline-actions .btn,
  .inline-actions button,
  .coupon-actions .btn,
  .coupon-actions button,
  .update-actions .btn,
  .update-actions button {
    width: 100% !important;
  }

  .mobile-bottom-nav {
    right: 8px !important;
    left: 8px !important;
    bottom: calc(8px + var(--safe-bottom)) !important;
    padding: 7px !important;
    border-radius: 20px !important;
  }

  .mobile-bottom-nav a {
    min-height: 43px !important;
    font-size: 10.5px !important;
    border-radius: 14px !important;
  }

  .mobile-bottom-nav span { font-size: 16px !important; }
}

@media (max-width: 420px) {
  .mobile-topbar.mobile-only {
    grid-template-columns: 42px minmax(0, 1fr) 50px;
    gap: 6px;
  }
  .mobile-brand strong { font-size: 12.5px; }
  .mobile-brand small { font-size: 10px; }
  .topbar-icon-link { font-size: 12px !important; }
  .stats-grid,
  .cards,
  .dashboard-cards,
  .merchant-stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}


/* =========================================================
   v53 unified responsive dashboard + merchant theme system
   ========================================================= */

:root {
  --app-font-size: 14px;
  --control-height: 40px;
  --button-padding: 8px 13px;
  --panel-padding: 18px;
  --table-cell-y: 10px;
  --table-cell-x: 10px;
  --sidebar-width: 298px;
}

body {
  font-size: var(--app-font-size) !important;
}

/* إصلاح الهيدر في الجوال: زر القائمة والخروج لا يأخذون عرض الشاشة */
.mobile-topbar .menu-trigger,
.mobile-topbar .topbar-icon-link,
.mobile-drawer .menu-close,
.merchant-mobile-topbar .menu-trigger,
.merchant-mobile-topbar .topbar-icon-link {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  padding: 0 !important;
  border-radius: 14px !important;
}

.mobile-topbar .topbar-icon-link,
.merchant-mobile-topbar .topbar-icon-link {
  width: auto !important;
  min-width: 54px !important;
  max-width: none !important;
  padding: 0 12px !important;
}

.mobile-topbar,
.merchant-mobile-topbar {
  display: flex !important;
  gap: 10px !important;
}

.mobile-brand {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.mobile-brand strong,
.mobile-brand small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* قائمة جانبية أكثر هدوءًا */
.app-sidebar {
  width: var(--sidebar-width) !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sidebar-2) 88%, #000), color-mix(in srgb, var(--sidebar) 92%, #000)),
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 36%) !important;
}

.main-layout {
  margin-right: calc(var(--sidebar-width) + 36px) !important;
}

.nav-accordion summary {
  min-height: 42px !important;
  font-size: 12.5px !important;
}

.sidebar-nav a,
.mobile-menu-list a {
  min-height: 36px !important;
  font-size: 12.2px !important;
}

.sidebar-nav a span,
.mobile-menu-list a span,
.summary-icon {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
}

/* بطاقات ونماذج أخف */
.panel,
.card-section,
.panel.card,
.card-section.card {
  padding: var(--panel-padding) !important;
  background: color-mix(in srgb, var(--surface) 96%, #fff) !important;
}

.card,
.stat-card {
  min-height: 108px !important;
}

.card strong,
.stat-card strong {
  font-size: clamp(21px, 2vw, 31px) !important;
}

/* أزرار موحدة */
.btn,
button,
.mini {
  min-height: var(--control-height) !important;
  padding: var(--button-padding) !important;
  font-size: 12.5px !important;
  border-radius: var(--radius-sm) !important;
}

.btn-soft,
.btn.ghost,
.ghost {
  background: color-mix(in srgb, var(--surface) 80%, #f8fafc) !important;
}

/* جداول أفضل */
.table-wrap,
.table-responsive {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.table,
.table {
  color: var(--text) !important;
}

th,
td,
.table > :not(caption) > * > * {
  padding: var(--table-cell-y) var(--table-cell-x) !important;
  font-size: 12.4px !important;
}

th {
  font-size: 11.4px !important;
}

.data-table-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
}

.data-table-search {
  width: min(360px, 100%);
  min-height: var(--control-height);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

/* صفحة الثيم */
.theme-form {
  display: grid;
  gap: 14px;
}

.theme-preview-grid {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}

.theme-preview-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.theme-preview-top {
  height: 92px;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 38%),
    linear-gradient(135deg, var(--primary), var(--sidebar));
}

.theme-preview-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.theme-preview-body h3 {
  margin: 0;
}

.theme-preview-body p {
  margin: 0;
  color: var(--muted);
}

.color-input-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
}

.color-input-row input[type="color"] {
  min-height: 42px;
  padding: 3px;
}

/* بوابة التاجر بنفس نظام لوحة التحكم */
.merchant-portal-shell .app-sidebar {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sidebar) 88%, var(--primary)), color-mix(in srgb, var(--sidebar) 96%, #000)),
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 36%) !important;
}

.merchant-page-header,
.merchant-portal-shell .page-header {
  align-items: center;
}

/* التوافق مع الشاشات */
@media (max-width: 1199px) {
  .main-layout {
    margin-right: 0 !important;
  }

  .mobile-only,
  .mobile-topbar.mobile-only,
  .mobile-bottom-nav.mobile-only {
    display: flex !important;
  }

  .mobile-drawer.mobile-only,
  .mobile-menu-backdrop.mobile-only {
    display: none !important;
  }

  body.mobile-menu-open .mobile-drawer.mobile-only {
    display: block !important;
  }

  body.mobile-menu-open .mobile-menu-backdrop.mobile-only {
    display: block !important;
  }
}

@media (max-width: 900px) {
  .theme-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .page-container .quick-actions .btn,
  .page-container .form-actions-bar .btn,
  .page-container form > .btn,
  .page-container form button:not(.menu-trigger):not(.menu-close),
  .panel > .btn,
  .card-section > .btn {
    width: 100% !important;
  }

  .table-mode-cards .responsive-card-table,
  .table-mode-cards .responsive-card-table thead,
  .table-mode-cards .responsive-card-table tbody,
  .table-mode-cards .responsive-card-table th,
  .table-mode-cards .responsive-card-table td,
  .table-mode-cards .responsive-card-table tr {
    display: block;
  }

  .table-mode-cards .responsive-card-table {
    min-width: 0 !important;
    border-collapse: separate;
  }

  .table-mode-cards .responsive-card-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .table-mode-cards .responsive-card-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .table-mode-cards .responsive-card-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
  }

  .table-mode-cards .responsive-card-table td {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    border-bottom: 1px solid var(--border) !important;
    text-align: start !important;
    white-space: normal !important;
  }

  .table-mode-cards .responsive-card-table td:last-child {
    border-bottom: 0 !important;
  }

  .table-mode-cards .responsive-card-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  .table-mode-scroll .responsive-card-table {
    min-width: 760px !important;
  }

  .data-table-toolbar {
    display: grid;
  }

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

  .mobile-bottom-nav {
    display: grid !important;
  }
}

@media (max-width: 420px) {
  .mobile-bottom-nav {
    right: 6px !important;
    left: 6px !important;
    gap: 4px !important;
    padding: 6px !important;
  }

  .mobile-bottom-nav a {
    min-height: 42px !important;
    font-size: 10px !important;
  }
}

/* =========================================================
   v54 mobile menu cleanup
   - زر الخروج أيقونة فقط
   - قائمة الجوال تظهر في المنتصف
   - القوائم المنسدلة واضحة ولا تفتح فوق بعضها
   ========================================================= */
.mobile-topbar .topbar-icon-link.logout-icon,
.merchant-mobile-topbar .topbar-icon-link.logout-icon {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 14px !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.mobile-topbar .topbar-icon-link.logout-icon span,
.merchant-mobile-topbar .topbar-icon-link.logout-icon span {
  display: block;
  line-height: 1;
}

.mobile-topbar .menu-trigger,
.merchant-mobile-topbar .menu-trigger {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 14px !important;
}

@media (max-width: 1199px) {
  .mobile-topbar.mobile-only,
  .merchant-mobile-topbar.mobile-only {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .mobile-topbar .menu-trigger,
  .merchant-mobile-topbar .menu-trigger {
    grid-column: 3 !important;
    justify-self: end !important;
  }

  .mobile-topbar .logout-icon,
  .merchant-mobile-topbar .logout-icon {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  .mobile-brand {
    grid-column: 2 !important;
    justify-self: center !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .mobile-drawer.mobile-only {
    top: 76px !important;
    right: auto !important;
    left: 50% !important;
    bottom: calc(76px + var(--safe-bottom)) !important;
    width: min(92vw, 430px) !important;
    max-width: 430px !important;
    height: auto !important;
    max-height: calc(100vh - 152px - var(--safe-bottom)) !important;
    padding: 14px !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    transform: translateX(-50%) scale(.96) !important;
    opacity: 0 !important;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .36) !important;
  }

  body.mobile-menu-open .mobile-drawer.mobile-only {
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(-50%) scale(1) !important;
    opacity: 1 !important;
  }

  .mobile-drawer-head {
    flex: 0 0 auto !important;
    padding: 4px 4px 12px !important;
    margin-bottom: 4px !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
  }

  .mobile-menu-list {
    flex: 1 1 auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 4px 2px 4px !important;
    gap: 9px !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion {
    border-color: rgba(255,255,255,.12) !important;
    background: rgba(255,255,255,.055) !important;
    box-shadow: none !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion[open] {
    background: rgba(255,255,255,.085) !important;
    border-color: color-mix(in srgb, var(--accent) 58%, rgba(255,255,255,.16)) !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion summary {
    min-height: 46px !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion summary::after {
    margin-inline-start: 0 !important;
    margin-inline-end: 6px !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    padding: 0 10px 10px !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links a,
  .mobile-menu-list.clean-sidebar-nav > a {
    justify-content: center !important;
    text-align: center !important;
    min-height: 42px !important;
    padding: 9px 12px !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.055) !important;
    white-space: normal !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links a.active,
  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links a:hover,
  .mobile-menu-list.clean-sidebar-nav > a.active,
  .mobile-menu-list.clean-sidebar-nav > a:hover {
    background: rgba(255,255,255,.14) !important;
    box-shadow: none !important;
  }

  .mobile-menu-list .logout-link {
    width: 100% !important;
    min-height: 44px !important;
    margin-top: 4px !important;
  }
}

@media (max-width: 430px) {
  .mobile-drawer.mobile-only {
    top: 70px !important;
    bottom: calc(72px + var(--safe-bottom)) !important;
    width: min(94vw, 390px) !important;
    border-radius: 24px !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion summary {
    font-size: 12.5px !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links a,
  .mobile-menu-list.clean-sidebar-nav > a {
    font-size: 12px !important;
  }
}

/* =========================================================
   v55 - إصلاح القوائم + مركز قرارات + زر خروج Power
   ========================================================= */
.sidebar-nav.clean-sidebar-nav {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 18px !important;
  scroll-padding-bottom: 30px !important;
}

.clean-sidebar-nav .nav-accordion {
  flex: 0 0 auto !important;
}

.clean-sidebar-nav .nav-accordion[open] {
  border-color: color-mix(in srgb, var(--accent) 54%, rgba(255,255,255,.12)) !important;
  background: rgba(255,255,255,.075) !important;
}

.clean-sidebar-nav .nav-accordion[open] .nav-accordion-links {
  max-height: min(42vh, 430px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 10px !important;
  scroll-padding-bottom: 12px !important;
}

.power-symbol {
  display: inline-grid;
  place-items: center;
  width: 1.2em;
  height: 1.2em;
  font-size: 1.45em;
  line-height: 1;
  font-family: Arial, Tahoma, sans-serif;
  font-weight: 900;
}

.power-logout,
.sidebar-footer .logout-link.power-logout {
  min-height: 50px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #ff7676 0%, #ef4444 48%, #b91c1c 100%) !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(239,68,68,.28) !important;
}

.power-logout:hover,
.power-logout-icon:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.power-logout-icon,
.mobile-topbar .logout-icon.power-logout-icon {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  border-radius: 14px !important;
  color: #fff !important;
  background: linear-gradient(145deg, #ff7a7a 0%, #ef4444 48%, #b91c1c 100%) !important;
  box-shadow: 0 12px 26px rgba(239,68,68,.24) !important;
}

.power-svg {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.power-logout-icon .power-svg { width: 24px; height: 24px; }

/* Mobile topbar final positioning: menu on the right, logout as a plain icon on the left. */
@media (max-width: 1199px) {
  .mobile-topbar.mobile-only,
  .merchant-mobile-topbar.mobile-only {
    grid-template-columns: 46px minmax(0, 1fr) 46px !important;
    direction: ltr !important;
  }

  .mobile-topbar .menu-trigger,
  .merchant-mobile-topbar .menu-trigger {
    grid-column: 3 !important;
    justify-self: end !important;
  }

  .mobile-topbar .logout-icon,
  .merchant-mobile-topbar .logout-icon {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  .mobile-topbar .topbar-icon-link.logout-icon,
  .merchant-mobile-topbar .topbar-icon-link.logout-icon,
  .mobile-topbar .logout-icon.power-logout-icon,
  .merchant-mobile-topbar .logout-icon.power-logout-icon {
    background: transparent !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, .2) !important;
    box-shadow: none !important;
  }

  .mobile-topbar .logout-icon .power-svg,
  .merchant-mobile-topbar .logout-icon .power-svg {
    width: 24px !important;
    height: 24px !important;
  }
}
.power-top-action { background: linear-gradient(145deg, #ef4444, #b91c1c) !important; }

.decision-center-panel {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border)) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), color-mix(in srgb, var(--primary-soft) 60%, #fff)) !important;
}

.decision-grid,
.health-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.decision-card,
.health-card,
.recommendation-item {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.decision-card-head,
.health-card-head,
.decision-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.decision-card-head span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--primary-soft);
}

.decision-card p,
.health-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.6px;
}

.decision-card.danger,
.health-card.fail { border-color: #fecaca; background: #fff7f7; }
.decision-card.warning,
.health-card.warn { border-color: #fde68a; background: #fffbeb; }
.decision-card.info { border-color: #bfdbfe; background: #eff6ff; }
.decision-card.success,
.health-card.ok { border-color: #bbf7d0; background: #f0fdf4; }
.health-recommendation { color: #334155; font-weight: 800; }

.recommendation-list { display: grid; gap: 10px; }
.recommendation-item {
  grid-template-columns: 42px 1fr;
  align-items: center;
  color: inherit !important;
}
.recommendation-item span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--primary-soft);
}
.recommendation-item strong { display: block; font-size: 13px; }
.recommendation-item small { display: block; color: var(--muted); line-height: 1.7; }

.mini-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mini-kpi-grid > div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}
.mini-kpi-grid small { display: block; color: var(--muted); font-weight: 900; }
.mini-kpi-grid strong { display: block; margin-top: 6px; font-size: 24px; font-weight: 950; }

.campaign-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.campaign-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}
.campaign-step > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: #e5e7eb;
  font-weight: 950;
}
.campaign-step.active {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  background: var(--primary-soft);
}
.campaign-step.active > span {
  background: var(--primary);
  color: #fff;
}
.campaign-step strong,
.campaign-step small { display: block; }
.campaign-step small { color: var(--muted); font-size: 11px; }

.safe-steps-list { display: grid; gap: 10px; margin: 0; }
.command-list { display: grid; gap: 10px; }
.command-list code {
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
}

@media (max-width: 1199px) {
  .mobile-drawer.mobile-only {
    right: 50% !important;
    left: auto !important;
    top: 72px !important;
    bottom: calc(76px + var(--safe-bottom)) !important;
    width: min(94vw, 430px) !important;
    max-width: 430px !important;
    border-radius: 30px !important;
    transform: translateX(50%) translateY(12px) scale(.98) !important;
    opacity: 0 !important;
    overflow: hidden !important;
    padding: 14px !important;
  }

  body.mobile-menu-open .mobile-drawer.mobile-only {
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(50%) translateY(0) scale(1) !important;
    opacity: 1 !important;
  }

  .mobile-menu-list.clean-sidebar-nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 4px 2px 10px !important;
    gap: 9px !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion[open] .nav-accordion-links {
    max-height: 38vh !important;
    overflow-y: auto !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion summary {
    justify-content: center !important;
    text-align: center !important;
  }

  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links a,
  .mobile-menu-list.clean-sidebar-nav > a {
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .mobile-menu-list .logout-link.power-logout {
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 5px !important;
  }

  .mobile-menu-list .logout-link.power-logout.mobile-logout-icon-only {
    width: 56px !important;
    min-width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
    margin: 10px auto 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 18px !important;
  }

  .mobile-menu-list .logout-link.power-logout.mobile-logout-icon-only .power-svg {
    margin: 0 !important;
  }

  .campaign-steps,
  .mini-kpi-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 430px) {
  .mobile-drawer.mobile-only {
    top: 66px !important;
    bottom: calc(70px + var(--safe-bottom)) !important;
    width: min(95vw, 390px) !important;
    border-radius: 24px !important;
  }
}

/* v59 - اختيار أحياء الحملة حسب المدينة */
#campaignNeighborhoodSelect {
  min-height: 148px;
  padding: 8px;
}
#campaignNeighborhoodSelect option {
  padding: 7px 9px;
  border-radius: 8px;
  margin-bottom: 3px;
}
#campaignNeighborhoodSelect option:checked {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

/* =========================================================
   v60 - شعار مرفوع + توازن هيدر الجوال + أحياء الحملات كخيارات متعددة
   ========================================================= */
.brand-logo-shell {
  justify-content: center;
  text-align: center;
}
.brand-logo-img {
  display: block;
  width: auto;
  max-width: 162px;
  height: 46px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  padding: 4px;
}
.drawer-logo-img { max-width: 130px; height: 40px; }
.sidebar-brand.brand-logo-shell .brand-copy {
  display: none;
}

.mobile-topbar.mobile-only,
.merchant-mobile-topbar.mobile-only {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) 46px !important;
  align-items: center !important;
  gap: 8px !important;
  direction: ltr !important;
  min-height: 62px !important;
  padding: 8px 12px !important;
}
.mobile-topbar .menu-trigger,
.merchant-mobile-topbar .menu-trigger {
  grid-column: 1 !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  border-radius: 14px !important;
}
.mobile-topbar .mobile-brand,
.merchant-mobile-topbar .mobile-brand {
  grid-column: 2 !important;
  width: 100% !important;
  height: 44px !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  direction: rtl !important;
  overflow: hidden !important;
}
.mobile-topbar .topbar-icon-link,
.merchant-mobile-topbar .topbar-icon-link {
  grid-column: 3 !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  border-radius: 14px !important;
}
.mobile-brand-logo strong,
.mobile-brand-logo small,
.mobile-brand strong,
.mobile-brand small {
  display: none !important;
}
.topbar-logo-img {
  display: block;
  max-width: min(170px, 58vw);
  max-height: 40px;
  object-fit: contain;
}
.mobile-logo-fallback {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 21px;
}
.power-logout-icon,
.mobile-topbar .logout-icon,
.merchant-mobile-topbar .logout-icon {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(220,38,38,.22) !important;
  border: 0 !important;
}
.power-symbol { font-size: 22px; line-height: 1; font-weight: 900; }
.power-svg {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

@media (max-width: 1199px) {
  .mobile-drawer.mobile-only {
    right: 50% !important;
    left: auto !important;
    width: min(92vw, 410px) !important;
    max-width: 410px !important;
    transform: translateX(50%) translateY(12px) scale(.98) !important;
  }
  body.mobile-menu-open .mobile-drawer.mobile-only {
    transform: translateX(50%) translateY(0) scale(1) !important;
  }
  .mobile-drawer-head {
    justify-content: center !important;
    position: relative !important;
    text-align: center !important;
  }
  .mobile-drawer-head .menu-close {
    position: absolute !important;
    left: 0 !important;
    top: 8px !important;
  }
  .mobile-menu-list.clean-sidebar-nav .nav-accordion summary {
    display: grid !important;
    grid-template-columns: 30px minmax(0,1fr) 22px !important;
    align-items: center !important;
    justify-items: center !important;
    text-align: center !important;
    gap: 8px !important;
  }
  .mobile-menu-list.clean-sidebar-nav .nav-accordion summary .summary-icon {
    justify-self: center !important;
  }
  .mobile-menu-list.clean-sidebar-nav .nav-accordion summary::after {
    justify-self: center !important;
    margin: 0 !important;
  }
  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links {
    align-items: center !important;
    justify-items: center !important;
  }
  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links a,
  .mobile-menu-list.clean-sidebar-nav > a {
    width: min(100%, 330px) !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* v60 campaign neighborhood checkbox grid */
.field-label {
  margin-bottom: 8px;
  color: #344054;
  font-size: 12.5px;
  font-weight: 900;
}
.campaign-neighborhood-block {
  display: grid;
  gap: 10px;
}
.campaign-neighborhood-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.campaign-neighborhood-toolbar .btn {
  width: auto !important;
}
.campaign-neighborhood-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(255,255,255,.74);
}
.neighborhood-choice {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  transition: .16s ease;
}
.neighborhood-choice input {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  accent-color: var(--primary);
}
.neighborhood-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 55%, #fff);
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent);
}
.empty-neighborhood-note {
  grid-column: 1 / -1;
  min-height: 70px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}
.theme-logo-upload-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: center;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.theme-logo-upload-card input[type="file"] {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
}
.theme-logo-preview {
  min-height: 104px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px dashed var(--border-strong);
  overflow: hidden;
}
.theme-logo-preview img {
  max-width: 160px;
  max-height: 86px;
  object-fit: contain;
}
.theme-logo-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
@media (max-width: 767px) {
  .campaign-neighborhood-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 280px;
  }
  .neighborhood-choice { justify-content: center; text-align: center; }
  .campaign-neighborhood-toolbar .btn { flex: 1 1 120px; }
  .theme-logo-upload-card { grid-template-columns: 1fr; }
}

/* ===== v62 Update Center ===== */
.update-center-grid { align-items: stretch; }
.update-paths-list,
.update-rules-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.update-paths-list code {
  display: inline-flex;
  direction: ltr;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2, #f8fafc);
  color: var(--text);
  font-size: 11px;
}
.danger-pill {
  background: #fef2f2 !important;
  color: #b42318 !important;
  border-color: #fecaca !important;
}
.update-preview-panel code,
.update-center-grid code {
  direction: ltr;
  unicode-bidi: plaintext;
}
@media (max-width: 767px) {
  .update-center-grid { grid-template-columns: 1fr !important; }
  .update-paths-list code,
  .update-rules-list .pill { width: 100%; justify-content: center; }
}

/* ===== v64 Mobile topbar RTL placement + red logout button ===== */
@media (max-width: 1199px) {
  .mobile-topbar.mobile-only,
  .merchant-mobile-topbar.mobile-only {
    grid-template-columns: 46px minmax(0, 1fr) 46px !important;
    direction: ltr !important;
    align-items: center !important;
  }

  .mobile-topbar .menu-trigger,
  .merchant-mobile-topbar .menu-trigger {
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  .mobile-topbar .logout-icon,
  .merchant-mobile-topbar .logout-icon {
    grid-column: 1 !important;
    justify-self: start !important;
    align-self: center !important;
  }

  .mobile-topbar .topbar-icon-link.logout-icon,
  .merchant-mobile-topbar .topbar-icon-link.logout-icon,
  .mobile-topbar .logout-icon.power-logout-icon,
  .merchant-mobile-topbar .logout-icon.power-logout-icon {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    background: linear-gradient(145deg, #ef4444, #b91c1c) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .34) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 24px rgba(220, 38, 38, .24) !important;
  }

  .mobile-topbar .logout-icon .power-svg,
  .merchant-mobile-topbar .logout-icon .power-svg {
    width: 24px !important;
    height: 24px !important;
    color: #fff !important;
    stroke: #fff !important;
  }

  .mobile-topbar .mobile-brand,
  .merchant-mobile-topbar .mobile-brand {
    grid-column: 2 !important;
    justify-self: center !important;
    align-self: center !important;
  }
}

/* ===== v65 Mobile topbar one-row alignment fix ===== */
@media (max-width: 1199px) {
  .mobile-topbar.mobile-only,
  .merchant-mobile-topbar.mobile-only {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) 48px !important;
    grid-template-rows: 48px !important;
    align-items: center !important;
    align-content: center !important;
    justify-items: center !important;
    min-height: 72px !important;
    height: 72px !important;
    max-height: 72px !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    overflow: hidden !important;
  }

  .mobile-topbar .logout-icon,
  .merchant-mobile-topbar .logout-icon,
  .mobile-topbar .menu-trigger,
  .merchant-mobile-topbar .menu-trigger,
  .mobile-topbar .mobile-brand,
  .merchant-mobile-topbar .mobile-brand {
    grid-row: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    transform: none !important;
  }

  .mobile-topbar .logout-icon,
  .merchant-mobile-topbar .logout-icon {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  .mobile-topbar .mobile-brand,
  .merchant-mobile-topbar .mobile-brand {
    grid-column: 2 !important;
    justify-self: center !important;
    width: 100% !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-topbar .menu-trigger,
  .merchant-mobile-topbar .menu-trigger {
    grid-column: 3 !important;
    justify-self: end !important;
  }

  .mobile-topbar .topbar-icon-link.logout-icon,
  .merchant-mobile-topbar .topbar-icon-link.logout-icon,
  .mobile-topbar .menu-trigger,
  .merchant-mobile-topbar .menu-trigger {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
  }

  .topbar-logo-img,
  .mobile-logo-fallback {
    max-height: 44px !important;
    margin: 0 !important;
  }
}

/* ===== v67 Final topbar order lock ===== */
.mobile-topbar.mobile-only,
.merchant-mobile-topbar.mobile-only {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 48px !important;
  grid-template-rows: 48px !important;
  direction: ltr !important;
  align-items: center !important;
  align-content: center !important;
  justify-items: center !important;
}

.mobile-topbar .logout-icon,
.merchant-mobile-topbar .logout-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
}

.mobile-topbar .mobile-brand,
.merchant-mobile-topbar .mobile-brand {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: center !important;
}

.mobile-topbar .menu-trigger,
.merchant-mobile-topbar .menu-trigger {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
}

.mobile-topbar .topbar-icon-link.logout-icon,
.merchant-mobile-topbar .topbar-icon-link.logout-icon {
  background: linear-gradient(145deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .34) !important;
}

.mobile-topbar .logout-icon .power-svg,
.merchant-mobile-topbar .logout-icon .power-svg {
  stroke: #fff !important;
}
/* ===== v73 decision alerts + unified search ===== */
.dashboard-smart-tools {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.4fr);
  gap: 14px;
  margin: 0 0 18px;
  align-items: stretch;
}

.dashboard-search-card,
.top-alert,
.unified-search-panel,
.search-result-item {
  background: #ffffff;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.dashboard-search-card {
  padding: 16px;
}

.dashboard-search-card label {
  display: block;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 10px;
}

.dashboard-search-card div,
.unified-search-form,
.topbar-search {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dashboard-search-card input,
.unified-search-form input,
.topbar-search input {
  width: 100%;
  border: 1px solid #c7e5f7;
  border-radius: 999px;
  padding: 11px 14px;
  background: #f8fcff;
  color: #0f172a;
  outline: none;
}

.dashboard-search-card input:focus,
.unified-search-form input:focus,
.topbar-search input:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.top-alert-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.top-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  padding: 14px;
  color: #0f172a;
  text-decoration: none;
  min-height: 104px;
}

.top-alert span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e0f2fe;
}

.top-alert strong {
  align-self: center;
  font-size: 0.98rem;
}

.top-alert small {
  grid-column: 1 / -1;
  color: #64748b;
  line-height: 1.6;
}

.top-alert.danger {
  border-color: rgba(239, 68, 68, 0.32);
  background: #fff7f7;
}

.top-alert.warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: #fffaf0;
}

.top-alert.info {
  background: #f0f9ff;
}

.topbar-search {
  min-width: 230px;
}

.topbar-search input {
  padding: 9px 13px;
  min-height: 38px;
}

.search-hero {
  margin-bottom: 14px;
}

.unified-search-panel {
  padding: 16px;
  margin-bottom: 16px;
}

.unified-search-form input {
  min-height: 48px;
}

.search-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #475569;
  flex-wrap: wrap;
}

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

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

/* ===== v113 — Merchant dashboard: KPI cards + check form ===== */
.merchant-kpi-row .stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.merchant-kpi-row .stat-card .msc-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 6px;
  display: block;
}
.merchant-kpi-row .stat-card strong {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 950;
  line-height: 1;
  display: block;
}
.merchant-kpi-row .stat-card small {
  display: block;
  margin-top: 5px;
  font-size: .82rem;
  color: var(--muted);
}
.merchant-kpi-row .stat-card.msc-blue  { border-top: 3px solid #2563eb; }
.merchant-kpi-row .stat-card.msc-blue  strong { color: #1d4ed8; }
.merchant-kpi-row .stat-card.msc-teal  { border-top: 3px solid var(--primary); }
.merchant-kpi-row .stat-card.msc-teal  strong { color: var(--primary); }
.merchant-kpi-row .stat-card.msc-green { border-top: 3px solid #16a34a; }
.merchant-kpi-row .stat-card.msc-green strong { color: #15803d; }
.merchant-kpi-row .stat-card.msc-purple{ border-top: 3px solid #7c3aed; }
.merchant-kpi-row .stat-card.msc-purple strong { color: #6d28d9; }

/* Coupon check form */
.merchant-check-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.merchant-check-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  font-family: monospace;
  letter-spacing: .03em;
  transition: border-color .18s, box-shadow .18s;
}
.merchant-check-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}
.merchant-check-btn {
  white-space: nowrap;
  padding: 12px 24px;
}
@media (max-width: 600px) {
  .merchant-check-form { flex-direction: column; }
  .merchant-check-btn  { width: 100%; }
  .merchant-kpi-row .stat-card { padding: 14px 16px 12px; }
  .merchant-kpi-row .stat-card strong { font-size: clamp(1.55rem, 6vw, 2rem); }
}

.search-result-item {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  text-decoration: none;
  color: #0f172a;
}

.search-result-item:hover {
  border-color: rgba(8, 145, 178, 0.45);
  transform: translateY(-1px);
}

.search-result-item small {
  color: #64748b;
  line-height: 1.5;
}

@media (max-width: 920px) {
  .dashboard-smart-tools,
  .search-results-grid {
    grid-template-columns: 1fr;
  }

  .top-alert-strip {
    grid-template-columns: 1fr;
  }

  .topbar-search {
    display: none;
  }
}

@media (max-width: 560px) {
  .dashboard-search-card div,
  .unified-search-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== v74 operations center + modern settings ===== */
.operations-hero,
.settings-hero {
  background: linear-gradient(135deg, #ecfeff, #ffffff);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.ops-status-grid,
.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.ops-status-card,
.settings-status-card {
  display: grid;
  gap: 7px;
  min-height: 150px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.ops-status-card small,
.settings-status-card small {
  color: #64748b;
  font-weight: 800;
}

.ops-status-card strong,
.settings-status-card strong {
  font-size: 1.35rem;
  font-weight: 950;
}

.ops-status-card span,
.settings-status-card span {
  color: #475569;
  line-height: 1.6;
}

.ops-status-card b {
  align-self: end;
  color: #075985;
}

.ops-status-card.ok,
.settings-status-card.ok {
  border-color: rgba(34, 197, 94, 0.32);
  background: #f7fff9;
}

.ops-status-card.warning,
.settings-status-card.warning {
  border-color: rgba(245, 158, 11, 0.36);
  background: #fffaf0;
}

.ops-status-card.danger,
.settings-status-card.danger {
  border-color: rgba(239, 68, 68, 0.34);
  background: #fff7f7;
}

.ops-status-card.info,
.settings-status-card.info {
  border-color: rgba(14, 165, 233, 0.28);
  background: #f0f9ff;
}

.ops-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ops-kpi-strip div {
  background: #ffffff;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 5px;
}

.ops-kpi-strip small,
.ops-kpi-strip span {
  color: #64748b;
}

.ops-kpi-strip strong {
  font-size: 1.45rem;
  font-weight: 950;
}

.ops-main-grid {
  align-items: stretch;
  margin-bottom: 18px;
}

.ops-task-list,
.ops-setting-list {
  display: grid;
  gap: 10px;
}

.ops-task,
.ops-setting {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
}

.ops-setting {
  grid-template-columns: 1fr auto;
}

.ops-task span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e0f2fe;
}

.ops-task small,
.ops-setting small {
  display: block;
  color: #64748b;
  line-height: 1.5;
}

.ops-setting > span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 900;
}

.ops-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ops-chip-list a,
.ops-chip-list span {
  padding: 8px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
}

.settings-jump-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin-bottom: 18px;
  background: #ffffff;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.settings-jump-panel > div {
  display: grid;
  gap: 3px;
}

.settings-jump-panel > div span {
  color: #64748b;
}

.settings-jump-panel nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.settings-jump-panel a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #075985;
  text-decoration: none;
  font-weight: 900;
}

.settings-jump-panel small {
  color: #64748b;
}

.modern-settings-form .settings-group-card {
  scroll-margin-top: 92px;
}

.modern-settings-form .settings-field {
  background: #ffffff;
}

@media (max-width: 1100px) {
  .ops-status-grid,
  .settings-status-grid,
  .ops-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .ops-status-grid,
  .settings-status-grid,
  .ops-kpi-strip,
  .settings-jump-panel {
    grid-template-columns: 1fr;
  }

  .settings-jump-panel nav {
    justify-content: stretch;
  }

  .settings-jump-panel a {
    justify-content: center;
  }
}

/* v75: shared polish for older admin pages */
.page-container > h1:first-child {
  margin: 0 0 18px;
  padding: 22px 24px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.88)),
    #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
  color: #071329;
  font-size: clamp(1.45rem, 1.2rem + 0.6vw, 2rem);
  font-weight: 950;
  line-height: 1.35;
}

.page-container > h1:first-child + .panel,
.page-container > h1:first-child + .card-section,
.page-container > h1:first-child + form,
.page-container > h1:first-child + .cards,
.page-container > h1:first-child + .grid {
  margin-top: 0;
}

.page-container > .panel,
.page-container > .card-section,
.page-container > form > .panel,
.page-container > form > .card-section {
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.page-container > .panel + .panel,
.page-container > .panel + .card-section,
.page-container > .card-section + .panel,
.page-container > .card-section + .card-section,
.page-container > form + .panel,
.page-container > form + .card-section {
  margin-top: 18px;
}

.panel > h2:first-child,
.card-section > h2:first-child,
.panel .section-title-row h2,
.card-section .section-title-row h2 {
  color: #071329;
  font-weight: 950;
  letter-spacing: 0;
}

.panel > p:first-child,
.card-section > p:first-child,
.panel .muted,
.card-section .muted {
  line-height: 1.75;
}

.table-wrap {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
  overflow: auto;
}

.compact-table,
.table {
  margin-bottom: 0;
}

.compact-table thead th,
.table thead th {
  background: #f8fafc;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 950;
  white-space: nowrap;
}

.compact-table td,
.compact-table th,
.table td,
.table th {
  vertical-align: middle;
}

.page-container form:not(.topbar-search):not(.settings-page-form) {
  gap: 10px;
}

.page-container label,
.form-label {
  color: #334155;
  font-weight: 900;
}

.page-container input,
.page-container select,
.page-container textarea {
  border-color: rgba(148, 163, 184, 0.35);
  border-radius: 14px;
}

.page-container input:focus,
.page-container select:focus,
.page-container textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.quick-actions,
.actions,
.button-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn,
button.btn,
a.btn {
  border-radius: 999px;
  font-weight: 900;
}

.page-container .cards,
.page-container .dashboard-cards {
  gap: 14px;
}

.page-container .card,
.page-container .dashboard-cards .card {
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.page-container .badge,
.page-container .status-word {
  letter-spacing: 0;
}

.page-container .alert {
  border-radius: 16px;
  border: 1px solid rgba(14, 165, 233, 0.18);
}

@media (max-width: 760px) {
  .page-container > h1:first-child {
    padding: 18px;
    border-radius: 18px;
    text-align: right;
  }

  .page-container > .panel,
  .page-container > .card-section,
  .page-container > form > .panel,
  .page-container > form > .card-section {
    border-radius: 18px;
  }

  .quick-actions,
  .actions,
  .button-row,
  .filter-row {
    align-items: stretch;
  }

  .quick-actions > *,
  .actions > *,
  .button-row > *,
  .filter-row > * {
    flex: 1 1 150px;
  }

  .quick-actions .btn,
  .actions .btn,
  .button-row .btn,
  .filter-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* v76: mobile-first tables and page layout */
.page-container {
  min-width: 0;
}

.page-container *,
.mobile-drawer *,
.mobile-bottom-nav * {
  min-width: 0;
}

.page-container img,
.page-container video,
.page-container canvas,
.page-container svg {
  max-width: 100%;
}

.page-container code,
.page-container pre,
.page-container .ltr-code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.page-container .grid,
.page-container .cards,
.page-container .dashboard-cards,
.page-container .decision-grid,
.page-container .health-action-grid,
.page-container .marketing-grid,
.page-container .bot-status-grid {
  min-width: 0;
}

.page-container .inline-actions,
.page-container .table-actions,
.page-container .action-stack,
.page-container .horizontal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-container .inline-actions form,
.page-container .table-actions form,
.page-container .action-stack form,
.page-container .horizontal-actions form {
  margin: 0;
}

.table-wrap table,
.table-responsive table {
  width: 100%;
}

.table-wrap td,
.table-responsive td {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .page-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-header,
  .dashboard-hero,
  .bot-control-hero,
  .operations-hero,
  .settings-hero,
  .search-hero,
  .settings-page-head {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    text-align: right;
  }

  .page-header .quick-actions,
  .page-header .d-flex,
  .page-header > div:last-child {
    justify-content: stretch !important;
  }

  .page-header .btn,
  .page-header a.btn,
  .page-header button.btn {
    flex: 1 1 150px;
    justify-content: center;
  }

  .page-container .grid,
  .page-container .dashboard-grid,
  .page-container .ops-main-grid,
  .page-container .marketing-grid,
  .page-container .bot-actions-grid,
  .page-container .settings-grid,
  .page-container .decision-grid,
  .page-container .health-action-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 980px) {
  .table-wrap,
  .table-responsive {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table[data-responsive-table="true"] {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    border: 0;
    background: transparent;
  }

  table[data-responsive-table="true"] thead,
  table[data-responsive-table="true"] colgroup {
    display: none;
  }

  table[data-responsive-table="true"] tbody {
    display: grid;
    gap: 12px;
  }

  table[data-responsive-table="true"] tr {
    display: block;
    padding: 12px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
  }

  table[data-responsive-table="true"] tr[data-empty-row="true"] {
    padding: 18px;
    text-align: center;
  }

  table[data-responsive-table="true"] td {
    display: grid;
    grid-template-columns: minmax(88px, 36%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    text-align: right !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  table[data-responsive-table="true"] td:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  table[data-responsive-table="true"] td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.6;
  }

  table[data-responsive-table="true"] td[data-label=""]::before {
    content: "";
  }

  table[data-responsive-table="true"] td[data-empty-cell="true"] {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    color: #64748b;
    text-align: center !important;
  }

  table[data-responsive-table="true"] td[data-empty-cell="true"]::before {
    display: none;
  }

  table[data-responsive-table="true"] td input,
  table[data-responsive-table="true"] td select,
  table[data-responsive-table="true"] td textarea {
    width: 100% !important;
    max-width: 100%;
  }

  table[data-responsive-table="true"] td .btn,
  table[data-responsive-table="true"] td button,
  table[data-responsive-table="true"] td a.mini {
    max-width: 100%;
  }

  table[data-responsive-table="true"] .inline-actions,
  table[data-responsive-table="true"] .table-actions,
  table[data-responsive-table="true"] .action-stack,
  table[data-responsive-table="true"] .horizontal-actions {
    justify-content: flex-start;
  }

  table[data-responsive-table="true"] .inline-actions > *,
  table[data-responsive-table="true"] .table-actions > *,
  table[data-responsive-table="true"] .action-stack > *,
  table[data-responsive-table="true"] .horizontal-actions > * {
    flex: 1 1 120px;
  }

  .qr-thumb {
    width: 72px;
    height: 72px;
    object-fit: contain;
  }

  .page-container .panel,
  .page-container .card-section {
    padding: 16px;
  }

  .page-container .section-title-row {
    align-items: stretch;
    gap: 10px;
  }

  .page-container .section-title-row,
  .page-container .section-title-row > div {
    min-width: 0;
  }
}

/* v77: stronger card tables for tablet/mobile widths */
@media (max-width: 1199px) {
  .page-container table[data-responsive-table="true"],
  .page-container table[data-responsive-table="true"].table,
  .page-container table[data-responsive-table="true"].compact-table,
  .page-container table[data-responsive-table="true"].admin-compact-table,
  .page-container .users-table,
  .page-container .categories-table,
  .page-container .coupons-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }

  .page-container table[data-responsive-table="true"] thead {
    display: none !important;
  }

  .page-container table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .page-container .categories-table tbody {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
  }

  .page-container table[data-responsive-table="true"] tr {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100% !important;
  }

  .page-container table[data-responsive-table="true"] td {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-container .users-table td:nth-child(1),
  .page-container .users-table td:nth-child(6),
  .page-container .users-table td:nth-child(7),
  .page-container .users-table td:nth-child(8),
  .page-container .users-table td:nth-child(9),
  .page-container .users-table td:nth-child(10),
  .page-container .users-table td:nth-child(11),
  .page-container .users-table td:nth-child(14) {
    grid-template-columns: minmax(88px, 36%) minmax(0, 1fr);
  }

  .page-container .users-table tr {
    border-inline-start: 5px solid #0ea5e9;
  }

  .page-container .users-table td:nth-child(2) {
    font-size: 1.05rem;
    font-weight: 950;
  }

  .page-container .categories-table tr {
    border-inline-start: 4px solid #14b8a6;
    padding: 12px !important;
  }

  .page-container .categories-table tr.category-row-off {
    border-inline-start-color: #94a3b8;
    background: #fbfdff;
  }

  .page-container .categories-table td {
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr) !important;
    gap: 8px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 0.88rem !important;
  }

  .page-container .categories-table td::before {
    font-size: 0.78rem !important;
  }

  .page-container .categories-table .table-input-sm,
  .page-container .categories-table .table-input-md,
  .page-container .categories-table .table-input-lg,
  .page-container .categories-table .emoji-input {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 11px !important;
    font-size: 0.9rem !important;
  }

  .page-container .categories-table .emoji-input {
    max-width: 74px !important;
    justify-self: start;
    font-size: 1.15rem !important;
  }

  .page-container .categories-table .category-actions,
  .page-container .categories-table .equal-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .page-container .categories-table .category-actions > button {
    grid-column: 1 / -1;
  }

  .page-container .categories-table .category-actions form,
  .page-container .categories-table .category-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 11px !important;
    font-size: 0.84rem !important;
  }

  .page-container .categories-table .btn-category-start {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.18) !important;
  }

  .page-container .categories-table .btn-category-stop {
    background: linear-gradient(135deg, #f97316, #ef4444) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.16) !important;
  }

  .page-container .category-table-wrap table,
  .page-container .users-table-wrap table,
  .page-container .coupon-table-wrap table {
    min-width: 0 !important;
  }

  .page-container table[data-responsive-table="true"] td::before {
    display: block;
    padding-top: 2px;
  }

  .page-container .categories-table td[data-label="التحكم"],
  .page-container .users-table td:last-child {
    align-items: stretch;
  }

  .page-container .categories-table td:nth-child(5),
  .page-container .categories-table td:last-child {
    grid-template-columns: 1fr !important;
  }

  .page-container .categories-table td:nth-child(5)::before,
  .page-container .categories-table td:last-child::before {
    margin-bottom: 6px;
  }

  .page-container .categories-table .mini-switch {
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 11px !important;
    background: #f8fafc !important;
  }

  .page-container .categories-table .mini-switch input {
    flex: 0 0 auto;
  }

  .page-container .categories-table .mini-switch span {
    flex: 1 1 auto;
    text-align: left;
    white-space: nowrap;
    font-size: 0.86rem;
  }
}

@media (max-width: 700px) {
  .page-container .categories-table tbody {
    grid-template-columns: 1fr !important;
  }

  .page-container .categories-table .category-actions,
  .page-container .categories-table .equal-actions {
    grid-template-columns: 1fr !important;
  }

  .page-container .categories-table .category-actions > button {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .page-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  table[data-responsive-table="true"] td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .page-container .categories-table td {
    grid-template-columns: 1fr !important;
  }

  .page-container .categories-table .category-actions,
  .page-container .categories-table .equal-actions {
    grid-template-columns: 1fr !important;
  }

  table[data-responsive-table="true"] td::before {
    font-size: 0.78rem;
  }

  .page-container > h1:first-child,
  .page-header h1 {
    font-size: 1.35rem !important;
  }
}

/* v82: final responsive category cards */
.page-container .category-table-wrap {
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

.page-container .categories-table[data-responsive-table="true"] {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.page-container .categories-table[data-responsive-table="true"] thead {
  display: none !important;
}

.page-container .categories-table[data-responsive-table="true"] tbody {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
}

.page-container .categories-table[data-responsive-table="true"] tr {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
  padding: 14px !important;
  border: 1px solid rgba(14, 165, 233, 0.16) !important;
  border-inline-start: 4px solid #14b8a6 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055) !important;
}

.page-container .categories-table[data-responsive-table="true"] tr.category-row-off {
  border-inline-start-color: #94a3b8 !important;
  background: #fbfdff !important;
}

.page-container .categories-table[data-responsive-table="true"] td {
  display: grid !important;
  grid-template-columns: minmax(104px, 32%) minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
  text-align: right !important;
  font-size: 0.9rem !important;
}

.page-container .categories-table[data-responsive-table="true"] td:last-child {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.page-container .categories-table[data-responsive-table="true"] td::before {
  content: attr(data-label);
  color: #64748b;
  font-size: 0.8rem !important;
  font-weight: 950;
  line-height: 1.5;
}

.page-container .categories-table td:nth-child(4),
.page-container .categories-table td:nth-child(5),
.page-container .categories-table td:last-child {
  grid-template-columns: 1fr !important;
}

.page-container .categories-table td:nth-child(4)::before,
.page-container .categories-table td:nth-child(5)::before,
.page-container .categories-table td:last-child::before {
  margin-bottom: 4px;
}

.page-container .category-create-form .category-display-select,
.page-container .categories-table .category-display-select,
.page-container .categories-table .table-input-sm,
.page-container .categories-table .table-input-md,
.page-container .categories-table .table-input-lg,
.page-container .categories-table .emoji-input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
}

.page-container .categories-table .emoji-input {
  max-width: 76px !important;
  justify-self: start;
  text-align: center;
  font-size: 1.15rem !important;
}

.page-container .categories-table .category-actions,
.page-container .categories-table .equal-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

.page-container .categories-table .category-actions > button,
.page-container .categories-table .category-actions form,
.page-container .categories-table .category-actions button {
  width: 100% !important;
  min-width: 0 !important;
}

.page-container .categories-table .category-actions > button {
  grid-column: auto !important;
}

.page-container .categories-table .category-actions button {
  min-height: 40px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  font-size: 0.84rem !important;
  font-weight: 950 !important;
  white-space: normal !important;
}

.page-container .categories-table .btn-category-start {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.16) !important;
}

.page-container .categories-table .btn-category-stop {
  background: linear-gradient(135deg, #f97316, #ef4444) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.14) !important;
}

@media (max-width: 760px) {
  .page-container .categories-table[data-responsive-table="true"] tbody {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 520px) {
  .page-container .categories-table[data-responsive-table="true"] td {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }

  .page-container .categories-table .category-actions,
  .page-container .categories-table .equal-actions {
    grid-template-columns: 1fr !important;
  }
}

/* v84: AdminLTE bridge */
.adminlte-hybrid-shell {
  --lte-sidebar-width: 282px;
  --lte-radius: 0.65rem;
  background: #f4f6f9 !important;
  color: #1f2937;
}

.adminlte-hybrid-shell .desktop-sidebar.app-sidebar {
  inset: 0 0 0 auto !important;
  width: var(--lte-sidebar-width) !important;
  min-height: 100vh !important;
  padding: 16px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #1f2937 !important;
  color: #d1d5db !important;
  box-shadow: 0 0 26px rgba(15, 23, 42, 0.18) !important;
}

.adminlte-hybrid-shell .main-layout.app-main {
  min-height: 100vh;
  margin-right: var(--lte-sidebar-width) !important;
  padding: 0 0 42px !important;
  background: #f4f6f9 !important;
}

.adminlte-hybrid-shell .desktop-topbar.app-header {
  position: sticky;
  top: 0;
  z-index: 850;
  min-height: 64px;
  margin: 0 !important;
  padding: 10px 26px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: blur(12px);
}

.adminlte-hybrid-shell .page-container.app-content {
  width: 100%;
  max-width: 1440px !important;
  padding: 24px 26px 88px !important;
}

.adminlte-hybrid-shell .sidebar-brand {
  min-height: 62px;
  margin: 0 0 14px !important;
  padding: 10px 8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 !important;
}

.adminlte-hybrid-shell .brand-mark,
.adminlte-hybrid-shell .brand-logo-img {
  width: 42px !important;
  height: 42px !important;
  border-radius: 0.75rem !important;
}

.adminlte-hybrid-shell .sidebar-profile {
  margin: 0 0 16px !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--lte-radius) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.adminlte-hybrid-shell .sidebar-profile strong,
.adminlte-hybrid-shell .brand-copy span {
  color: #ffffff !important;
}

.adminlte-hybrid-shell .sidebar-profile small {
  color: #a7b0bf !important;
}

.adminlte-hybrid-shell .nav-group-label {
  margin: 16px 10px 7px !important;
  color: #9ca3af !important;
  font-size: 0.73rem !important;
  letter-spacing: 0 !important;
}

.adminlte-hybrid-shell .clean-sidebar-nav a,
.adminlte-hybrid-shell .nav-accordion summary {
  min-height: 42px !important;
  margin: 2px 0 !important;
  padding: 9px 12px !important;
  border: 0 !important;
  border-radius: var(--lte-radius) !important;
  background: transparent !important;
  color: #d1d5db !important;
  box-shadow: none !important;
}

.adminlte-hybrid-shell .clean-sidebar-nav a span,
.adminlte-hybrid-shell .summary-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.95rem;
}

.adminlte-hybrid-shell .clean-sidebar-nav a:hover,
.adminlte-hybrid-shell .clean-sidebar-nav a.active,
.adminlte-hybrid-shell .nav-accordion[open] > summary {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #ffffff !important;
}

.adminlte-hybrid-shell .nav-accordion-links {
  margin: 4px 0 8px !important;
  padding: 0 10px 0 0 !important;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
}

.adminlte-hybrid-shell .nav-accordion-links a {
  min-height: 36px !important;
  padding: 8px 10px !important;
  font-size: 0.86rem !important;
  color: #b9c2d0 !important;
}

.adminlte-hybrid-shell .sidebar-footer {
  padding: 12px 14px !important;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0), #1f2937 40%) !important;
}

.adminlte-hybrid-shell .sidebar-footer .power-logout {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-content: center !important;
  border-radius: 0.75rem !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22) !important;
}

.adminlte-hybrid-shell .sidebar-footer .logout-text {
  display: none !important;
}

.adminlte-hybrid-shell .topbar-search input {
  min-height: 38px !important;
  border-radius: 0.55rem !important;
  background: #f8fafc !important;
}

.adminlte-hybrid-shell .page-container > .panel,
.adminlte-hybrid-shell .page-container > .card-section,
.adminlte-hybrid-shell .page-container > form > .panel,
.adminlte-hybrid-shell .page-container > form > .card-section,
.adminlte-hybrid-shell .page-container .card,
.adminlte-hybrid-shell .page-container .dashboard-card,
.adminlte-hybrid-shell .page-container .bot-status-card,
.adminlte-hybrid-shell .page-container .settings-group-card {
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 0.75rem !important;
  background: #ffffff !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.045) !important;
}

.adminlte-hybrid-shell .page-container > h1:first-child,
.adminlte-hybrid-shell .page-header h1,
.adminlte-hybrid-shell .hero-title,
.adminlte-hybrid-shell h1 {
  letter-spacing: 0 !important;
}

.adminlte-hybrid-shell .page-container table {
  border-color: rgba(148, 163, 184, 0.22) !important;
}

.adminlte-hybrid-shell .page-container table thead th {
  background: #f8fafc !important;
  color: #334155 !important;
}

.adminlte-hybrid-shell .btn,
.adminlte-hybrid-shell button {
  border-radius: 0.55rem;
}

@media (max-width: 1100px) {
  .adminlte-hybrid-shell .desktop-sidebar.app-sidebar,
  .adminlte-hybrid-shell .desktop-topbar.app-header {
    display: none !important;
  }

  .adminlte-hybrid-shell .main-layout.app-main {
    margin-right: 0 !important;
    padding: 0 0 90px !important;
  }

  .adminlte-hybrid-shell .page-container.app-content {
    padding: 18px 14px 94px !important;
    max-width: 100% !important;
  }
}

@media (max-width: 560px) {
  .adminlte-hybrid-shell .page-container.app-content {
    padding: 14px 10px 92px !important;
  }
}

/* v85: dashboard pulse status cards */
.adminlte-hybrid-shell .dashboard-pulse-panel {
  align-items: stretch;
}

.adminlte-hybrid-shell .pulse-list {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  align-items: stretch;
}

.adminlte-hybrid-shell .pulse-list a {
  min-height: 104px;
  align-content: center;
}

.adminlte-hybrid-shell .pulse-list a.pulse-status-card {
  gap: 7px !important;
  min-height: 104px !important;
  padding: 13px 14px !important;
  align-content: center !important;
}

.adminlte-hybrid-shell .pulse-list a.pulse-status-card b {
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  color: #475569 !important;
  font-weight: 950 !important;
  white-space: nowrap;
}

.adminlte-hybrid-shell .pulse-list a.pulse-status-card span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e !important;
  font-size: 0.86rem !important;
  line-height: 1.25 !important;
  font-weight: 950 !important;
}

.adminlte-hybrid-shell .pulse-list a.pulse-status-card small {
  font-size: 0.76rem !important;
  line-height: 1.35 !important;
  color: #64748b !important;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .adminlte-hybrid-shell .pulse-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .pulse-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .adminlte-hybrid-shell .pulse-list {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .pulse-list a,
  .adminlte-hybrid-shell .pulse-list a.pulse-status-card {
    min-height: 86px !important;
  }
}

/* v86: compact bot control status values */
.adminlte-hybrid-shell .bot-hero-state {
  min-width: min(290px, 100%) !important;
  padding: 14px 16px !important;
  gap: 7px !important;
}

.adminlte-hybrid-shell .bot-hero-state strong,
.adminlte-hybrid-shell .bot-status-card.ok strong {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 1rem !important;
  line-height: 1.25 !important;
  font-weight: 950 !important;
}

.adminlte-hybrid-shell .bot-status-card {
  min-height: 112px !important;
  align-content: center;
}

.adminlte-hybrid-shell .bot-status-card strong {
  font-size: 1.28rem !important;
  line-height: 1.25 !important;
  font-weight: 950 !important;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .bot-status-card:nth-child(2) strong,
.adminlte-hybrid-shell .bot-status-card:nth-child(3) strong {
  font-size: 1.08rem !important;
  letter-spacing: 0 !important;
}

.adminlte-hybrid-shell .readiness-item strong {
  font-size: 1.08rem !important;
  line-height: 1.3 !important;
  font-weight: 950 !important;
}

.adminlte-hybrid-shell .readiness-item.warn strong {
  color: #92400e !important;
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .bot-status-grid {
    grid-template-columns: 1fr !important;
  }

  .adminlte-hybrid-shell .bot-hero-state strong,
  .adminlte-hybrid-shell .bot-status-card.ok strong,
  .adminlte-hybrid-shell .bot-status-card strong,
  .adminlte-hybrid-shell .readiness-item strong {
    font-size: 0.98rem !important;
  }
}

/* v87: AdminLTE pass 1 - system logs */
.adminlte-hybrid-shell .adminlte-page-head {
  align-items: center !important;
  margin-bottom: 16px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.adminlte-hybrid-shell .adminlte-page-head h1 {
  margin: 8px 0 6px !important;
  font-size: clamp(1.5rem, 2.3vw, 2.1rem) !important;
  line-height: 1.25 !important;
}

.adminlte-hybrid-shell .adminlte-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.adminlte-hybrid-shell .adminlte-info-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.045);
}

.adminlte-hybrid-shell .adminlte-info-card .info-icon {
  display: inline-grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 0.7rem;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 1.25rem;
}

.adminlte-hybrid-shell .adminlte-info-card.ok .info-icon {
  background: #dcfce7;
  color: #047857;
}

.adminlte-hybrid-shell .adminlte-info-card.warn .info-icon {
  background: #fef3c7;
  color: #92400e;
}

.adminlte-hybrid-shell .adminlte-info-card small {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .adminlte-info-card strong {
  display: block;
  color: #0f172a;
  font-size: 1.06rem;
  line-height: 1.35;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .adminlte-content-card {
  margin-bottom: 16px !important;
  overflow: hidden;
}

.adminlte-hybrid-shell .adminlte-content-card > .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: #ffffff !important;
}

.adminlte-hybrid-shell .adminlte-content-card > .card-header h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 950;
}

.adminlte-hybrid-shell .adminlte-content-card > .card-body {
  padding: 16px 18px !important;
}

.adminlte-hybrid-shell .system-log-box {
  max-height: min(58vh, 620px) !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0.7rem !important;
  background: #0f172a !important;
  color: #dbeafe !important;
  font-size: 0.82rem !important;
  line-height: 1.65 !important;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  overflow: auto;
}

.adminlte-hybrid-shell .system-log-help .notes {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .adminlte-info-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .adminlte-content-card > .card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .adminlte-hybrid-shell .adminlte-content-card > .card-header .btn,
  .adminlte-hybrid-shell .adminlte-content-card > .card-header form,
  .adminlte-hybrid-shell .adminlte-page-head .quick-actions,
  .adminlte-hybrid-shell .adminlte-page-head .quick-actions .btn {
    width: 100%;
  }
}

/* v88: AdminLTE pass 2 - audit logs */
.adminlte-hybrid-shell .adminlte-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.75rem;
}

.adminlte-hybrid-shell .adminlte-table-wrap table {
  margin-bottom: 0 !important;
}

.adminlte-hybrid-shell .adminlte-table-wrap tbody tr:hover {
  background: #f8fafc;
}

.adminlte-hybrid-shell .audit-log-table th,
.adminlte-hybrid-shell .audit-log-table td {
  vertical-align: middle;
}

.adminlte-hybrid-shell .audit-log-table .admin-name {
  color: #0f172a;
  font-size: 0.92rem;
}

.adminlte-hybrid-shell .audit-description {
  min-width: 220px;
  color: #475569;
  line-height: 1.55;
}

.adminlte-hybrid-shell .audit-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.25;
}

.adminlte-hybrid-shell .audit-action-badge.create,
.adminlte-hybrid-shell .audit-action-badge.add,
.adminlte-hybrid-shell .audit-action-badge.approve {
  background: #dcfce7;
  color: #047857;
}

.adminlte-hybrid-shell .audit-action-badge.update,
.adminlte-hybrid-shell .audit-action-badge.edit {
  background: #dbeafe;
  color: #1d4ed8;
}

.adminlte-hybrid-shell .audit-action-badge.delete,
.adminlte-hybrid-shell .audit-action-badge.reject,
.adminlte-hybrid-shell .audit-action-badge.stop {
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .audit-log-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .adminlte-hybrid-shell .audit-log-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #3b82f6;
  }

  .adminlte-hybrid-shell .audit-log-table[data-responsive-table="true"] td {
    grid-template-columns: minmax(88px, 32%) minmax(0, 1fr) !important;
  }

  .adminlte-hybrid-shell .audit-description {
    min-width: 0;
  }
}

/* v89: AdminLTE pass 3 - content center */
.adminlte-hybrid-shell .content-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adminlte-hybrid-shell .content-text-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 14px;
}

.adminlte-hybrid-shell .content-edit-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.adminlte-hybrid-shell .content-edit-card.is-off {
  background: #f8fafc;
  border-style: dashed;
}

.adminlte-hybrid-shell .content-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.adminlte-hybrid-shell .content-card-head small,
.adminlte-hybrid-shell .content-edit-card label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .content-edit-card label {
  display: grid;
  gap: 6px;
}

.adminlte-hybrid-shell .content-switch,
.adminlte-hybrid-shell .content-public-switch {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 !important;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569 !important;
  white-space: nowrap;
}

.adminlte-hybrid-shell .content-switch {
  width: 46px;
  min-width: 46px;
  justify-content: center;
  padding: 6px !important;
}

.adminlte-hybrid-shell .content-switch .form-check-input {
  margin: 0 !important;
}

.adminlte-hybrid-shell .content-textarea {
  min-height: 128px;
  resize: vertical;
}

.adminlte-hybrid-shell .content-save-btn {
  justify-self: start;
  min-width: 140px;
}

.adminlte-hybrid-shell .content-update-form {
  display: grid;
  gap: 12px;
}

.adminlte-hybrid-shell .content-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(130px, 0.7fr) minmax(160px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
}

.adminlte-hybrid-shell .content-updates-table {
  min-width: 1080px;
}

.adminlte-hybrid-shell .content-update-edit-cell {
  min-width: 420px;
}

.adminlte-hybrid-shell .content-inline-edit-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(92px, 0.45fr) minmax(120px, 0.6fr);
  gap: 8px;
  align-items: start;
}

.adminlte-hybrid-shell .content-inline-edit-form textarea,
.adminlte-hybrid-shell .content-inline-edit-form .content-public-switch,
.adminlte-hybrid-shell .content-inline-edit-form button {
  grid-column: 1 / -1;
}

.adminlte-hybrid-shell .content-row-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  min-width: 170px;
}

.adminlte-hybrid-shell .content-row-actions form,
.adminlte-hybrid-shell .content-row-actions button {
  width: 100%;
}

@media (max-width: 1100px) {
  .adminlte-hybrid-shell .content-form-grid,
  .adminlte-hybrid-shell .content-inline-edit-form {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .content-public-switch,
  .adminlte-hybrid-shell .content-save-btn,
  .adminlte-hybrid-shell .content-update-form .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .content-info-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .content-updates-table[data-responsive-table="true"] {
    min-width: 0 !important;
  }

  .adminlte-hybrid-shell .content-updates-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .adminlte-hybrid-shell .content-updates-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #0ea5e9;
  }

  .adminlte-hybrid-shell .content-updates-table[data-responsive-table="true"] td {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .adminlte-hybrid-shell .content-update-edit-cell {
    min-width: 0;
  }

  .adminlte-hybrid-shell .content-row-actions {
    grid-template-columns: 1fr;
  }
}

/* v91: AdminLTE pass 4 - expense edit logs */
.adminlte-hybrid-shell .expense-edit-log-table {
  min-width: 980px;
}

.adminlte-hybrid-shell .expense-edit-log-table .change-value {
  max-width: 220px;
  color: #475569;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .expense-edit-log-table .old-value {
  color: #92400e;
}

.adminlte-hybrid-shell .expense-edit-log-table .new-value {
  color: #047857;
  font-weight: 850;
}

.adminlte-hybrid-shell .expense-edit-log-table .audit-description {
  min-width: 240px;
  max-width: 420px;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .expense-edit-log-table[data-responsive-table="true"] {
    min-width: 0 !important;
  }

  .adminlte-hybrid-shell .expense-edit-log-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .adminlte-hybrid-shell .expense-edit-log-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #14b8a6;
  }

  .adminlte-hybrid-shell .expense-edit-log-table[data-responsive-table="true"] td {
    grid-template-columns: minmax(88px, 32%) minmax(0, 1fr) !important;
  }

  .adminlte-hybrid-shell .expense-edit-log-table .change-value,
  .adminlte-hybrid-shell .expense-edit-log-table .audit-description {
    max-width: none;
    min-width: 0;
  }
}

/* v92: AdminLTE pass 5 - admin users */
.adminlte-hybrid-shell .admins-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.adminlte-hybrid-shell .admins-create-form label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .admins-create-form button {
  min-height: 42px;
}

.adminlte-hybrid-shell .admins-permission-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.adminlte-hybrid-shell .admins-table {
  min-width: 1180px;
}

.adminlte-hybrid-shell .admins-table .role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.78rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .admin-update-cell {
  min-width: 430px;
}

.adminlte-hybrid-shell .admin-update-grid {
  display: grid;
  gap: 8px;
}

.adminlte-hybrid-shell .admin-mini-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 92px;
  gap: 8px;
  align-items: center;
}

.adminlte-hybrid-shell .admin-mini-form input,
.adminlte-hybrid-shell .admin-mini-form select {
  min-height: 36px;
  font-size: 0.86rem;
}

.adminlte-hybrid-shell .admin-row-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  min-width: 150px;
}

.adminlte-hybrid-shell .admin-row-actions form,
.adminlte-hybrid-shell .admin-row-actions button {
  width: 100%;
}

@media (max-width: 1100px) {
  .adminlte-hybrid-shell .admins-create-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .admins-create-form {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .admins-table[data-responsive-table="true"] {
    min-width: 0 !important;
  }

  .adminlte-hybrid-shell .admins-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .adminlte-hybrid-shell .admins-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #6366f1;
  }

  .adminlte-hybrid-shell .admins-table[data-responsive-table="true"] td {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .adminlte-hybrid-shell .admin-update-cell {
    min-width: 0;
  }

  .adminlte-hybrid-shell .admin-mini-form,
  .adminlte-hybrid-shell .admin-row-actions {
    grid-template-columns: 1fr;
  }
}

/* v93: AdminLTE pass 6 - server control */
.adminlte-hybrid-shell .server-disabled-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border-radius: 0.75rem;
  font-weight: 850;
}

.adminlte-hybrid-shell .server-message-box {
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #334155;
  font-weight: 850;
  line-height: 1.7;
}

.adminlte-hybrid-shell .server-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.adminlte-hybrid-shell .server-action-grid form {
  margin: 0;
}

.adminlte-hybrid-shell .server-action-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0f172a;
  text-align: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.045);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.adminlte-hybrid-shell .server-action-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.adminlte-hybrid-shell .server-action-card i,
.adminlte-hybrid-shell .server-action-svg {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 0.7rem;
  font-size: 1.18rem;
}

.adminlte-hybrid-shell .server-action-svg {
  padding: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adminlte-hybrid-shell .server-action-card.update {
  border-color: rgba(14, 165, 233, 0.28);
}

.adminlte-hybrid-shell .server-action-card.update i,
.adminlte-hybrid-shell .server-action-card.update .server-action-svg {
  background: #e0f2fe;
  color: #0369a1;
}

.adminlte-hybrid-shell .server-action-card.restart {
  border-color: rgba(245, 158, 11, 0.32);
}

.adminlte-hybrid-shell .server-action-card.restart i,
.adminlte-hybrid-shell .server-action-card.restart .server-action-svg {
  background: #fef3c7;
  color: #92400e;
}

.adminlte-hybrid-shell .server-action-card.stop {
  border-color: rgba(239, 68, 68, 0.32);
}

.adminlte-hybrid-shell .server-action-card.stop i,
.adminlte-hybrid-shell .server-action-card.stop .server-action-svg {
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .server-action-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .server-action-card {
    min-height: 56px;
  }
}

.adminlte-hybrid-shell .server-notes-card .notes i,
.adminlte-hybrid-shell .server-note-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  place-items: center;
  border-radius: 0.45rem;
  background: #f1f5f9;
  color: #0369a1;
  font-weight: 950;
}

/* v97: AdminLTE pass 7 - update center */
.adminlte-hybrid-shell .update-center-info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.adminlte-hybrid-shell .update-center-head,
.adminlte-hybrid-shell .update-center-info-grid,
.adminlte-hybrid-shell .update-center-layout,
.adminlte-hybrid-shell .update-preview-panel,
.adminlte-hybrid-shell .update-packages-card,
.adminlte-hybrid-shell .rollback-points-card,
.adminlte-hybrid-shell .update-history-card {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.adminlte-hybrid-shell .update-center-head {
  display: flex !important;
}

.adminlte-hybrid-shell .update-center-info-grid .info-icon {
  font-size: 0.85rem;
  font-weight: 950;
  text-align: center;
}

.adminlte-hybrid-shell .update-center-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.adminlte-hybrid-shell .update-upload-form {
  display: grid;
  gap: 12px;
}

.adminlte-hybrid-shell .update-upload-form label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .update-safe-note {
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 0.75rem;
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 850;
  line-height: 1.6;
}

.adminlte-hybrid-shell .update-rules-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adminlte-hybrid-shell .update-allowed-details {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.75rem;
  background: #f8fafc;
}

.adminlte-hybrid-shell .update-allowed-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #334155;
  font-weight: 950;
}

.adminlte-hybrid-shell .update-paths-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 14px 14px;
}

.adminlte-hybrid-shell .update-paths-list code {
  padding: 5px 8px;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #0f766e;
  font-size: 0.78rem;
}

.adminlte-hybrid-shell .update-center-table,
.adminlte-hybrid-shell .update-preview-table {
  min-width: 760px;
}

.adminlte-hybrid-shell .update-center-table code,
.adminlte-hybrid-shell .update-preview-table code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.adminlte-hybrid-shell .update-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.adminlte-hybrid-shell .update-preview-actions form,
.adminlte-hybrid-shell .update-preview-actions button {
  min-width: 180px;
}

@media (max-width: 1100px) {
  .adminlte-hybrid-shell .update-center-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .adminlte-hybrid-shell .update-center-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .update-center-info-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .update-center-table[data-responsive-table="true"],
  .adminlte-hybrid-shell .update-preview-table[data-responsive-table="true"] {
    min-width: 0 !important;
  }

  .adminlte-hybrid-shell .update-center-table[data-responsive-table="true"] tbody,
  .adminlte-hybrid-shell .update-preview-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .adminlte-hybrid-shell .update-center-table[data-responsive-table="true"] tr,
  .adminlte-hybrid-shell .update-preview-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #0ea5e9;
  }

  .adminlte-hybrid-shell .update-center-table[data-responsive-table="true"] td,
  .adminlte-hybrid-shell .update-preview-table[data-responsive-table="true"] td {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .adminlte-hybrid-shell .update-preview-actions,
  .adminlte-hybrid-shell .update-preview-actions form,
  .adminlte-hybrid-shell .update-preview-actions button {
    width: 100%;
  }
}

/* v99: AdminLTE pass 8 - update safety */
.adminlte-hybrid-shell .update-safety-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adminlte-hybrid-shell .update-safety-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}

.adminlte-hybrid-shell .update-safety-check {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.adminlte-hybrid-shell .update-safety-check .check-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 0.7rem;
  background: #dcfce7;
  color: #047857;
  font-weight: 950;
}

.adminlte-hybrid-shell .update-safety-check.warn .check-icon {
  background: #fef3c7;
  color: #92400e;
}

.adminlte-hybrid-shell .update-safety-check strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-weight: 950;
}

.adminlte-hybrid-shell .update-safety-check p {
  min-height: 44px;
  margin: 0 0 10px;
  color: #64748b;
  line-height: 1.55;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .update-safety-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
}

.adminlte-hybrid-shell .update-safe-steps {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding-inline-start: 1.2rem;
}

.adminlte-hybrid-shell .update-safe-steps li {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.65rem;
  background: #f8fafc;
  line-height: 1.65;
  font-weight: 800;
}

.adminlte-hybrid-shell .update-command-list {
  display: grid;
  gap: 10px;
}

.adminlte-hybrid-shell .update-command-list code {
  display: block;
  padding: 11px 12px;
  border-radius: 0.65rem;
  background: #0f172a;
  color: #dbeafe;
  direction: ltr;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 1000px) {
  .adminlte-hybrid-shell .update-safety-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .update-safety-info-grid {
    grid-template-columns: 1fr;
  }
}

/* v100: AdminLTE pass 9 - backups */
.adminlte-hybrid-shell .backups-head {
  align-items: center;
}

.adminlte-hybrid-shell .backups-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adminlte-hybrid-shell .backups-info-grid .adminlte-info-card strong {
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .backups-action-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.adminlte-hybrid-shell .backup-action-card .card-header,
.adminlte-hybrid-shell .backups-list-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-hybrid-shell .backup-action-card .card-body {
  display: grid;
  gap: 14px;
}

.adminlte-hybrid-shell .backup-form {
  display: grid;
  gap: 10px;
}

.adminlte-hybrid-shell .backup-form .form-label {
  margin-bottom: 0;
  color: #475569;
  font-weight: 900;
}

.adminlte-hybrid-shell .backup-form .form-control {
  min-height: 46px;
  border-radius: 0.8rem;
}

.adminlte-hybrid-shell .backup-main-button {
  min-height: 44px;
  border-radius: 999px;
  font-weight: 950;
}

.adminlte-hybrid-shell .backup-warning-box {
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 0.8rem;
  background: #fffbeb;
  color: #92400e;
  line-height: 1.65;
  font-weight: 850;
}

.adminlte-hybrid-shell .backups-table {
  min-width: 860px;
}

.adminlte-hybrid-shell .backups-table code {
  color: #0f766e;
  white-space: normal;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .backup-row-actions {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 8px;
  min-width: 250px;
}

.adminlte-hybrid-shell .backup-row-actions form {
  margin: 0;
}

.adminlte-hybrid-shell .backup-row-actions .btn {
  width: 100%;
  min-height: 36px;
  border-radius: 999px;
  font-weight: 900;
}

@media (max-width: 1000px) {
  .adminlte-hybrid-shell .backups-action-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .backups-info-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .backups-table[data-responsive-table="true"] {
    min-width: 0 !important;
  }

  .adminlte-hybrid-shell .backups-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .adminlte-hybrid-shell .backups-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #0ea5e9;
  }

  .adminlte-hybrid-shell .backups-table[data-responsive-table="true"] td {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .adminlte-hybrid-shell .backup-row-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
  }
}

/* v102: AdminLTE pass 10 - maintenance */
.adminlte-hybrid-shell .maintenance-head {
  align-items: center;
}

.adminlte-hybrid-shell .maintenance-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adminlte-hybrid-shell .maintenance-info-grid .adminlte-info-card strong {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .maintenance-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.adminlte-hybrid-shell .maintenance-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-hybrid-shell .maintenance-card .card-body {
  display: grid;
  gap: 14px;
}

.adminlte-hybrid-shell .adminlte-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .adminlte-status-pill.ok {
  border-color: rgba(34, 197, 94, 0.28);
  background: #dcfce7;
  color: #047857;
}

.adminlte-hybrid-shell .adminlte-status-pill.warn {
  border-color: rgba(239, 68, 68, 0.26);
  background: #fee2e2;
  color: #b91c1c;
}

.adminlte-hybrid-shell .maintenance-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.85rem;
  background: #f8fafc;
}

.adminlte-hybrid-shell .maintenance-switch-row strong {
  display: block;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .maintenance-switch-row small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  line-height: 1.5;
  font-weight: 800;
}

.adminlte-hybrid-shell .maintenance-switch-row .form-check-input {
  flex: 0 0 auto;
  width: 3rem;
  height: 1.55rem;
  margin: 0;
  cursor: pointer;
}

.adminlte-hybrid-shell .maintenance-card .form-label {
  margin-bottom: 0;
  color: #475569;
  font-weight: 900;
}

.adminlte-hybrid-shell .maintenance-card .form-control {
  min-height: 46px;
  border-radius: 0.8rem;
}

.adminlte-hybrid-shell .maintenance-card textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.adminlte-hybrid-shell .maintenance-field-grid {
  display: grid;
  gap: 14px;
}

.adminlte-hybrid-shell .maintenance-field-grid code {
  color: #db2777;
}

.adminlte-hybrid-shell .maintenance-save-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 1rem;
  background: linear-gradient(135deg, #f0f9ff, #ffffff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.adminlte-hybrid-shell .maintenance-save-panel strong {
  display: block;
  color: #0f172a;
  font-weight: 950;
}

.adminlte-hybrid-shell .maintenance-save-panel small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-weight: 800;
}

.adminlte-hybrid-shell .maintenance-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.adminlte-hybrid-shell .maintenance-save-actions .btn {
  min-width: 150px;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 950;
}

@media (max-width: 1000px) {
  .adminlte-hybrid-shell .maintenance-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .maintenance-info-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .maintenance-switch-row,
  .adminlte-hybrid-shell .maintenance-save-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .adminlte-hybrid-shell .maintenance-switch-row .form-check-input {
    align-self: flex-start;
  }

  .adminlte-hybrid-shell .maintenance-save-actions,
  .adminlte-hybrid-shell .maintenance-save-actions .btn {
    width: 100%;
  }
}

/* v103: AdminLTE pass 11 - bot messages */
.adminlte-hybrid-shell .bot-messages-head {
  align-items: center;
}

.adminlte-hybrid-shell .bot-messages-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adminlte-hybrid-shell .bot-messages-info-grid .adminlte-info-card strong {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.2;
}

.adminlte-hybrid-shell .bot-messages-guide {
  margin-bottom: 16px;
}

.adminlte-hybrid-shell .bot-messages-guide .card-header,
.adminlte-hybrid-shell .bot-message-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-hybrid-shell .bot-message-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.adminlte-hybrid-shell .bot-message-notes span {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 0.8rem;
  background: #f0f9ff;
  color: #075985;
  line-height: 1.55;
  font-weight: 850;
}

.adminlte-hybrid-shell .bot-message-notes code {
  color: #db2777;
}

.adminlte-hybrid-shell .bot-messages-list {
  display: grid;
  gap: 16px;
}

.adminlte-hybrid-shell .bot-message-card {
  margin-bottom: 0;
}

.adminlte-hybrid-shell .bot-message-card .eyebrow {
  direction: ltr;
  text-align: left;
  color: #db2777;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .bot-message-card .card-body {
  display: grid;
  gap: 12px;
}

.adminlte-hybrid-shell .bot-message-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  min-width: 62px;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  border: 2px solid #d4d4d8;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
  font-family: Arial, sans-serif;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  overflow: hidden;
}

.adminlte-hybrid-shell .bot-message-switch .form-check-input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.adminlte-hybrid-shell .bot-message-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.28);
}

.adminlte-hybrid-shell .bot-message-switch span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  text-align: right;
}

.adminlte-hybrid-shell .bot-message-switch.is-on {
  background: #22c55e;
}

.adminlte-hybrid-shell .bot-message-switch.is-on::before {
  right: 2px;
  left: auto;
}

.adminlte-hybrid-shell .bot-message-switch.is-on span {
  text-align: left;
}

.adminlte-hybrid-shell .bot-message-switch.is-off {
  background: #ef4444;
}

.adminlte-hybrid-shell .admin-status-toggle {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

.adminlte-hybrid-shell .admin-status-toggle.is-on {
  border-color: rgba(34, 197, 94, 0.28);
  background: #dcfce7;
  color: #047857;
}

.adminlte-hybrid-shell .admin-status-toggle.is-off {
  border-color: rgba(239, 68, 68, 0.26);
  background: #fee2e2;
  color: #b91c1c;
}

.adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle {
  position: relative;
  width: 62px;
  min-width: 62px;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  border: 2px solid #d4d4d8;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.28);
}

.adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle.is-on {
  justify-content: flex-start;
  background: #22c55e;
  color: #ffffff;
}

.adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle.is-on::before {
  right: 2px;
  left: auto;
}

.adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle.is-off {
  justify-content: flex-end;
  background: #ef4444;
  color: #ffffff;
}

.adminlte-hybrid-shell .bot-message-switch.admin-status-toggle.is-on {
  background: #22c55e;
  color: #ffffff;
}

.adminlte-hybrid-shell .bot-message-switch.admin-status-toggle.is-off {
  background: #ef4444;
  color: #ffffff;
}

.adminlte-hybrid-shell .admin-toggle-button,
.admin-toggle-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  min-width: 62px;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  border: 2px solid #d4d4d8;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  text-align: right;
}

.adminlte-hybrid-shell .admin-toggle-button.is-on,
.admin-toggle-button.is-on {
  border-color: #d4d4d8 !important;
  background: #22c55e !important;
  color: #ffffff !important;
  justify-content: flex-start;
  text-align: left;
}

.adminlte-hybrid-shell .admin-toggle-button.is-off,
.admin-toggle-button.is-off {
  border-color: #d4d4d8 !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  justify-content: flex-end;
  text-align: right;
}

.adminlte-hybrid-shell .admin-toggle-button::before,
.admin-toggle-button::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.28);
}

.adminlte-hybrid-shell .admin-toggle-button.is-on::before,
.admin-toggle-button.is-on::before {
  right: 2px;
  left: auto;
}

.adminlte-hybrid-shell .admin-toggle-button.is-off::before,
.admin-toggle-button.is-off::before {
  right: auto;
  left: 2px;
}

.adminlte-hybrid-shell .bot-message-fields {
  display: grid;
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1fr);
  gap: 12px;
}

.adminlte-hybrid-shell .bot-message-card .form-label {
  margin-bottom: 6px;
  color: #475569;
  font-weight: 900;
}

.adminlte-hybrid-shell .bot-message-card .form-control {
  min-height: 46px;
  border-radius: 0.8rem;
}

.adminlte-hybrid-shell .bot-message-card input[disabled] {
  background: #f8fafc;
  color: #64748b;
  font-weight: 850;
}

.adminlte-hybrid-shell .bot-message-body {
  min-height: 150px;
  line-height: 1.75;
  resize: vertical;
}

.adminlte-hybrid-shell .bot-message-actions {
  display: flex;
  justify-content: flex-start;
}

.adminlte-hybrid-shell .bot-message-actions .btn {
  min-width: 170px;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 950;
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .bot-message-notes,
  .adminlte-hybrid-shell .bot-message-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .bot-messages-info-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .bot-message-card .card-header,
  .adminlte-hybrid-shell .bot-messages-guide .card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .adminlte-hybrid-shell .bot-message-switch {
    justify-content: center;
    width: 62px;
  }

  .adminlte-hybrid-shell .bot-message-actions,
  .adminlte-hybrid-shell .bot-message-actions .btn {
    width: 100%;
  }
}

/* v107: compact functional ON/OFF switches */
.adminlte-hybrid-shell .bot-message-switch,
.adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle,
.adminlte-hybrid-shell .admin-toggle-button,
.admin-toggle-button {
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 9px !important;
}

.adminlte-hybrid-shell .bot-message-switch .form-check-input {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .bot-message-switch,
  .adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle,
  .adminlte-hybrid-shell .admin-toggle-button,
  .admin-toggle-button {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    height: 28px !important;
    min-height: 28px !important;
    justify-content: center !important;
  }

  .adminlte-hybrid-shell .bot-message-switch.is-on,
  .adminlte-hybrid-shell .admin-toggle-button.is-on,
  .adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle.is-on {
    justify-content: flex-start !important;
  }

  .adminlte-hybrid-shell .bot-message-switch.is-off,
  .adminlte-hybrid-shell .admin-toggle-button.is-off,
  .adminlte-hybrid-shell .adminlte-status-pill.admin-status-toggle.is-off {
    justify-content: flex-end !important;
  }
}

/* v108: AdminLTE pass 12 - theme settings */
.adminlte-hybrid-shell .theme-head {
  align-items: center;
}

.adminlte-hybrid-shell .theme-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.adminlte-hybrid-shell .theme-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  margin-bottom: 18px;
}

.adminlte-hybrid-shell .theme-preview-panel .card-header,
.adminlte-hybrid-shell .theme-settings-panel .card-header,
.adminlte-hybrid-shell .theme-reference-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-hybrid-shell .theme-preview-panel .card-body,
.adminlte-hybrid-shell .theme-settings-panel .card-body {
  display: grid;
  gap: 16px;
}

.adminlte-hybrid-shell .theme-live-preview {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  background: var(--preview-bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.adminlte-hybrid-shell .theme-live-top {
  height: 58px;
  background: linear-gradient(90deg, var(--preview-primary), var(--preview-accent));
}

.adminlte-hybrid-shell .theme-live-body {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--preview-surface);
  color: var(--preview-text);
}

.adminlte-hybrid-shell .theme-live-body span {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--preview-primary) 12%, #fff);
  color: var(--preview-primary);
  font-size: 0.78rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .theme-live-body strong {
  font-size: 1.25rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .theme-live-body p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
  font-weight: 800;
}

.adminlte-hybrid-shell .theme-preview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adminlte-hybrid-shell .theme-preview-buttons button {
  min-height: 36px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--preview-primary);
  color: #fff;
  font-weight: 950;
}

.adminlte-hybrid-shell .theme-preview-buttons button + button {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  color: var(--preview-primary);
}

.adminlte-hybrid-shell .theme-logo-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: #f8fafc;
}

.adminlte-hybrid-shell .theme-logo-preview {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed rgba(14, 165, 233, 0.32);
  border-radius: 0.85rem;
  background: #ffffff;
}

.adminlte-hybrid-shell .theme-logo-preview img {
  max-width: 120px;
  max-height: 76px;
  object-fit: contain;
}

.adminlte-hybrid-shell .theme-logo-preview span {
  color: #64748b;
  font-weight: 850;
}

.adminlte-hybrid-shell .theme-remove-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-weight: 850;
}

.adminlte-hybrid-shell .theme-field-grid,
.adminlte-hybrid-shell .theme-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.adminlte-hybrid-shell .theme-field,
.adminlte-hybrid-shell .theme-color-field {
  display: grid;
  gap: 7px;
}

.adminlte-hybrid-shell .theme-field > span,
.adminlte-hybrid-shell .theme-color-field > span {
  color: #475569;
  font-weight: 950;
}

.adminlte-hybrid-shell .theme-field .form-select,
.adminlte-hybrid-shell .theme-logo-box .form-control {
  min-height: 44px;
  border-radius: 0.8rem;
}

.adminlte-hybrid-shell .theme-field small {
  color: #64748b;
  line-height: 1.5;
  font-weight: 800;
}

.adminlte-hybrid-shell .theme-color-input {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
}

.adminlte-hybrid-shell .theme-color-input input[type="color"] {
  width: 54px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.8rem;
  background: #fff;
}

.adminlte-hybrid-shell .theme-color-input input[type="text"] {
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.8rem;
  padding: 8px 10px;
  background: #f8fafc;
  color: #475569;
  font-weight: 850;
}

.adminlte-hybrid-shell .theme-save-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 1rem;
  background: linear-gradient(135deg, #f0f9ff, #ffffff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.adminlte-hybrid-shell .theme-save-panel strong {
  display: block;
  color: #0f172a;
  font-weight: 950;
}

.adminlte-hybrid-shell .theme-save-panel small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-weight: 800;
}

.adminlte-hybrid-shell .theme-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.adminlte-hybrid-shell .theme-save-actions .btn {
  min-width: 150px;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 950;
}

.adminlte-hybrid-shell .theme-reference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.adminlte-hybrid-shell .theme-reference-grid span {
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 0.8rem;
  background: #f0f9ff;
  color: #075985;
  line-height: 1.55;
  font-weight: 850;
}

@media (max-width: 1100px) {
  .adminlte-hybrid-shell .theme-admin-layout,
  .adminlte-hybrid-shell .theme-reference-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .theme-head-actions,
  .adminlte-hybrid-shell .theme-head-actions .btn,
  .adminlte-hybrid-shell .theme-save-actions,
  .adminlte-hybrid-shell .theme-save-actions .btn {
    width: 100%;
  }

  .adminlte-hybrid-shell .theme-field-grid,
  .adminlte-hybrid-shell .theme-color-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .theme-save-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

/* v109: AdminLTE pass 13 - email settings */
.adminlte-hybrid-shell .email-head {
  align-items: center;
}

.adminlte-hybrid-shell .email-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adminlte-hybrid-shell .email-info-grid .adminlte-info-card strong {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .email-note-card {
  margin-bottom: 16px;
}

.adminlte-hybrid-shell .email-note-card .card-body {
  display: grid;
  gap: 6px;
}

.adminlte-hybrid-shell .email-note-card strong {
  color: #0f172a;
  font-weight: 950;
}

.adminlte-hybrid-shell .email-note-card span,
.adminlte-hybrid-shell .email-note-card small {
  color: #64748b;
  line-height: 1.65;
  font-weight: 800;
}

.adminlte-hybrid-shell .email-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  gap: 16px;
  margin-bottom: 18px;
}

.adminlte-hybrid-shell .email-smtp-card .card-header,
.adminlte-hybrid-shell .email-secret-card .card-header,
.adminlte-hybrid-shell .email-test-card .card-header,
.adminlte-hybrid-shell .email-log-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminlte-hybrid-shell .email-smtp-card .card-body,
.adminlte-hybrid-shell .email-secret-card .card-body,
.adminlte-hybrid-shell .email-test-card .card-body {
  display: grid;
  gap: 14px;
}

.adminlte-hybrid-shell .email-help-box {
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 0.85rem;
  background: #f0f9ff;
  color: #075985;
  line-height: 1.65;
  font-weight: 850;
}

.adminlte-hybrid-shell .email-help-box code {
  color: #db2777;
}

.adminlte-hybrid-shell .email-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.adminlte-hybrid-shell .email-field {
  display: grid;
  gap: 7px;
}

.adminlte-hybrid-shell .email-field > span {
  color: #475569;
  font-weight: 950;
}

.adminlte-hybrid-shell .email-field .form-control {
  min-height: 44px;
  border-radius: 0.8rem;
}

.adminlte-hybrid-shell .email-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.85rem;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
}

.adminlte-hybrid-shell .email-check-row.danger {
  border-color: rgba(239, 68, 68, 0.18);
  background: #fee2e2;
  color: #b91c1c;
}

.adminlte-hybrid-shell .email-secret-card .email-check-row.danger {
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 950;
}

.adminlte-hybrid-shell .email-status-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 62px;
  min-width: 62px;
  height: 28px;
  padding: 0 9px;
  border: 2px solid #d4d4d8;
  border-radius: 999px;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

.adminlte-hybrid-shell .email-status-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.28);
}

.adminlte-hybrid-shell .email-status-switch input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.adminlte-hybrid-shell .email-status-switch span {
  position: relative;
  z-index: 1;
  width: 100%;
}

.adminlte-hybrid-shell .email-status-switch.is-on {
  justify-content: flex-start;
  background: #22c55e;
}

.adminlte-hybrid-shell .email-status-switch.is-on::before {
  right: 2px;
  left: auto;
}

.adminlte-hybrid-shell .email-status-switch.is-on span {
  text-align: left;
}

.adminlte-hybrid-shell .email-status-switch.is-off {
  justify-content: flex-end;
  background: #ef4444;
}

.adminlte-hybrid-shell .email-status-switch.is-off span {
  text-align: right;
}

.adminlte-hybrid-shell .email-secret-status {
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 0.8rem;
  background: #dcfce7;
  color: #047857;
  font-weight: 900;
}

.adminlte-hybrid-shell .email-save-button {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 950;
}

.adminlte-hybrid-shell .email-test-card {
  margin-bottom: 18px;
}

.adminlte-hybrid-shell .email-test-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.adminlte-hybrid-shell .email-test-form .btn {
  min-width: 150px;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 950;
}

.adminlte-hybrid-shell .email-log-table {
  min-width: 880px;
}

.adminlte-hybrid-shell .email-log-table td {
  overflow-wrap: anywhere;
}

.adminlte-hybrid-shell .email-log-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.8rem;
  font-weight: 950;
}

.adminlte-hybrid-shell .email-log-status.ok {
  background: #dcfce7;
  color: #047857;
}

@media (max-width: 1050px) {
  .adminlte-hybrid-shell .email-settings-layout,
  .adminlte-hybrid-shell .email-test-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .adminlte-hybrid-shell .email-info-grid,
  .adminlte-hybrid-shell .email-field-grid {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .email-log-table[data-responsive-table="true"] {
    min-width: 0 !important;
  }

  .adminlte-hybrid-shell .email-log-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .adminlte-hybrid-shell .email-log-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #0ea5e9;
  }

  .adminlte-hybrid-shell .email-log-table[data-responsive-table="true"] td {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .adminlte-hybrid-shell .email-test-form .btn {
    width: 100%;
  }
}

/* v111: local Bootstrap/AdminLTE fallback to avoid CDN delays */
.adminlte-hybrid-shell .text-muted,
.text-muted {
  color: var(--muted) !important;
}

.adminlte-hybrid-shell .mb-0,
.mb-0 {
  margin-bottom: 0 !important;
}

.adminlte-hybrid-shell .mb-1,
.mb-1 {
  margin-bottom: 0.25rem !important;
}

.adminlte-hybrid-shell .mb-2,
.mb-2 {
  margin-bottom: 0.5rem !important;
}

.adminlte-hybrid-shell .mb-3,
.mb-3 {
  margin-bottom: 1rem !important;
}

.adminlte-hybrid-shell .mt-2,
.mt-2 {
  margin-top: 0.5rem !important;
}

.adminlte-hybrid-shell .mt-3,
.mt-3 {
  margin-top: 1rem !important;
}

.adminlte-hybrid-shell .mt-4,
.mt-4 {
  margin-top: 1.5rem !important;
}

.adminlte-hybrid-shell .h5,
.h5 {
  font-size: 1.05rem !important;
  font-weight: 950 !important;
}

.adminlte-hybrid-shell .h6,
.h6 {
  font-size: 0.95rem !important;
  font-weight: 950 !important;
}

.adminlte-hybrid-shell .d-flex,
.d-flex {
  display: flex !important;
}

.adminlte-hybrid-shell .flex-wrap,
.flex-wrap {
  flex-wrap: wrap !important;
}

.adminlte-hybrid-shell .justify-content-between,
.justify-content-between {
  justify-content: space-between !important;
}

.adminlte-hybrid-shell .align-items-center,
.align-items-center {
  align-items: center !important;
}

.adminlte-hybrid-shell .align-items-start,
.align-items-start {
  align-items: flex-start !important;
}

.adminlte-hybrid-shell .gap-2,
.gap-2 {
  gap: 0.5rem !important;
}

.adminlte-hybrid-shell .gap-3,
.gap-3 {
  gap: 1rem !important;
}

.adminlte-hybrid-shell .row,
.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.adminlte-hybrid-shell .col-lg-6,
.col-lg-6 {
  grid-column: span 6;
}

.adminlte-hybrid-shell .col-lg-4,
.col-lg-4 {
  grid-column: span 4;
}

.adminlte-hybrid-shell .col-lg-8,
.col-lg-8 {
  grid-column: span 8;
}

.adminlte-hybrid-shell .w-100,
.w-100 {
  width: 100% !important;
}

.adminlte-hybrid-shell .h-100,
.h-100 {
  height: 100% !important;
}

.adminlte-hybrid-shell .border-0,
.border-0 {
  border: 0 !important;
}

.adminlte-hybrid-shell .text-end,
.text-end {
  text-align: left !important;
}

.adminlte-hybrid-shell .text-center,
.text-center {
  text-align: center !important;
}

.adminlte-hybrid-shell .form-label,
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  color: #475569;
  font-weight: 900;
}

.adminlte-hybrid-shell .form-control,
.adminlte-hybrid-shell .form-select,
.form-control,
.form-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 0.8rem;
  padding: 9px 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.adminlte-hybrid-shell textarea.form-control,
textarea.form-control {
  min-height: 120px;
}

.adminlte-hybrid-shell .form-text,
.form-text {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.5;
}

.adminlte-hybrid-shell .btn-outline-primary,
.btn-outline-primary {
  border-color: rgba(14, 165, 233, 0.42) !important;
  background: #ffffff !important;
  color: #0369a1 !important;
}

.adminlte-hybrid-shell .btn-outline-secondary,
.btn-outline-secondary {
  border-color: rgba(100, 116, 139, 0.28) !important;
  background: #ffffff !important;
  color: #475569 !important;
}

.adminlte-hybrid-shell .btn-outline-danger,
.btn-outline-danger {
  border-color: rgba(239, 68, 68, 0.34) !important;
  background: #ffffff !important;
  color: #b91c1c !important;
}

.adminlte-hybrid-shell .btn-outline-warning,
.btn-outline-warning,
.adminlte-hybrid-shell .btn-warning,
.btn-warning {
  border-color: rgba(245, 158, 11, 0.35) !important;
  background: #fef3c7 !important;
  color: #92400e !important;
}

.adminlte-hybrid-shell .btn-danger,
.btn-danger {
  border-color: #ef4444 !important;
  background: #ef4444 !important;
  color: #ffffff !important;
}

.adminlte-hybrid-shell .card-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

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

.adminlte-hybrid-shell .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .adminlte-hybrid-shell .row,
  .row {
    grid-template-columns: 1fr;
  }

  .adminlte-hybrid-shell .col-lg-4,
  .adminlte-hybrid-shell .col-lg-6,
  .adminlte-hybrid-shell .col-lg-8,
  .col-lg-4,
  .col-lg-6,
  .col-lg-8 {
    grid-column: span 1;
  }
}

/* v112: merchant dashboard layout refresh */
.merchant-portal-shell .merchant-main-layout {
  min-height: 100vh;
}

.merchant-portal-shell .merchant-dashboard-container {
  max-width: 1280px;
  padding-bottom: 96px;
}

.merchant-portal-shell .merchant-hero {
  align-items: center;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.merchant-portal-shell .merchant-hero h1 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.25;
}

.merchant-portal-shell .merchant-hero p {
  max-width: 680px;
  line-height: 1.7;
}

.merchant-portal-shell .merchant-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.merchant-portal-shell .merchant-hero-actions .btn,
.merchant-portal-shell .merchant-check-form .btn,
.merchant-portal-shell .merchant-offer-form .btn {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 950;
}

.merchant-portal-shell .merchant-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 950;
}

.merchant-portal-shell .merchant-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.merchant-portal-shell .merchant-stats-grid .stat-card {
  min-height: 126px;
  border: 1px solid rgba(124, 58, 237, 0.14);
}

.merchant-portal-shell .merchant-stats-grid .stat-card span {
  font-size: 0.86rem !important;
}

.merchant-portal-shell .merchant-stats-grid .stat-card strong {
  font-size: clamp(1.65rem, 2.8vw, 2.4rem) !important;
  line-height: 1.1;
}

.merchant-portal-shell .merchant-section-card,
.merchant-portal-shell .merchant-offer-card,
.merchant-portal-shell .merchant-check-card {
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 1.1rem;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.merchant-portal-shell .merchant-offer-card.highlight {
  background: linear-gradient(135deg, #ffffff, #f5f3ff);
}

.merchant-portal-shell .merchant-offer-form {
  margin-top: 14px;
}

.merchant-portal-shell .merchant-offer-form label,
.merchant-portal-shell .merchant-check-form label {
  color: #475569;
  font-weight: 950;
}

.merchant-portal-shell .merchant-offer-form input,
.merchant-portal-shell .merchant-check-form input {
  min-height: 44px;
  border-radius: 0.85rem;
}

.merchant-portal-shell .merchant-table-wrap {
  border-radius: 1rem;
}

.merchant-portal-shell .merchant-data-table {
  min-width: 860px;
}

.merchant-portal-shell .merchant-data-table th {
  color: #475569;
  font-size: 0.82rem;
}

.merchant-portal-shell .merchant-data-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.merchant-portal-shell .merchant-data-table .btn {
  min-width: 72px;
  min-height: 34px;
  border-radius: 999px;
  font-weight: 900;
}

.merchant-portal-shell .merchant-check-card {
  margin-bottom: 22px;
}

.merchant-portal-shell .merchant-check-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.merchant-portal-shell .merchant-check-form .btn {
  min-width: 150px;
}

.merchant-portal-shell .merchant-bottom-nav a span {
  font-weight: 950;
}

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

@media (max-width: 900px) {
  .merchant-portal-shell .merchant-dashboard-container {
    padding-inline: 14px;
  }

  .merchant-portal-shell .merchant-page-header,
  .merchant-portal-shell .section-title-row {
    display: grid;
    gap: 12px;
  }

  .merchant-portal-shell .merchant-hero-actions,
  .merchant-portal-shell .merchant-hero-actions .btn,
  .merchant-portal-shell .merchant-check-form,
  .merchant-portal-shell .merchant-check-form .btn {
    width: 100%;
  }

  .merchant-portal-shell .merchant-check-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .merchant-portal-shell .merchant-stats-grid {
    grid-template-columns: 1fr;
  }

  .merchant-portal-shell .merchant-stats-grid .stat-card {
    min-height: 104px;
  }

  .merchant-portal-shell .merchant-data-table[data-responsive-table="true"] {
    min-width: 0 !important;
  }

  .merchant-portal-shell .merchant-data-table[data-responsive-table="true"] tbody {
    display: grid !important;
    gap: 12px !important;
  }

  .merchant-portal-shell .merchant-data-table[data-responsive-table="true"] tr {
    border-inline-start: 4px solid #7c3aed;
  }

  .merchant-portal-shell .merchant-data-table[data-responsive-table="true"] td {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}

/* v85: AdminLTE polish — phase 1 (admin shell only) */
body.adminlte-hybrid-shell.main-admin-shell .desktop-topbar.app-header {
  min-height: 60px;
  height: 60px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  box-shadow: none;
}

body.adminlte-hybrid-shell.main-admin-shell .topbar-actions {
  gap: 8px;
  flex-wrap: wrap;
}

body.adminlte-hybrid-shell.main-admin-shell .page-container.app-content {
  padding: 22px 22px 84px;
}

body.adminlte-hybrid-shell.main-admin-shell .sidebar-nav a.active {
  background: rgba(20, 184, 166, .14);
  color: #ffffff;
  border-right: 3px solid #14b8a6;
}

body.adminlte-hybrid-shell.main-admin-shell .sidebar-nav details > summary {
  transition: 160ms ease;
}

@media (max-width: 767px) {
  body.adminlte-hybrid-shell.main-admin-shell .page-container.app-content {
    padding: 16px 14px 96px;
  }
}

/* v86: Admin dashboard polish — phase 2B */
body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 249, 255, .92), rgba(240, 253, 250, .92));
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.25;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero p {
  max-width: 760px;
  line-height: 1.75;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-pill {
  background: rgba(20, 184, 166, .12);
  border-color: rgba(20, 184, 166, .28);
  color: #0f766e;
}

body.adminlte-hybrid-shell.main-admin-shell .dashboard-hero-actions {
  justify-content: flex-end;
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .dashboard-hero-actions .btn {
  min-height: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-tools {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 16px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search,
body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-alerts {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search {
  padding: 16px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search label {
  display: block;
  margin-bottom: 10px;
  color: #334155;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search input {
  min-height: 42px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search button {
  min-width: 82px;
  min-height: 42px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-alerts {
  display: grid;
  gap: 10px;
  padding: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-alerts .top-alert {
  min-height: 72px;
  border-radius: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-small-box {
  position: relative;
  min-height: 136px;
  padding: 18px;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
  overflow: hidden;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-small-box::after {
  content: "";
  position: absolute;
  inset-inline-end: -34px;
  inset-block-end: -42px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(20, 184, 166, .1);
}

body.adminlte-hybrid-shell.main-admin-shell .admin-small-box.primary {
  border-color: rgba(20, 184, 166, .35);
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

body.adminlte-hybrid-shell.main-admin-shell .admin-small-box span,
body.adminlte-hybrid-shell.main-admin-shell .admin-small-box small {
  position: relative;
  z-index: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-small-box strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-panel {
  margin-top: 18px;
  border: 1px solid rgba(14, 165, 233, .2);
  border-radius: 14px;
  background: #f8fcff;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list a {
  min-height: 108px;
  border-radius: 12px;
  background: #ffffff;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list b {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.2;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list .pulse-status-card b {
  font-size: .95rem;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list .pulse-status-card span {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-panel {
  margin-top: 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-panel h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.35;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-decision-grid {
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-decision-grid .decision-card {
  min-height: 168px;
  border-radius: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-decision-grid .decision-card p {
  line-height: 1.7;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-stat-card {
  min-height: 126px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .admin-stat-card span {
  color: #475569;
  font-size: .9rem;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-stat-card strong {
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  line-height: 1.1;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-stat-card .status-word {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-grid {
  gap: 18px;
  margin-top: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-mini-kpi-grid {
  gap: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-mini-kpi-grid div {
  border-radius: 12px;
  background: #f8fafc;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-table {
  min-width: 680px;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-table th {
  color: #475569;
  font-size: .82rem;
}

body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-table td {
  vertical-align: middle;
}

@media (max-width: 1180px) {
  body.adminlte-hybrid-shell.main-admin-shell .admin-stat-grid,
  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero,
  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-tools {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .dashboard-hero-actions {
    justify-content: stretch;
  }

  body.adminlte-hybrid-shell.main-admin-shell .dashboard-hero-actions .btn,
  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search button {
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-search div {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero {
    padding: 18px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .admin-stat-grid,
  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-cards,
  body.adminlte-hybrid-shell.main-admin-shell .admin-pulse-list {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .admin-small-box,
  body.adminlte-hybrid-shell.main-admin-shell .admin-stat-card {
    min-height: 112px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-table {
    min-width: 620px;
  }
}

/* v87: Marketing center polish — phase 2C */
body.adminlte-hybrid-shell.main-admin-shell .marketing-center-shell {
  display: grid;
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 253, 250, .94), rgba(240, 249, 255, .92));
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.25;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-hero p {
  max-width: 760px;
  margin: 0;
  color: #475569;
  line-height: 1.75;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-hero .eyebrow,
body.adminlte-hybrid-shell.main-admin-shell .marketing-panel .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 999px;
  background: rgba(20, 184, 166, .1);
  color: #0f766e;
  font-size: .78rem;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-hero-actions .btn {
  min-height: 40px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-step-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-step-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(14, 165, 233, .12);
  color: #0369a1;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-step-card strong {
  font-size: 1.05rem;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-step-card small {
  color: #64748b;
  line-height: 1.55;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-action-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-action-card {
  display: grid;
  gap: 7px;
  min-height: 124px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-action-card span {
  color: #475569;
  font-size: .88rem;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-action-card strong {
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-action-card small {
  color: #64748b;
  line-height: 1.55;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-panel {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-panel.priority-panel {
  border-color: rgba(20, 184, 166, .24);
  background: linear-gradient(135deg, #ffffff, #f0fdfa);
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(1.18rem, 2vw, 1.52rem);
  line-height: 1.35;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-panel .mini {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(14, 165, 233, .2);
  border-radius: 999px;
  background: #f8fafc;
  color: #075985;
  font-size: .84rem;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .action-list,
body.adminlte-hybrid-shell.main-admin-shell .opportunity-list,
body.adminlte-hybrid-shell.main-admin-shell .delivery-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .action-item,
body.adminlte-hybrid-shell.main-admin-shell .opportunity-row,
body.adminlte-hybrid-shell.main-admin-shell .delivery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  background: #f8fafc;
}

body.adminlte-hybrid-shell.main-admin-shell .action-item strong,
body.adminlte-hybrid-shell.main-admin-shell .opportunity-row strong,
body.adminlte-hybrid-shell.main-admin-shell .delivery-row strong {
  display: block;
  color: #0f172a;
  line-height: 1.5;
}

body.adminlte-hybrid-shell.main-admin-shell .action-item small,
body.adminlte-hybrid-shell.main-admin-shell .opportunity-row small,
body.adminlte-hybrid-shell.main-admin-shell .delivery-row small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  line-height: 1.6;
}

body.adminlte-hybrid-shell.main-admin-shell .action-item > span,
body.adminlte-hybrid-shell.main-admin-shell .opportunity-row > span {
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .12);
  color: #0f766e;
  text-align: center;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-overview-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-card-head strong {
  display: block;
  color: #0f172a;
  line-height: 1.5;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-card-head small {
  display: block;
  color: #64748b;
  line-height: 1.6;
}

body.adminlte-hybrid-shell.main-admin-shell .status-pill {
  align-self: start;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  text-align: center;
  font-size: .78rem;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .status-pill.ok {
  background: #dcfce7;
  color: #047857;
}

body.adminlte-hybrid-shell.main-admin-shell .status-pill.off {
  background: #fee2e2;
  color: #b91c1c;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats,
body.adminlte-hybrid-shell.main-admin-shell .split-stat {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .split-stat {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats span,
body.adminlte-hybrid-shell.main-admin-shell .split-stat span {
  display: grid;
  gap: 4px;
  padding: 11px;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats b,
body.adminlte-hybrid-shell.main-admin-shell .split-stat b {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats small,
body.adminlte-hybrid-shell.main-admin-shell .split-stat small {
  color: #64748b;
  font-size: .78rem;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-card-actions a {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(14, 165, 233, .2);
  border-radius: 999px;
  background: #f8fafc;
  color: #075985;
  font-size: .84rem;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .marketing-panel .empty-state {
  padding: 16px;
  border: 1px dashed rgba(148, 163, 184, .45);
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  line-height: 1.7;
}

@media (max-width: 1180px) {
  body.adminlte-hybrid-shell.main-admin-shell .marketing-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.adminlte-hybrid-shell.main-admin-shell .campaign-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .marketing-hero,
  body.adminlte-hybrid-shell.main-admin-shell .marketing-grid {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .marketing-hero-actions,
  body.adminlte-hybrid-shell.main-admin-shell .marketing-hero-actions .btn {
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .marketing-flow,
  body.adminlte-hybrid-shell.main-admin-shell .marketing-action-grid,
  body.adminlte-hybrid-shell.main-admin-shell .campaign-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.adminlte-hybrid-shell.main-admin-shell .marketing-hero,
  body.adminlte-hybrid-shell.main-admin-shell .marketing-panel {
    padding: 16px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .marketing-flow,
  body.adminlte-hybrid-shell.main-admin-shell .marketing-action-grid,
  body.adminlte-hybrid-shell.main-admin-shell .campaign-card-grid,
  body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats,
  body.adminlte-hybrid-shell.main-admin-shell .split-stat {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .action-item,
  body.adminlte-hybrid-shell.main-admin-shell .opportunity-row,
  body.adminlte-hybrid-shell.main-admin-shell .delivery-row {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .action-item > span,
  body.adminlte-hybrid-shell.main-admin-shell .opportunity-row > span {
    width: fit-content;
  }
}

/* v88: Ad campaigns polish — phase 2D */
body.adminlte-hybrid-shell.main-admin-shell .ad-campaigns-shell {
  display: grid;
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaigns-hero {
  border-color: rgba(14, 165, 233, .2);
  background: linear-gradient(135deg, rgba(240, 249, 255, .95), rgba(240, 253, 250, .9));
}

body.adminlte-hybrid-shell.main-admin-shell .campaigns-toolbar {
  align-items: center;
}

body.adminlte-hybrid-shell.main-admin-shell .campaigns-flow {
  margin: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-step-card {
  min-height: 108px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-panel,
body.adminlte-hybrid-shell.main-admin-shell .campaigns-list-panel {
  border-color: rgba(14, 165, 233, .16);
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean .form-section-card,
body.adminlte-hybrid-shell.main-admin-shell .advanced-campaign-settings {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #f8fafc;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean .form-section-card h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 1.05rem;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean .form-grid .wide {
  grid-column: 1 / -1;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean input,
body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean select,
body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean textarea {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean textarea {
  min-height: 96px;
  resize: vertical;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean .check {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean .check input {
  width: 18px;
  min-height: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-block {
  margin-top: 16px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-block .field-label {
  margin-bottom: 8px;
  color: #475569;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-toolbar .btn {
  min-height: 34px;
  border-radius: 999px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-choices label,
body.adminlte-hybrid-shell.main-admin-shell .empty-neighborhood-note {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  background: #ffffff;
}

body.adminlte-hybrid-shell.main-admin-shell .empty-neighborhood-note {
  grid-column: 1 / -1;
  color: #64748b;
  line-height: 1.7;
}

body.adminlte-hybrid-shell.main-admin-shell .advanced-campaign-settings summary {
  cursor: pointer;
  color: #0f172a;
  font-weight: 950;
  transition: 160ms ease;
}

body.adminlte-hybrid-shell.main-admin-shell .advanced-campaign-settings .form-grid {
  margin-top: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-save-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-save-bar button,
body.adminlte-hybrid-shell.main-admin-shell .campaign-save-bar .btn {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-save-bar button {
  border: 0;
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  color: #ffffff;
}

body.adminlte-hybrid-shell.main-admin-shell .campaigns-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-card {
  border-color: rgba(14, 165, 233, .16);
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-status {
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions {
  align-items: center;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions form {
  margin: 0;
  width: fit-content;
}

/* Needed here because older global switch rules force compact toggle dimensions. */
body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button {
  width: clamp(92px, 11vw, 108px) !important;
  min-width: 92px !important;
  max-width: 108px !important;
  height: clamp(32px, 4vw, 38px) !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 1px solid rgba(148, 163, 184, .36);
  border-radius: 999px;
  color: transparent !important;
  box-shadow: none;
  font-weight: 950;
  font-size: 0 !important;
  line-height: 1;
  overflow: hidden;
}

/* Needed here because the shared switch knob is defined globally with strong specificity. */
body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button::before {
  top: 3px !important;
  z-index: 1;
  width: calc(clamp(32px, 4vw, 38px) - 8px) !important;
  height: calc(clamp(32px, 4vw, 38px) - 8px) !important;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button::after {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  z-index: 3;
  color: #ffffff;
  font-size: clamp(.74rem, 1.45vw, .88rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button.is-on {
  background: #22c55e !important;
  justify-content: flex-start !important;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button.is-on::after {
  content: "ON";
  inset-inline-start: 7px;
  inset-inline-end: clamp(36px, 4.6vw, 44px);
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button.is-off {
  background: #ef4444 !important;
  justify-content: flex-end !important;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button.is-off::after {
  content: "OFF";
  inset-inline-end: 7px;
  inset-inline-start: clamp(36px, 4.6vw, 44px);
}

body.adminlte-hybrid-shell.main-admin-shell .compact-history-panel {
  margin-bottom: 10px;
}

@media (max-width: 1180px) {
  body.adminlte-hybrid-shell.main-admin-shell .campaigns-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .campaign-form-clean .form-grid {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .campaign-save-bar button,
  body.adminlte-hybrid-shell.main-admin-shell .campaign-save-bar .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.adminlte-hybrid-shell.main-admin-shell .campaigns-grid,
  body.adminlte-hybrid-shell.main-admin-shell .campaign-neighborhood-choices,
  body.adminlte-hybrid-shell.main-admin-shell .campaign-metrics {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .campaign-card-head {
    display: grid;
  }

  body.adminlte-hybrid-shell.main-admin-shell .campaign-actions a {
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .campaign-actions form {
    width: fit-content;
  }
}

/* v89: Ads page polish — phase 2E */
body.adminlte-hybrid-shell.main-admin-shell .ads-shell {
  display: grid;
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .ads-hero {
  border-color: rgba(20, 184, 166, .2);
  background: linear-gradient(135deg, rgba(240, 253, 250, .95), rgba(248, 250, 252, .95));
}

body.adminlte-hybrid-shell.main-admin-shell .ads-toolbar {
  align-items: center;
}

body.adminlte-hybrid-shell.main-admin-shell .ads-notice {
  margin: 0;
  border-radius: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .ads-form-panel,
body.adminlte-hybrid-shell.main-admin-shell .ads-list-panel {
  border-color: rgba(20, 184, 166, .16);
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  gap: 16px;
  margin-top: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid > input[type="hidden"] {
  display: none;
}

body.adminlte-hybrid-shell.main-admin-shell .ads-form-card,
body.adminlte-hybrid-shell.main-admin-shell .ad-preview-card {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #f8fafc;
}

body.adminlte-hybrid-shell.main-admin-shell .ads-form-card h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 1.05rem;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid .wide {
  grid-column: 1 / -1;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid input,
body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid select,
body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid textarea {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid textarea {
  min-height: 112px;
  resize: vertical;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid .check {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid .check input {
  width: 18px;
  min-height: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-preview-card {
  align-self: start;
  background: linear-gradient(135deg, #ffffff, #f0fdfa);
}

body.adminlte-hybrid-shell.main-admin-shell .ad-preview-card .eyebrow {
  margin-bottom: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .telegram-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 14px;
  background: #ffffff;
}

body.adminlte-hybrid-shell.main-admin-shell .telegram-preview strong {
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.5;
}

body.adminlte-hybrid-shell.main-admin-shell .telegram-preview p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

body.adminlte-hybrid-shell.main-admin-shell .telegram-preview .btn {
  width: fit-content;
  min-height: 34px;
  border-radius: 999px;
}

body.adminlte-hybrid-shell.main-admin-shell .ads-save-bar {
  grid-column: 1 / -1;
}

body.adminlte-hybrid-shell.main-admin-shell .ads-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.adminlte-hybrid-shell.main-admin-shell .ad-card {
  border-color: rgba(20, 184, 166, .16);
}

body.adminlte-hybrid-shell.main-admin-shell .ad-status {
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-targeting {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(14, 165, 233, .16);
  border-radius: 12px;
  background: #f0f9ff;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-targeting b {
  color: #075985;
  line-height: 1.5;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-targeting small {
  color: #64748b;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.adminlte-hybrid-shell.main-admin-shell .ad-metrics span b {
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions {
  align-items: center;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions form {
  margin: 0;
  width: fit-content;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions form button:not(.admin-toggle-button),
body.adminlte-hybrid-shell.main-admin-shell .ad-actions a {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(14, 165, 233, .2);
  border-radius: 999px;
  background: #f8fafc;
  color: #075985;
  font-size: .84rem;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions form button.danger {
  border-color: rgba(239, 68, 68, .22);
  background: #fee2e2;
  color: #b91c1c;
}

/* Needed here because older global switch rules force compact toggle dimensions. */
body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button {
  width: clamp(92px, 11vw, 108px) !important;
  min-width: 92px !important;
  max-width: 108px !important;
  height: clamp(32px, 4vw, 38px) !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 1px solid rgba(148, 163, 184, .36);
  border-radius: 999px;
  color: transparent !important;
  box-shadow: none;
  font-weight: 950;
  font-size: 0 !important;
  line-height: 1;
  overflow: hidden;
}

/* Needed here because the shared switch knob is defined globally with strong specificity. */
body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button::before {
  top: 3px !important;
  z-index: 1;
  width: calc(clamp(32px, 4vw, 38px) - 8px) !important;
  height: calc(clamp(32px, 4vw, 38px) - 8px) !important;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button::after {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  z-index: 3;
  color: #ffffff;
  font-size: clamp(.74rem, 1.45vw, .88rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button.is-on {
  background: #22c55e !important;
  justify-content: flex-start !important;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button.is-on::after {
  content: "ON";
  inset-inline-start: 7px;
  inset-inline-end: clamp(36px, 4.6vw, 44px);
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button.is-off {
  background: #ef4444 !important;
  justify-content: flex-end !important;
}

body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button.is-off::after {
  content: "OFF";
  inset-inline-end: 7px;
  inset-inline-start: clamp(36px, 4.6vw, 44px);
}

@media (max-width: 1180px) {
  body.adminlte-hybrid-shell.main-admin-shell .ads-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .ad-composer-grid .form-grid {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .ads-save-bar button,
  body.adminlte-hybrid-shell.main-admin-shell .ads-save-bar .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.adminlte-hybrid-shell.main-admin-shell .ads-grid,
  body.adminlte-hybrid-shell.main-admin-shell .ad-metrics {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .ad-actions a,
  body.adminlte-hybrid-shell.main-admin-shell .ad-actions form button:not(.admin-toggle-button) {
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .ad-actions form {
    width: fit-content;
  }
}

/* v90: compact icon-only admin toggles */
body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button,
body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button::after,
body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button::after {
  content: none !important;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button::before,
body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button::before {
  top: 3px !important;
  width: 20px !important;
  height: 20px !important;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button.is-on::before,
body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button.is-on::before {
  right: 3px !important;
  left: auto !important;
}

body.adminlte-hybrid-shell.main-admin-shell .campaign-actions .admin-toggle-button.is-off::before,
body.adminlte-hybrid-shell.main-admin-shell .ad-actions .admin-toggle-button.is-off::before {
  right: auto !important;
  left: 3px !important;
}

/* v90: Coupons page polish — phase 2F */
body.adminlte-hybrid-shell.main-admin-shell .coupons-shell {
  display: grid;
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 249, 255, .95), rgba(240, 253, 250, .9));
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.25;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-hero p {
  max-width: 760px;
  margin: 0;
  line-height: 1.75;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(14, 165, 233, .22);
  border-radius: 999px;
  background: rgba(14, 165, 233, .1);
  color: #075985;
  font-size: .78rem;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-toolbar .btn {
  min-height: 40px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-kpi-card {
  min-height: 122px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-kpi-card span {
  color: #475569;
  font-size: .9rem;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-kpi-card strong {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-panel {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-panel .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 999px;
  background: rgba(20, 184, 166, .1);
  color: #0f766e;
  font-size: .78rem;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-table-wrap {
  margin-top: 14px;
  border-radius: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-table {
  min-width: 1120px;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-table th {
  color: #475569;
  font-size: .8rem;
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .coupons-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-code {
  display: inline-flex;
  max-width: 150px;
  padding: 5px 9px;
  border: 1px solid rgba(14, 165, 233, .2);
  border-radius: 999px;
  background: #f0f9ff;
  color: #075985;
  font-family: Consolas, "Courier New", monospace;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-qr {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-status {
  min-width: 74px;
  justify-content: center;
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-metrics,
body.adminlte-hybrid-shell.main-admin-shell .coupon-expiry {
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-actions form {
  margin: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .coupon-actions .btn,
body.adminlte-hybrid-shell.main-admin-shell .coupons-table .mini {
  min-width: 64px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}

@media (max-width: 1180px) {
  body.adminlte-hybrid-shell.main-admin-shell .coupons-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .coupons-hero {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-toolbar,
  body.adminlte-hybrid-shell.main-admin-shell .coupons-toolbar .btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  body.adminlte-hybrid-shell.main-admin-shell .coupons-hero {
    padding: 18px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-kpi-grid {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-table {
    min-width: 0;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-table thead {
    display: none;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-table,
  body.adminlte-hybrid-shell.main-admin-shell .coupons-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .coupons-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .coupons-table td {
    display: block;
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-table tbody {
    display: grid;
    gap: 12px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-table tr {
    padding: 12px;
    border: 1px solid rgba(14, 165, 233, .18);
    border-radius: 14px;
    background: #ffffff;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border: 0;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupons-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: .78rem;
    font-weight: 950;
  }

  body.adminlte-hybrid-shell.main-admin-shell .coupon-actions,
  body.adminlte-hybrid-shell.main-admin-shell .coupon-actions .btn,
  body.adminlte-hybrid-shell.main-admin-shell .coupon-actions form {
    width: 100%;
  }
}

/* v91: Smart ads polish — phase 2G */
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-shell {
  display: grid;
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(20, 184, 166, .2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 253, 250, .95), rgba(240, 249, 255, .92));
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.25;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero p {
  max-width: 780px;
  margin: 0;
  line-height: 1.75;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero .eyebrow,
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-form-panel .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 999px;
  background: rgba(20, 184, 166, .1);
  color: #0f766e;
  font-size: .78rem;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-toolbar .btn {
  min-height: 40px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-notice {
  margin: 0;
  border-radius: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-steps-panel,
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-form-panel,
body.adminlte-hybrid-shell.main-admin-shell .smart-target-summary,
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-send-panel {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-card {
  min-height: 112px;
  border-radius: 14px;
  background: #f8fafc;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-filter-form,
body.adminlte-hybrid-shell.main-admin-shell .smart-send-form {
  gap: 14px;
  margin-top: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-filter-form label,
body.adminlte-hybrid-shell.main-admin-shell .smart-send-form label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-filter-form input,
body.adminlte-hybrid-shell.main-admin-shell .smart-filter-form select,
body.adminlte-hybrid-shell.main-admin-shell .smart-send-form input,
body.adminlte-hybrid-shell.main-admin-shell .smart-send-form select,
body.adminlte-hybrid-shell.main-admin-shell .smart-send-form textarea {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-send-form textarea {
  min-height: 106px;
  resize: vertical;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-neighborhood-block {
  display: grid;
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-neighborhood-block .field-label {
  color: #475569;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-neighborhood-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-neighborhood-choices .neighborhood-choice,
body.adminlte-hybrid-shell.main-admin-shell .smart-neighborhood-choices .empty-neighborhood-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-neighborhood-choices .empty-neighborhood-note {
  grid-column: 1 / -1;
  line-height: 1.7;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-actions button,
body.adminlte-hybrid-shell.main-admin-shell .smart-target-actions .btn,
body.adminlte-hybrid-shell.main-admin-shell .smart-send-form > button[type="submit"] {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-status {
  min-height: 30px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-metrics span {
  display: grid;
  gap: 5px;
  padding: 13px;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-metrics b {
  color: #0f172a;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-metrics small {
  color: #64748b;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-ads-table-wrap {
  border-radius: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-table {
  min-width: 980px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-table th {
  color: #475569;
  font-size: .8rem;
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-target-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-preview-card {
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .smart-preview-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.05rem;
}

@media (max-width: 1000px) {
  body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero,
  body.adminlte-hybrid-shell.main-admin-shell .smart-ads-steps {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-ads-toolbar,
  body.adminlte-hybrid-shell.main-admin-shell .smart-ads-toolbar .btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero {
    padding: 18px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-metrics {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-actions,
  body.adminlte-hybrid-shell.main-admin-shell .smart-target-actions button,
  body.adminlte-hybrid-shell.main-admin-shell .smart-target-actions .btn,
  body.adminlte-hybrid-shell.main-admin-shell .smart-send-form > button[type="submit"] {
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table {
    min-width: 0;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-neighborhood-choices {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table thead {
    display: none;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table,
  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table td {
    display: block;
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table tbody {
    display: grid;
    gap: 12px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table tr {
    padding: 12px;
    border: 1px solid rgba(20, 184, 166, .18);
    border-radius: 14px;
    background: #ffffff;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border: 0;
  }

  body.adminlte-hybrid-shell.main-admin-shell .smart-target-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: .78rem;
    font-weight: 950;
  }
}

/* v92: Merchants page polish — phase 2H */
body.adminlte-hybrid-shell.main-admin-shell .merchants-shell {
  display: grid;
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(14, 165, 233, .16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(240, 249, 255, .95), rgba(236, 253, 245, .9)),
    #ffffff;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-hero h1 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.2;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-hero p {
  max-width: 720px;
  margin: 0;
  line-height: 1.8;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-toolbar .btn {
  min-height: 40px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-card {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card {
  display: grid;
  gap: 8px;
  min-height: 122px;
  padding: 18px;
  overflow: hidden;
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card span,
body.adminlte-hybrid-shell.main-admin-shell .merchant-meta b,
body.adminlte-hybrid-shell.main-admin-shell .merchant-contact span {
  color: #64748b;
  font-size: .82rem;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card strong {
  color: #0f172a;
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card small {
  color: #64748b;
  font-weight: 850;
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card.ok {
  border-color: rgba(34, 197, 94, .24);
  background: linear-gradient(180deg, rgba(240, 253, 244, .85), #ffffff);
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card.pending,
body.adminlte-hybrid-shell.main-admin-shell .metric-card.warn {
  border-color: rgba(245, 158, 11, .24);
  background: linear-gradient(180deg, rgba(255, 251, 235, .9), #ffffff);
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card.off {
  border-color: rgba(239, 68, 68, .2);
  background: linear-gradient(180deg, rgba(254, 242, 242, .9), #ffffff);
}

body.adminlte-hybrid-shell.main-admin-shell .metric-card.info {
  border-color: rgba(14, 165, 233, .22);
  background: linear-gradient(180deg, rgba(240, 249, 255, .92), #ffffff);
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-filter-panel,
body.adminlte-hybrid-shell.main-admin-shell .merchants-panel,
body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-panel,
body.adminlte-hybrid-shell.main-admin-shell .merchant-email-panel {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-filter-form label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 900;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-filter-form select {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-filter-form .btn {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .section-title-row h2 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

body.adminlte-hybrid-shell.main-admin-shell .section-title-row p {
  margin: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-overview-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-card-head strong {
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .13);
  color: #92400e;
  font-size: .8rem;
  font-weight: 950;
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-status.ok {
  background: rgba(34, 197, 94, .14);
  color: #15803d;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-status.off {
  background: rgba(239, 68, 68, .12);
  color: #b91c1c;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-status.pending {
  background: rgba(245, 158, 11, .13);
  color: #92400e;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-meta span,
body.adminlte-hybrid-shell.main-admin-shell .merchant-contact {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-contact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-contact b {
  color: #0f172a;
  font-size: .92rem;
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-actions form {
  margin: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-actions button:not(.admin-toggle-button),
body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .btn:not(.admin-toggle-button) {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 950;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-reject-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-reject-form input {
  width: min(190px, 100%);
  min-height: 34px;
  border-radius: 999px;
}

/* Needed here because old shared switch rules use important dimensions. */
body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .admin-toggle-button {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Needed here because old campaign/ad switch rules add ON/OFF pseudo text. */
body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .admin-toggle-button::after {
  content: none !important;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .admin-toggle-button::before {
  top: 3px !important;
  width: 20px !important;
  height: 20px !important;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .admin-toggle-button.is-on::before {
  right: 3px !important;
  left: auto !important;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .admin-toggle-button.is-off::before {
  right: auto !important;
  left: 3px !important;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-table-wrap {
  border-radius: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-table,
body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table,
body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table {
  min-width: 980px;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-table th,
body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table th,
body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table th {
  color: #475569;
  font-size: .8rem;
  white-space: nowrap;
}

body.adminlte-hybrid-shell.main-admin-shell .merchants-table td,
body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table td,
body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
}

body.adminlte-hybrid-shell.main-admin-shell .merchant-empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  color: #64748b;
  text-align: center;
  font-weight: 950;
}

@media (max-width: 1180px) {
  body.adminlte-hybrid-shell.main-admin-shell .merchants-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.adminlte-hybrid-shell.main-admin-shell .merchants-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-toolbar,
  body.adminlte-hybrid-shell.main-admin-shell .merchants-toolbar .btn,
  body.adminlte-hybrid-shell.main-admin-shell .merchants-filter-form .btn {
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-grid,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-meta,
  body.adminlte-hybrid-shell.main-admin-shell .merchants-filter-form {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchant-card-head,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-contact {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchant-actions,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-actions button:not(.admin-toggle-button),
  body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .btn:not(.admin-toggle-button),
  body.adminlte-hybrid-shell.main-admin-shell .merchant-reject-form,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-reject-form input {
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchant-actions .merchant-toggle-form {
    width: fit-content;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-table,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table {
    min-width: 0;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-table thead,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table thead,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table thead {
    display: none;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-table,
  body.adminlte-hybrid-shell.main-admin-shell .merchants-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .merchants-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .merchants-table td,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table td,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table td {
    display: block;
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table tbody {
    display: grid;
    gap: 12px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table tr {
    padding: 12px;
    border: 1px solid rgba(20, 184, 166, .18);
    border-radius: 14px;
    background: #ffffff;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-table td,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table td,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border: 0;
  }

  body.adminlte-hybrid-shell.main-admin-shell .merchants-table td::before,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-offers-table td::before,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-email-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: .78rem;
    font-weight: 950;
  }
}

/* =============================================================
   v93: Distributors page polish — phase 2I
   Scoped to: body.adminlte-hybrid-shell.main-admin-shell
   ============================================================= */

body.adminlte-hybrid-shell.main-admin-shell .distributors-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- Hero ---- */
body.adminlte-hybrid-shell.main-admin-shell .distributors-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px 32px;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-hero-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-hero-desc {
  margin: 0;
  color: #94a3b8;
  font-size: .92rem;
  line-height: 1.55;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-hero-desc code {
  background: rgba(20, 184, 166, .22);
  color: #5eead4;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: .88rem;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-hero-stats {
  display: flex;
  gap: 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 12px 20px;
  min-width: 72px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-hero-num {
  font-size: 1.55rem;
  font-weight: 800;
  color: #5eead4;
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-hero-lbl {
  font-size: .72rem;
  color: #94a3b8;
  margin-top: 4px;
  white-space: nowrap;
}

/* ---- Add Panel ---- */
body.adminlte-hybrid-shell.main-admin-shell .distributors-add-panel {
  border-radius: 16px;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-add-summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  padding: 4px 0 10px;
  list-style: none;
  outline: none;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-add-summary::-webkit-details-marker {
  display: none;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-add-summary::before {
  content: "▸ ";
  color: #14b8a6;
  font-size: .85rem;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-add-panel[open] .distributors-add-summary::before {
  content: "▾ ";
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-create-form {
  margin-top: 16px;
}

/* ---- Section headings ---- */
body.adminlte-hybrid-shell.main-admin-shell .distributors-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(20, 184, 166, .18);
}

/* ---- Distributors Grid ---- */
body.adminlte-hybrid-shell.main-admin-shell .distributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

/* ---- Distributor Card ---- */
body.adminlte-hybrid-shell.main-admin-shell .distributor-card {
  background: #fff;
  border: 1px solid rgba(20, 184, 166, .18);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .2s;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-card:hover {
  box-shadow: 0 6px 24px rgba(20, 184, 166, .12);
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-card.dist-off {
  border-color: rgba(148, 163, 184, .25);
  opacity: .88;
}

/* Card Head */
body.adminlte-hybrid-shell.main-admin-shell .distributor-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-status.status-active {
  background: #dcfce7;
  color: #16a34a;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-status.status-off {
  background: #fee2e2;
  color: #dc2626;
}

/* Referral code badge */
body.adminlte-hybrid-shell.main-admin-shell .distributor-referral-code {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-code-label {
  font-size: .7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-code-value {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 900;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 2px 10px;
  border-radius: 8px;
  letter-spacing: .06em;
}

/* Referral link */
body.adminlte-hybrid-shell.main-admin-shell .distributor-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-start-cmd {
  font-size: .85rem;
  color: #0f766e;
  background: transparent;
  font-weight: 700;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-url {
  font-size: .74rem;
  color: #3b82f6;
  word-break: break-all;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-url-hint {
  color: #94a3b8;
}

/* Metrics row */
body.adminlte-hybrid-shell.main-admin-shell .distributor-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-metric.dist-metric-due {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-metric-val {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-metric-due .dist-metric-val {
  color: #c2410c;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-metric-lbl {
  font-size: .68rem;
  color: #64748b;
  margin-top: 4px;
  text-align: center;
}

/* Contact info */
body.adminlte-hybrid-shell.main-admin-shell .distributor-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-contact-item {
  font-size: .78rem;
  color: #475569;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px 9px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-notes {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action buttons */
body.adminlte-hybrid-shell.main-admin-shell .distributor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-actions form {
  margin: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-actions .btn,
body.adminlte-hybrid-shell.main-admin-shell .distributor-actions button {
  font-size: .8rem;
  padding: 6px 13px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
  min-width: unset;
  width: auto;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-btn-pay {
  background: #0d9488;
  color: #fff;
  border: none;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-btn-pay:hover {
  background: #0f766e;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-btn-delete {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-btn-delete:hover {
  background: #fecaca;
}

/* Edit details */
body.adminlte-hybrid-shell.main-admin-shell .distributor-edit-details {
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-edit-summary {
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
  color: #475569;
  padding: 4px 0;
  list-style: none;
  outline: none;
  user-select: none;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-edit-summary::-webkit-details-marker {
  display: none;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-edit-summary::before {
  content: "▸ ";
  color: #14b8a6;
  font-size: .8rem;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-edit-details[open] .distributor-edit-summary::before {
  content: "▾ ";
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-edit-form {
  margin-top: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-edit-grid label {
  display: flex;
  flex-direction: column;
  font-size: .78rem;
  font-weight: 700;
  color: #475569;
  gap: 4px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-edit-grid input,
body.adminlte-hybrid-shell.main-admin-shell .dist-edit-grid select {
  font-size: .82rem;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  width: 100%;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-edit-wide {
  grid-column: 1 / -1;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-edit-actions {
  margin-top: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-btn-save {
  background: #14b8a6;
  color: #fff;
  border: none;
  font-size: .82rem;
  padding: 7px 18px;
  border-radius: 9px;
  font-weight: 700;
  min-width: unset;
  width: auto;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-btn-save:hover {
  background: #0d9488;
}

/* Empty states */
body.adminlte-hybrid-shell.main-admin-shell .distributors-empty {
  text-align: center;
  color: #94a3b8;
  padding: 36px 20px;
  font-size: .95rem;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-empty-row {
  text-align: center;
  color: #94a3b8;
  padding: 24px;
}

/* Referrals table */
body.adminlte-hybrid-shell.main-admin-shell .distributor-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table {
  min-width: 600px;
  width: 100%;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-ref-user {
  display: block;
  font-weight: 700;
  font-size: .85rem;
}

body.adminlte-hybrid-shell.main-admin-shell .dist-ref-code {
  display: block;
  color: #64748b;
  font-size: .75rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .distributors-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-hero-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body.adminlte-hybrid-shell.main-admin-shell .distributors-hero {
    padding: 20px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-hero-title {
    font-size: 1.2rem;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-grid {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributor-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributor-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributor-referral-code {
    align-items: flex-start;
  }

  body.adminlte-hybrid-shell.main-admin-shell .dist-edit-grid {
    grid-template-columns: 1fr;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table thead {
    display: none;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table,
  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table tbody,
  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table tr,
  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table td {
    display: block;
    width: 100%;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table tbody {
    display: grid;
    gap: 10px;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table tr {
    padding: 12px;
    border: 1px solid rgba(20, 184, 166, .18);
    border-radius: 12px;
    background: #fff;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 0;
    border: 0;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributors-referrals-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: .78rem;
    font-weight: 950;
  }

  body.adminlte-hybrid-shell.main-admin-shell .distributor-actions .btn,
  body.adminlte-hybrid-shell.main-admin-shell .distributor-actions button {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* =============================================================
   v94: Unified admin cards polish — phase 2J
   Scoped to: body.adminlte-hybrid-shell.main-admin-shell
   ============================================================= */

/* ---- 1. CSS TOGGLE PILL SWITCH ---- */
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button {
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  padding: 0;
  position: relative;
  transition: background .25s ease;
  flex-shrink: 0;
  vertical-align: middle;
  min-width: 44px;
  min-height: 24px;
  box-shadow: none;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  transition: left .25s ease;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-on {
  background: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-on::after {
  left: 23px;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-off {
  background: #cbd5e1;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-off::after {
  left: 3px;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-on:hover {
  background: #0d9488;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-off:hover {
  background: #94a3b8;
}

/* ---- 2. CARD-HEAD TOGGLE positioning ---- */
body.adminlte-hybrid-shell.main-admin-shell .card-head-toggle {
  margin: 0;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* campaign-card-head flex: info | status | toggle */
body.adminlte-hybrid-shell.main-admin-shell .campaign-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .campaign-card-head > div:first-child {
  flex: 1;
  min-width: 0;
}

/* merchant-card-head flex: status | name | toggle */
body.adminlte-hybrid-shell.main-admin-shell .merchant-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .merchant-card-head > strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* dist-name-row flex: name | status | toggle */
body.adminlte-hybrid-shell.main-admin-shell .dist-name-row {
  flex-wrap: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .dist-name-row .dist-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 3. UNIFIED DARK HERO ---- */
body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero,
body.adminlte-hybrid-shell.main-admin-shell .marketing-hero,
body.adminlte-hybrid-shell.main-admin-shell .campaigns-hero,
body.adminlte-hybrid-shell.main-admin-shell .ads-hero,
body.adminlte-hybrid-shell.main-admin-shell .coupons-hero,
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero,
body.adminlte-hybrid-shell.main-admin-shell .merchants-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  border-radius: 18px;
  color: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero h1,
body.adminlte-hybrid-shell.main-admin-shell .marketing-hero h1,
body.adminlte-hybrid-shell.main-admin-shell .campaigns-hero h1,
body.adminlte-hybrid-shell.main-admin-shell .ads-hero h1,
body.adminlte-hybrid-shell.main-admin-shell .coupons-hero h1,
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero h1,
body.adminlte-hybrid-shell.main-admin-shell .merchants-hero h1 {
  color: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero p,
body.adminlte-hybrid-shell.main-admin-shell .marketing-hero p,
body.adminlte-hybrid-shell.main-admin-shell .campaigns-hero p,
body.adminlte-hybrid-shell.main-admin-shell .ads-hero p,
body.adminlte-hybrid-shell.main-admin-shell .coupons-hero p,
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero p,
body.adminlte-hybrid-shell.main-admin-shell .merchants-hero p {
  color: #94a3b8;
}
body.adminlte-hybrid-shell.main-admin-shell .marketing-hero .eyebrow,
body.adminlte-hybrid-shell.main-admin-shell .campaigns-hero .eyebrow,
body.adminlte-hybrid-shell.main-admin-shell .ads-hero .eyebrow,
body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero .eyebrow {
  color: #5eead4;
  background: rgba(20,184,166,.15);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  display: inline-block;
  margin-bottom: 6px;
}
body.adminlte-hybrid-shell.main-admin-shell .merchants-hero .adminlte-page-kicker,
body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero .admin-dashboard-pill {
  color: #5eead4;
  background: rgba(20,184,166,.15);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .75rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 6px;
}

/* ---- 4. UNIFIED CARD BORDERS + HOVER ---- */
body.adminlte-hybrid-shell.main-admin-shell .campaign-overview-card,
body.adminlte-hybrid-shell.main-admin-shell .campaign-card,
body.adminlte-hybrid-shell.main-admin-shell .ad-overview-card,
body.adminlte-hybrid-shell.main-admin-shell .ad-card {
  border-radius: 16px;
  border: 1px solid rgba(20,184,166,.15);
  background: #fff;
  transition: box-shadow .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .campaign-overview-card:hover,
body.adminlte-hybrid-shell.main-admin-shell .campaign-card:hover,
body.adminlte-hybrid-shell.main-admin-shell .ad-overview-card:hover,
body.adminlte-hybrid-shell.main-admin-shell .ad-card:hover {
  box-shadow: 0 6px 24px rgba(20,184,166,.11);
}

/* metrics spans */
body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats span,
body.adminlte-hybrid-shell.main-admin-shell .campaign-metrics span,
body.adminlte-hybrid-shell.main-admin-shell .ad-metrics span {
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats b,
body.adminlte-hybrid-shell.main-admin-shell .campaign-metrics b,
body.adminlte-hybrid-shell.main-admin-shell .ad-metrics b {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
body.adminlte-hybrid-shell.main-admin-shell .campaign-mini-stats small,
body.adminlte-hybrid-shell.main-admin-shell .campaign-metrics small,
body.adminlte-hybrid-shell.main-admin-shell .ad-metrics small {
  display: block;
  font-size: .68rem;
  color: #64748b;
  margin-top: 3px;
}

/* ---- 5. UNIFIED STATUS BADGES ---- */
body.adminlte-hybrid-shell.main-admin-shell .status-pill.ok,
body.adminlte-hybrid-shell.main-admin-shell .badge.ok {
  background: #dcfce7;
  color: #16a34a;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 700;
}
body.adminlte-hybrid-shell.main-admin-shell .status-pill.off,
body.adminlte-hybrid-shell.main-admin-shell .badge.off {
  background: #fee2e2;
  color: #dc2626;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 700;
}

/* ---- 6. COUPON + DASHBOARD STAT CARDS ---- */
body.adminlte-hybrid-shell.main-admin-shell .coupon-kpi-card {
  border-radius: 14px;
  border: 1px solid rgba(20,184,166,.15);
  transition: box-shadow .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .coupon-kpi-card:hover {
  box-shadow: 0 4px 16px rgba(20,184,166,.1);
}
body.adminlte-hybrid-shell.main-admin-shell .admin-stat-card {
  border-radius: 14px;
  border: 1px solid rgba(20,184,166,.13);
  transition: box-shadow .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-stat-card:hover {
  box-shadow: 0 4px 14px rgba(20,184,166,.1);
}

/* ---- 7. SECTION TITLE + EYEBROW ---- */
body.adminlte-hybrid-shell.main-admin-shell .section-title-row h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}
body.adminlte-hybrid-shell.main-admin-shell .section-title-row .eyebrow {
  font-size: .72rem;
  color: #14b8a6;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: block;
  margin-bottom: 2px;
}

/* ---- 8. RESPONSIVE ---- */
@media (max-width: 760px) {
  body.adminlte-hybrid-shell.main-admin-shell .admin-dashboard-hero,
  body.adminlte-hybrid-shell.main-admin-shell .marketing-hero,
  body.adminlte-hybrid-shell.main-admin-shell .campaigns-hero,
  body.adminlte-hybrid-shell.main-admin-shell .ads-hero,
  body.adminlte-hybrid-shell.main-admin-shell .coupons-hero,
  body.adminlte-hybrid-shell.main-admin-shell .smart-ads-hero,
  body.adminlte-hybrid-shell.main-admin-shell .merchants-hero {
    padding: 20px;
    border-radius: 14px;
  }
  body.adminlte-hybrid-shell.main-admin-shell .campaign-card-head,
  body.adminlte-hybrid-shell.main-admin-shell .merchant-card-head {
    flex-wrap: wrap;
  }
  body.adminlte-hybrid-shell.main-admin-shell .card-head-toggle {
    margin-left: 0;
  }
  body.adminlte-hybrid-shell.main-admin-shell .dist-name-row {
    flex-wrap: wrap;
  }
}

/* =============================================================
   v95: Compact toggle switch fix
   Fixes oversized switch from v94.
   Buttons are empty — uses ::before for circle, ::after cancelled.
   RTL-aware: OFF = circle on right, ON = circle on left.
   ============================================================= */

/* ---- BUTTON SHAPE (override v94) ---- */
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button {
  width: 44px !important;
  height: 24px !important;
  border-radius: 999px !important;
  padding: 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  position: relative !important;
  overflow: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
  border: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  min-width: 44px !important;
  min-height: 24px !important;
  box-shadow: none !important;
  transition: background .2s ease !important;
  vertical-align: middle !important;
}

/* ---- CANCEL ::after FROM v94 ---- */
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button::after {
  display: none !important;
  content: none !important;
}

/* ---- CIRCLE via ::before ---- */
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button::before {
  content: '' !important;
  position: absolute !important;
  left: 2px !important;
  top: 2px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.25) !important;
  transition: transform .18s ease !important;
  display: block !important;
  pointer-events: none !important;
}

/* RTL: OFF → circle on right (translateX = 44 - 2 - 20 - 2 = 20px) */
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-off::before {
  transform: translateX(20px) !important;
}

/* RTL: ON → circle on left */
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-on::before {
  transform: translateX(0) !important;
}

/* Colors (re-confirm for override safety) */
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-on {
  background: #14b8a6 !important;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-off {
  background: #cbd5e1 !important;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-on:hover {
  background: #0d9488 !important;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-toggle-button.is-off:hover {
  background: #94a3b8 !important;
}

/* =============================================================
   v96: Analytics pages polish — phase 3C-1
   Scoped to: body.adminlte-hybrid-shell.main-admin-shell
   Pages: classification-quality, customer-interests,
          churn-risk, time-heatmap, golden-customers
   ============================================================= */

/* ---- 1. ANALYTICS SHELL ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- 2. HERO (dark gradient — same as v94) ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 18px;
  color: #fff;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero h1 {
  color: #fff;
  margin: 4px 0 8px;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 800;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero p {
  color: #94a3b8;
  margin: 0;
  font-size: .9rem;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero .eyebrow {
  color: #5eead4;
  background: rgba(20,184,166,.15);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  display: inline-block;
  margin-bottom: 6px;
}

/* ---- 3. INLINE FILTER (inside hero) ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-inline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-inline label {
  display: flex;
  flex-direction: column;
  font-size: .72rem;
  color: #94a3b8;
  gap: 4px;
  font-weight: 700;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-inline input {
  width: 90px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: .85rem;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-inline input:focus {
  outline: none;
  border-color: #14b8a6;
  background: rgba(255,255,255,.12);
}

/* ---- 4. FILTER PANEL (time-heatmap full filter row) ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-panel {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(20,184,166,.13);
  background: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-grid label {
  display: flex;
  flex-direction: column;
  font-size: .78rem;
  font-weight: 700;
  color: #475569;
  gap: 5px;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-grid input,
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-grid select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: .85rem;
  min-height: 38px;
  color: #0f172a;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-grid input:focus,
body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-grid select:focus {
  outline: none;
  border-color: #14b8a6;
  background: #f0fdfa;
}

/* ---- 5. STAT GRID (classification quality) ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card {
  background: #fff;
  border: 1px solid rgba(20,184,166,.15);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card:hover {
  box-shadow: 0 4px 16px rgba(20,184,166,.1);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card span {
  font-size: .75rem;
  color: #64748b;
  font-weight: 700;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card strong {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

/* ---- 6. ANALYTICS PANEL (card wrapper) ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-panel {
  border-radius: 16px;
  border: 1px solid rgba(20,184,166,.12);
  background: #fff;
  padding: 20px 20px 16px;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-panel .section-title-row {
  margin-bottom: 14px;
}

/* ---- 7. CHIP LIST (problem words) ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

/* ---- 8. BADGES ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  background: rgba(20,184,166,.1);
  color: #0f766e;
  white-space: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .churn-days-badge {
  background: #fff7ed;
  color: #c2410c;
}
body.adminlte-hybrid-shell.main-admin-shell .golden-score-badge {
  background: #fef9c3;
  color: #854d0e;
}
body.adminlte-hybrid-shell.main-admin-shell .confidence-badge {
  background: #f0fdf4;
  color: #15803d;
}

/* ---- 9. TABLE WRAP ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
}

/* ---- 10. EMPTY STATE ---- */
body.adminlte-hybrid-shell.main-admin-shell td.analytics-empty-state,
body.adminlte-hybrid-shell.main-admin-shell span.analytics-empty-state {
  color: #94a3b8;
  font-size: .85rem;
  text-align: center;
  padding: 20px;
  display: block;
}

/* ---- 11. TIME HEATMAP HEAT CARDS ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-heat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-heat-card {
  background: #fff;
  border: 1px solid rgba(20,184,166,.15);
  border-radius: 16px;
  padding: 20px;
  transition: box-shadow .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-heat-card:hover {
  box-shadow: 0 4px 18px rgba(20,184,166,.12);
}
body.adminlte-hybrid-shell.main-admin-shell .heat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
body.adminlte-hybrid-shell.main-admin-shell .heat-label {
  font-size: .78rem;
  color: #64748b;
  font-weight: 700;
}
body.adminlte-hybrid-shell.main-admin-shell .heat-amount {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}
body.adminlte-hybrid-shell.main-admin-shell .heat-bar-wrap {
  background: #f1f5f9;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
body.adminlte-hybrid-shell.main-admin-shell .heat-bar {
  background: linear-gradient(90deg, #14b8a6, #0d9488);
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
}
body.adminlte-hybrid-shell.main-admin-shell .heat-meta {
  font-size: .75rem;
  color: #64748b;
  margin-bottom: 4px;
}
body.adminlte-hybrid-shell.main-admin-shell .heat-ad-time {
  font-size: .75rem;
  color: #14b8a6;
  font-weight: 700;
}

/* ---- 12. RESPONSIVE ---- */
@media (max-width: 760px) {
  body.adminlte-hybrid-shell.main-admin-shell .analytics-hero {
    padding: 20px;
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
  }
  body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-inline {
    width: 100%;
  }
  body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  body.adminlte-hybrid-shell.main-admin-shell .analytics-heat-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .analytics-filter-inline input {
    width: 100%;
  }
}


/* =============================================================
   v97: Analytics pages polish — phase 3C-2
   Scoped to: body.adminlte-hybrid-shell.main-admin-shell
   Pages: ad-opportunities, missing-categories, inactive-reasons,
          city-map, operations, audit-logs
   ============================================================= */

/* ---- 1. OPPORTUNITY GRID ---- */
body.adminlte-hybrid-shell.main-admin-shell .opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: #fff;
  border-radius: 14px;
  border: 1px dashed #e2e8f0;
}

/* ---- 2. OPPORTUNITY CARD ---- */
body.adminlte-hybrid-shell.main-admin-shell .opp-card {
  background: #fff;
  border: 1px solid rgba(20,184,166,.15);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .2s, transform .15s;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-card:hover {
  box-shadow: 0 6px 24px rgba(20,184,166,.12);
  transform: translateY(-2px);
}

body.adminlte-hybrid-shell.main-admin-shell .opp-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-card-head h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-score-badge {
  background: rgba(20,184,166,.12);
  color: #0f766e;
  border: 1px solid rgba(20,184,166,.2);
  white-space: nowrap;
  flex-shrink: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-suggestion {
  font-size: .88rem;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

/* ---- 3. OPPORTUNITY META GRID ---- */
body.adminlte-hybrid-shell.main-admin-shell .opp-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-meta > div span {
  font-size: .7rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-meta > div strong {
  font-size: .9rem;
  font-weight: 800;
  color: #0f172a;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-meta-full {
  grid-column: 1 / -1;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  margin-top: 2px;
}

/* ---- 4. OPPORTUNITY ACTION BUTTON ---- */
body.adminlte-hybrid-shell.main-admin-shell .opp-action-btn {
  display: inline-block;
  margin-top: auto;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid #14b8a6;
  color: #0f766e;
  font-size: .83rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background .15s, color .15s;
}

body.adminlte-hybrid-shell.main-admin-shell .opp-action-btn:hover {
  background: #14b8a6;
  color: #fff;
}

/* ---- 5. INLINE ADD FORM (missing-categories table) ---- */
body.adminlte-hybrid-shell.main-admin-shell .inline-add-form {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

body.adminlte-hybrid-shell.main-admin-shell .inline-add-form select {
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: .8rem;
  min-height: 32px;
  color: #0f172a;
  flex: 1 1 140px;
}

body.adminlte-hybrid-shell.main-admin-shell .inline-add-form select:focus {
  outline: none;
  border-color: #14b8a6;
}

body.adminlte-hybrid-shell.main-admin-shell .inline-add-form .btn-sm {
  padding: 5px 12px;
  font-size: .8rem;
  border-radius: 7px;
  background: #14b8a6;
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

body.adminlte-hybrid-shell.main-admin-shell .inline-add-form .btn-sm:hover {
  background: #0d9488;
}

/* ---- 6. CITYMAP TIPS PANEL ---- */
body.adminlte-hybrid-shell.main-admin-shell .citymap-tips .citymap-tip-text {
  font-size: .9rem;
  color: #475569;
  line-height: 1.75;
  margin: 0;
  padding: 12px 0 4px;
}

/* ---- 7. AUDIT HERO VARIANT ---- */
body.adminlte-hybrid-shell.main-admin-shell .audit-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

/* ---- 8. AUDIT STAT DANGER CARD ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.audit-stat-danger {
  border-color: rgba(239,68,68,.25);
  background: #fff5f5;
}

body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.audit-stat-danger strong {
  color: #dc2626;
}

/* ---- 9. OPERATIONS HERO — dark override ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.operations-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: none;
}

/* ---- 10. HERO EYEBROW (shared with v96 pages) ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero .eyebrow {
  display: inline-block;
  background: rgba(20,184,166,.18);
  color: #5eead4;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

/* ---- 11. RESPONSIVE ---- */
@media (max-width: 760px) {
  body.adminlte-hybrid-shell.main-admin-shell .opp-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .inline-add-form {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  body.adminlte-hybrid-shell.main-admin-shell .opp-meta {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .opp-meta-full {
    grid-column: 1;
  }
}


/* =============================================================
   v98: Core admin pages polish — phase 3D
   Scoped to: body.adminlte-hybrid-shell.main-admin-shell
   Pages: users, expenses, expense-edit-logs, reports, search
   ============================================================= */

/* ---- 1. HERO EXPORT BUTTON (expenses page) ---- */
body.adminlte-hybrid-shell.main-admin-shell .hero-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.22);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .hero-export-btn:hover {
  background: rgba(255,255,255,.2);
}

/* ---- 2. USER STATE BADGES ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-badge.user-state-ok {
  background: rgba(34,197,94,.13);
  color: #15803d;
  border: 1px solid rgba(34,197,94,.2);
}

body.adminlte-hybrid-shell.main-admin-shell .analytics-badge.user-state-off {
  background: rgba(148,163,184,.13);
  color: #475569;
  border: 1px solid rgba(148,163,184,.2);
}

/* ---- 3. FILTER SUBMIT ROW (reports page) ---- */
body.adminlte-hybrid-shell.main-admin-shell .filter-submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}

/* ---- 4. SEARCH HERO — dark override ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.search-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}

/* ---- 5. HERO SEARCH FORM ---- */
body.adminlte-hybrid-shell.main-admin-shell .hero-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

body.adminlte-hybrid-shell.main-admin-shell .hero-search-form input[type="search"] {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .95rem;
  min-height: 46px;
}

body.adminlte-hybrid-shell.main-admin-shell .hero-search-form input[type="search"]::placeholder {
  color: rgba(255,255,255,.45);
}

body.adminlte-hybrid-shell.main-admin-shell .hero-search-form input[type="search"]:focus {
  outline: none;
  border-color: #14b8a6;
  background: rgba(255,255,255,.15);
}

body.adminlte-hybrid-shell.main-admin-shell .hero-search-form .btn {
  padding: 12px 22px;
  min-height: 46px;
  border-radius: 10px;
  background: #14b8a6;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

body.adminlte-hybrid-shell.main-admin-shell .hero-search-form .btn:hover {
  background: #0d9488;
}

/* ---- 6. SEARCH SUMMARY BAR ---- */
body.adminlte-hybrid-shell.main-admin-shell .search-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #f0fdfa;
  border: 1px solid rgba(20,184,166,.2);
  border-radius: 10px;
  font-size: .88rem;
  color: #0f172a;
  flex-wrap: wrap;
}

body.adminlte-hybrid-shell.main-admin-shell .search-summary-bar b {
  color: #0f766e;
}

body.adminlte-hybrid-shell.main-admin-shell .search-summary-bar small {
  color: #64748b;
  font-weight: 700;
}

/* ---- 7. SEARCH EMPTY HINT ---- */
body.adminlte-hybrid-shell.main-admin-shell .search-empty-hint {
  text-align: center;
  padding: 48px 24px;
}

body.adminlte-hybrid-shell.main-admin-shell .search-empty-hint h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

/* ---- 8. SEARCH RESULTS GRID (scoped override) ---- */
body.adminlte-hybrid-shell.main-admin-shell .search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ---- 9. RESPONSIVE ---- */
@media (max-width: 760px) {
  body.adminlte-hybrid-shell.main-admin-shell .hero-search-form {
    flex-direction: column;
    align-items: stretch;
  }
  body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.search-hero {
    padding: 20px;
  }
  body.adminlte-hybrid-shell.main-admin-shell .search-results-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   v99: Content management pages polish — phase 3E
   Scope: body.adminlte-hybrid-shell.main-admin-shell
   ============================================================ */

/* ---- Hero overrides ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.categories-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.neighborhoods-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1a2744 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.content-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1a3b 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.bot-messages-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1a3028 100%);
}

/* ---- Neighborhood badges ---- */
body.adminlte-hybrid-shell.main-admin-shell .neigh-pending-badge {
  background: #f59e0b;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 999px;
  white-space: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-badge.neigh-badge-pending {
  background: rgba(245,158,11,.15);
  color: #d97706;
  border: 1px solid rgba(245,158,11,.35);
}

/* ---- Neighborhood action buttons ---- */
body.adminlte-hybrid-shell.main-admin-shell .neigh-btn-approve {
  background: #14b8a6;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .3rem .85rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .neigh-btn-approve:hover {
  background: #0d9488;
}
body.adminlte-hybrid-shell.main-admin-shell .neigh-btn-reject {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .3rem .85rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .neigh-btn-reject:hover {
  background: #dc2626;
}

/* ---- Bot messages list ---- */
body.adminlte-hybrid-shell.main-admin-shell .bot-messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-card .card-header h2 {
  font-size: .95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-card .card-body {
  padding: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-fields {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: .75rem 1rem;
  margin-bottom: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-body {
  font-family: inherit;
  font-size: .88rem;
  resize: vertical;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .85rem;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-notes {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-message-notes span {
  font-size: .85rem;
  color: #475569;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-messages-guide {
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

/* ---- Toggle switch: admin-status-toggle (v95 style, adapted) ---- */
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle.is-on {
  background: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle.is-off {
  background: #94a3b8;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle span {
  font-size: 0;
  width: 0;
  overflow: hidden;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  transition: left .2s, right .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle.is-on::before {
  left: 3px;
  right: auto;
}
body.adminlte-hybrid-shell.main-admin-shell .admin-status-toggle.is-off::before {
  right: 3px;
  left: auto;
}

/* ---- Content management cards (content.html) ---- */
body.adminlte-hybrid-shell.main-admin-shell .content-text-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .content-edit-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: border-color .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .content-edit-card.is-off {
  opacity: .65;
  border-color: #cbd5e1;
}
body.adminlte-hybrid-shell.main-admin-shell .content-edit-card label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 600;
  color: #475569;
}
body.adminlte-hybrid-shell.main-admin-shell .content-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .content-card-head small {
  font-size: .72rem;
  color: #94a3b8;
  display: block;
  margin-bottom: .15rem;
}
body.adminlte-hybrid-shell.main-admin-shell .content-card-head code {
  font-size: .78rem;
  background: #f1f5f9;
  padding: .15rem .5rem;
  border-radius: 4px;
  color: #334155;
}
body.adminlte-hybrid-shell.main-admin-shell .content-textarea {
  font-size: .85rem;
  resize: vertical;
  font-family: inherit;
}
body.adminlte-hybrid-shell.main-admin-shell .content-save-btn {
  align-self: flex-end;
  margin-top: .25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .content-update-form {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
body.adminlte-hybrid-shell.main-admin-shell .content-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
  align-items: end;
}
body.adminlte-hybrid-shell.main-admin-shell .content-public-switch {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: #475569;
  cursor: pointer;
  margin: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .content-inline-edit-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .content-row-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .content-update-edit-cell {
  min-width: 280px;
}

/* ---- Category page polish ---- */
body.adminlte-hybrid-shell.main-admin-shell .category-create-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
  align-items: end;
}
body.adminlte-hybrid-shell.main-admin-shell .category-create-form .wide {
  grid-column: 1 / -1;
}
body.adminlte-hybrid-shell.main-admin-shell .form-actions-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
}
body.adminlte-hybrid-shell.main-admin-shell .emoji-input {
  width: 70px;
  text-align: center;
  font-size: 1.1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .category-display-select {
  font-size: .85rem;
}
body.adminlte-hybrid-shell.main-admin-shell .category-row-active {
  background: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .category-row-off {
  background: #f8fafc;
  opacity: .8;
}
body.adminlte-hybrid-shell.main-admin-shell .category-actions {
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: nowrap;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  body.adminlte-hybrid-shell.main-admin-shell .bot-message-fields {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .content-text-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .content-form-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .category-create-form {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .content-update-edit-cell {
    min-width: unset;
  }
}


/* ============================================================
   v100: Settings pages polish -- phase 3F
   Scope: body.adminlte-hybrid-shell.main-admin-shell
   ============================================================ */

/* ---- Hero gradients ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.settings-sys-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e1b4b 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.email-admin-hero {
  background: linear-gradient(135deg, #0f172a 0%, #0c2a3e 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.theme-admin-hero {
  background: linear-gradient(135deg, #0f172a 0%, #2d1b4e 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.maintenance-admin-hero {
  background: linear-gradient(135deg, #0f172a 0%, #3d1a0a 100%);
}

/* ---- Status grid (system settings) ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .85rem;
  margin-bottom: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card:hover {
  border-color: #14b8a6;
  box-shadow: 0 4px 12px rgba(20,184,166,.12);
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card small {
  font-size: .72rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card span {
  font-size: .78rem;
  color: #64748b;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card.ok {
  border-right: 3px solid #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card.warn {
  border-right: 3px solid #f59e0b;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card.error {
  border-right: 3px solid #ef4444;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-status-card.info {
  border-right: 3px solid #3b82f6;
}

/* ---- Jump panel ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel > div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 120px;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel > div strong {
  font-size: .88rem;
  color: #1e293b;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel > div span {
  font-size: .76rem;
  color: #64748b;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel nav {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel nav a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: .8rem;
  color: #334155;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel nav a:hover {
  background: #e0f2fe;
  border-color: #14b8a6;
  color: #0d9488;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel nav a small {
  font-size: .68rem;
  background: #e2e8f0;
  padding: .1rem .35rem;
  border-radius: 4px;
  color: #64748b;
}

/* ---- Note / Warning panel ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-note {
  background: #fefce8;
  border: 1px solid #fde68a !important;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-note strong {
  font-size: .88rem;
  color: #78350f;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-note span,
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-note small {
  font-size: .82rem;
  color: #92400e;
}

/* ---- Settings admin card ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* ---- Badge (chip/pill) ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: #f1f5f9;
  color: #475569;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Settings grid ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-grid .wide {
  grid-column: 1 / -1;
}

/* ---- Settings field ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field .field-title {
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field input[type="text"],
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field input[type="number"],
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field input[type="email"],
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field input[type="password"],
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field input[type="url"],
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field textarea,
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field select {
  padding: .45rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: .88rem;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field input:focus,
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field textarea:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20,184,166,.12);
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field .field-help {
  font-size: .75rem;
  color: #94a3b8;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field .secret-status {
  font-size: .75rem;
  color: #14b8a6;
  font-weight: 600;
}
body.adminlte-hybrid-shell.main-admin-shell .toggle-setting-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 0;
}
body.adminlte-hybrid-shell.main-admin-shell .toggle-setting-row small {
  font-size: .78rem;
  color: #64748b;
}
body.adminlte-hybrid-shell.main-admin-shell .clear-secret-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: #ef4444;
  cursor: pointer;
  font-weight: 500;
  margin-top: .25rem;
}

/* ---- Email help note ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-email-note {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .82rem;
  color: #0369a1;
  margin: .75rem 0;
  line-height: 1.6;
}

/* ---- Email settings layout ---- */
body.adminlte-hybrid-shell.main-admin-shell .email-settings-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
body.adminlte-hybrid-shell.main-admin-shell .email-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-top: .75rem;
}
body.adminlte-hybrid-shell.main-admin-shell .email-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
body.adminlte-hybrid-shell.main-admin-shell .email-field > span {
  font-size: .8rem;
  font-weight: 600;
  color: #475569;
}
body.adminlte-hybrid-shell.main-admin-shell .email-field input {
  padding: .45rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: .85rem;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
body.adminlte-hybrid-shell.main-admin-shell .email-field input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20,184,166,.12);
}
body.adminlte-hybrid-shell.main-admin-shell .email-check-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .83rem;
  color: #475569;
  cursor: pointer;
  grid-column: 1 / -1;
  padding: .35rem 0;
}
body.adminlte-hybrid-shell.main-admin-shell .email-check-row.danger {
  color: #ef4444;
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .email-secret-status {
  font-size: .78rem;
  color: #14b8a6;
  font-weight: 600;
  margin: .5rem 0 .25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .email-log-status {
  font-size: .74rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 999px;
  display: inline-block;
}
body.adminlte-hybrid-shell.main-admin-shell .email-log-status.ok {
  background: rgba(20,184,166,.12);
  color: #0d9488;
}
body.adminlte-hybrid-shell.main-admin-shell .email-log-status.warn {
  background: rgba(239,68,68,.1);
  color: #dc2626;
}
body.adminlte-hybrid-shell.main-admin-shell .email-stat-on strong {
  color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .email-stat-off strong {
  color: #f59e0b;
}

/* ---- Save bar ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.35rem;
  margin-top: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-save-bar > div:first-child {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-save-bar strong {
  font-size: .9rem;
  color: #1e293b;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-save-bar small {
  font-size: .78rem;
  color: #64748b;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ---- Test form ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-test-form {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-test-form label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
  flex: 1;
  min-width: 220px;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-test-form input {
  padding: .45rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: .88rem;
  color: #1e293b;
  background: #fff;
  outline: none;
  font-family: inherit;
}

/* ---- Page form container ---- */
body.adminlte-hybrid-shell.main-admin-shell .settings-page-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ---- Maintenance ---- */
body.adminlte-hybrid-shell.main-admin-shell .maintenance-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: .75rem 0;
  cursor: pointer;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-switch-row span strong {
  display: block;
  font-size: .88rem;
  color: #1e293b;
  font-weight: 600;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-switch-row span small {
  font-size: .75rem;
  color: #64748b;
  margin-top: .1rem;
  display: block;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-field-grid input {
  width: 100%;
  padding: .45rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: .85rem;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
  box-sizing: border-box;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-field-grid input:focus {
  border-color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-field-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: .35rem;
  margin-top: .25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: .88rem;
  color: #1e293b;
  background: #fff;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-textarea:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20,184,166,.12);
}
body.adminlte-hybrid-shell.main-admin-shell .settings-admin-help-text {
  font-size: .75rem;
  color: #94a3b8;
  margin-top: .3rem;
  line-height: 1.5;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-stat-warn {
  border-right: 3px solid #f59e0b;
}
body.adminlte-hybrid-shell.main-admin-shell .maintenance-stat-warn strong {
  color: #d97706;
}

/* ---- Theme ---- */
body.adminlte-hybrid-shell.main-admin-shell .theme-admin-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.25rem;
  align-items: start;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-live-preview {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--preview-bg, #f4f6fb);
  margin-bottom: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-live-top {
  height: 36px;
  background: var(--preview-primary, #4f46e5);
}
body.adminlte-hybrid-shell.main-admin-shell .theme-live-body {
  padding: 1rem;
  background: var(--preview-surface, #fff);
  margin: .5rem;
  border-radius: 6px;
  color: var(--preview-text, #0f172a);
}
body.adminlte-hybrid-shell.main-admin-shell .theme-live-body > span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .55;
  display: block;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-live-body > strong {
  font-size: .92rem;
  display: block;
  margin: .2rem 0 .25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-live-body > p {
  font-size: .73rem;
  opacity: .65;
  margin: 0 0 .6rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-preview-buttons {
  display: flex;
  gap: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-preview-buttons button {
  padding: .25rem .7rem;
  font-size: .7rem;
  border: none;
  border-radius: 5px;
  cursor: default;
  font-weight: 600;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-preview-buttons button:first-child {
  background: var(--preview-primary, #4f46e5);
  color: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-preview-buttons button:last-child {
  background: var(--preview-accent, #f59e0b);
  color: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-upload-panel {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  margin-top: .25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-logo-box {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-logo-box > div h3 {
  font-size: .9rem;
  font-weight: 600;
  color: #1e293b;
  margin: .15rem 0 0;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-logo-preview {
  width: 100%;
  max-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: .5rem;
  overflow: hidden;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-logo-preview img {
  max-height: 68px;
  max-width: 100%;
  object-fit: contain;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-logo-preview span {
  font-size: .78rem;
  color: #94a3b8;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-remove-logo {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: #ef4444;
  cursor: pointer;
  font-weight: 500;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-bottom: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-field > span {
  font-size: .8rem;
  font-weight: 600;
  color: #475569;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-field select {
  padding: .45rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: .85rem;
  color: #1e293b;
  background: #fff;
  outline: none;
  font-family: inherit;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-field small {
  font-size: .72rem;
  color: #94a3b8;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: .75rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-color-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-color-field > span {
  font-size: .77rem;
  font-weight: 600;
  color: #475569;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-color-preview {
  display: flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: .3rem .5rem;
  background: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-color-preview input[type="color"] {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  background: none;
  flex-shrink: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .settings-color-preview input[type="text"] {
  flex: 1;
  border: none;
  font-size: .76rem;
  font-family: monospace;
  color: #334155;
  background: none;
  outline: none;
  min-width: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-reference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .theme-reference-grid span {
  font-size: .83rem;
  color: #475569;
  padding: .6rem .85rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  body.adminlte-hybrid-shell.main-admin-shell .theme-admin-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .email-settings-layout {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .maintenance-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  body.adminlte-hybrid-shell.main-admin-shell .settings-admin-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .email-field-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .email-check-row {
    grid-column: auto;
  }
  body.adminlte-hybrid-shell.main-admin-shell .maintenance-field-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .theme-field-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .theme-reference-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .settings-admin-save-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  body.adminlte-hybrid-shell.main-admin-shell .settings-status-grid {
    grid-template-columns: 1fr 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .settings-jump-panel {
    flex-direction: column;
    align-items: flex-start;
  }
  body.adminlte-hybrid-shell.main-admin-shell .settings-admin-test-form {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (max-width: 480px) {
  body.adminlte-hybrid-shell.main-admin-shell .settings-status-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .theme-color-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* ============================================================
   v101: System operations pages polish -- phase 3G
   Scope: body.adminlte-hybrid-shell.main-admin-shell
   ============================================================ */

/* ---- Hero gradients ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.bot-control-hero {
  background: linear-gradient(135deg, #0f172a 0%, #0d2b3e 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.system-logs-hero {
  background: linear-gradient(135deg, #0f172a 0%, #3b0a0a 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.server-control-hero {
  background: linear-gradient(135deg, #0f172a 0%, #0a1f3b 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.system-health-hero {
  background: linear-gradient(135deg, #0f172a 0%, #0a2e1a 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.update-center-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1a4b 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.update-safety-hero {
  background: linear-gradient(135deg, #0f172a 0%, #3b2200 100%);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-hero.backups-hero {
  background: linear-gradient(135deg, #0f172a 0%, #0a1a2e 100%);
}

/* ---- Bot hero state indicator ---- */
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  min-width: 180px;
  flex-shrink: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state span {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .05em;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state small {
  font-size: .74rem;
  color: rgba(255,255,255,.55);
}
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state.running {
  border-color: rgba(20,184,166,.5);
  background: rgba(20,184,166,.12);
}
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state.running strong {
  color: #5eead4;
}
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state.stopped,
body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state.error {
  border-color: rgba(239,68,68,.4);
  background: rgba(239,68,68,.1);
}

/* ---- Stat card color variants ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.bot-stat-running strong {
  color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.bot-stat-stopped strong {
  color: #ef4444;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.log-stat-ok strong {
  color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.log-stat-warn strong {
  color: #f59e0b;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.server-stat-ok strong {
  color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.server-stat-warn strong {
  color: #f59e0b;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.health-stat-ok strong {
  color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.health-stat-warn strong {
  color: #f59e0b;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.health-stat-fail strong {
  color: #ef4444;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.update-stat-safe strong {
  color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-stat-card.update-stat-warn strong {
  color: #f59e0b;
}

/* ---- Health/update badges ---- */
body.adminlte-hybrid-shell.main-admin-shell .analytics-badge.health-badge-ok {
  background: rgba(20,184,166,.12);
  color: #0d9488;
  border-color: rgba(20,184,166,.3);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-badge.health-badge-warn {
  background: rgba(245,158,11,.12);
  color: #d97706;
  border-color: rgba(245,158,11,.3);
}
body.adminlte-hybrid-shell.main-admin-shell .analytics-badge.health-badge-fail {
  background: rgba(239,68,68,.1);
  color: #dc2626;
  border-color: rgba(239,68,68,.3);
}

/* ---- Readiness grid (bot) ---- */
body.adminlte-hybrid-shell.main-admin-shell .bot-readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .readiness-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
body.adminlte-hybrid-shell.main-admin-shell .readiness-item > span {
  font-size: .72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
}
body.adminlte-hybrid-shell.main-admin-shell .readiness-item > strong {
  font-size: .95rem;
  font-weight: 700;
  color: #1e293b;
}
body.adminlte-hybrid-shell.main-admin-shell .readiness-item > small {
  font-size: .73rem;
  color: #64748b;
  line-height: 1.4;
}
body.adminlte-hybrid-shell.main-admin-shell .readiness-item.ok {
  border-right: 3px solid #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .readiness-item.warn {
  border-right: 3px solid #f59e0b;
  background: #fffbeb;
}

/* ---- Bot monitor 2-col grid ---- */
body.adminlte-hybrid-shell.main-admin-shell .bot-monitor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* ---- Log box ---- */
body.adminlte-hybrid-shell.main-admin-shell .system-admin-log-box {
  background: #0f172a;
  color: #94a3b8;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: .78rem;
  line-height: 1.7;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 440px;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: .75rem;
  border: 1px solid #1e293b;
}

/* ---- Tips / notes panel ---- */
body.adminlte-hybrid-shell.main-admin-shell .system-admin-tips {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-tips h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: .75rem;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-tips .notes {
  padding-right: 1.25rem;
  margin: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-tips .notes li {
  font-size: .83rem;
  color: #475569;
  margin-bottom: .5rem;
  line-height: 1.6;
}

/* ---- Warning box ---- */
body.adminlte-hybrid-shell.main-admin-shell .system-admin-warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-right: 4px solid #f59e0b;
  border-radius: 8px;
  padding: .85rem 1.1rem;
  font-size: .85rem;
  color: #78350f;
  line-height: 1.6;
}

/* ---- Server message box ---- */
body.adminlte-hybrid-shell.main-admin-shell .server-message-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: .88rem;
  color: #334155;
  min-height: 50px;
  margin-top: .5rem;
  font-family: inherit;
  line-height: 1.6;
}

/* ---- Server action grid ---- */
body.adminlte-hybrid-shell.main-admin-shell .server-action-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1.5rem 0;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s, background .2s;
  outline: none;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card.update {
  border-color: #14b8a6;
  color: #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card.update:hover {
  background: #f0fdfb;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card.restart {
  border-color: #3b82f6;
  color: #3b82f6;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card.restart:hover {
  background: #eff6ff;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card.stop {
  border-color: #ef4444;
  color: #ef4444;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-card.stop:hover {
  background: #fef2f2;
}
body.adminlte-hybrid-shell.main-admin-shell .server-action-svg {
  width: 38px;
  height: 38px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.adminlte-hybrid-shell.main-admin-shell .server-note-icon {
  margin-inline-end: .35rem;
  font-style: normal;
  font-weight: 700;
  color: #64748b;
}

/* ---- Health cards grid ---- */
body.adminlte-hybrid-shell.main-admin-shell .health-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .health-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .health-card.ok {
  border-right: 3px solid #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .health-card.warn {
  border-right: 3px solid #f59e0b;
  background: #fffbeb;
}
body.adminlte-hybrid-shell.main-admin-shell .health-card.fail,
body.adminlte-hybrid-shell.main-admin-shell .health-card.error {
  border-right: 3px solid #ef4444;
  background: #fef2f2;
}
body.adminlte-hybrid-shell.main-admin-shell .health-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}
body.adminlte-hybrid-shell.main-admin-shell .health-card-head strong {
  font-size: .9rem;
  color: #1e293b;
}
body.adminlte-hybrid-shell.main-admin-shell .health-card > p {
  font-size: .82rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}
body.adminlte-hybrid-shell.main-admin-shell .health-recommendation {
  font-size: .78rem;
  color: #0d9488;
  font-style: italic;
  line-height: 1.5;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: .25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-error-summary {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 7px;
  padding: .65rem 1rem;
  font-size: .82rem;
  margin-top: .75rem;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  line-height: 1.5;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-error-summary strong {
  color: #dc2626;
  white-space: nowrap;
}

/* ---- Health info grid ---- */
body.adminlte-hybrid-shell.main-admin-shell .system-health-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .75rem;
}
body.adminlte-hybrid-shell.main-admin-shell .mini-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: .6rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
body.adminlte-hybrid-shell.main-admin-shell .mini-info.wide {
  grid-column: 1 / -1;
}
body.adminlte-hybrid-shell.main-admin-shell .mini-info small {
  font-size: .72rem;
  color: #94a3b8;
  font-weight: 500;
}
body.adminlte-hybrid-shell.main-admin-shell .mini-info code {
  font-size: .78rem;
  color: #334155;
  word-break: break-all;
}

/* ---- Update center ---- */
body.adminlte-hybrid-shell.main-admin-shell .update-center-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .update-upload-form {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .update-upload-form label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safe-note {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: .65rem .9rem;
  font-size: .78rem;
  color: #78350f;
  line-height: 1.5;
}
body.adminlte-hybrid-shell.main-admin-shell .update-rules-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .75rem 0;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}
body.adminlte-hybrid-shell.main-admin-shell .system-admin-badge.danger {
  background: rgba(239,68,68,.1);
  color: #dc2626;
  border-color: rgba(239,68,68,.3);
}
body.adminlte-hybrid-shell.main-admin-shell .update-allowed-details {
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .update-allowed-details summary {
  font-size: .8rem;
  color: #64748b;
  cursor: pointer;
  padding: .4rem 0;
  user-select: none;
}
body.adminlte-hybrid-shell.main-admin-shell .update-paths-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .5rem;
  padding: .5rem 0;
}
body.adminlte-hybrid-shell.main-admin-shell .update-paths-list code {
  font-size: .75rem;
  background: #f1f5f9;
  padding: .2rem .5rem;
  border-radius: 4px;
  color: #334155;
}

/* ---- Update safety ---- */
body.adminlte-hybrid-shell.main-admin-shell .update-safety-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-top: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check.ok {
  border-right: 3px solid #14b8a6;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check.warn {
  border-right: 3px solid #f59e0b;
  background: #fffbeb;
}
body.adminlte-hybrid-shell.main-admin-shell .check-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check.ok .check-icon {
  background: rgba(20,184,166,.12);
  color: #0d9488;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check.warn .check-icon {
  background: rgba(245,158,11,.15);
  color: #d97706;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check > div strong {
  font-size: .88rem;
  color: #1e293b;
  display: block;
  margin-bottom: .3rem;
}
body.adminlte-hybrid-shell.main-admin-shell .update-safety-check > div p {
  font-size: .78rem;
  color: #475569;
  margin: 0 0 .5rem;
  line-height: 1.5;
}
body.adminlte-hybrid-shell.main-admin-shell .safe-steps-list {
  padding-right: 1.25rem;
  margin: .5rem 0 0;
}
body.adminlte-hybrid-shell.main-admin-shell .safe-steps-list li {
  font-size: .85rem;
  color: #334155;
  margin-bottom: .6rem;
  line-height: 1.6;
  padding-right: .25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .command-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .command-list code {
  display: block;
  background: #0f172a;
  color: #5eead4;
  padding: .65rem 1rem;
  border-radius: 7px;
  font-size: .8rem;
  font-family: 'Consolas', 'Monaco', monospace;
  word-break: break-all;
  line-height: 1.6;
}

/* ---- Backups ---- */
body.adminlte-hybrid-shell.main-admin-shell .backups-action-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
body.adminlte-hybrid-shell.main-admin-shell .backup-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .backup-warning-box {
  margin-bottom: .5rem;
}
body.adminlte-hybrid-shell.main-admin-shell .backup-main-button {
  align-self: flex-start;
  min-width: 140px;
}
body.adminlte-hybrid-shell.main-admin-shell .backup-row-actions {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: nowrap;
}

/* ---- Warning / yellow button ---- */
body.adminlte-hybrid-shell.main-admin-shell .btn-warning-custom {
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.adminlte-hybrid-shell.main-admin-shell .btn-warning-custom:hover {
  background: #d97706;
  color: #fff;
}
body.adminlte-hybrid-shell.main-admin-shell .btn-warning-custom.btn-sm {
  font-size: .78rem;
  padding: .28rem .7rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  body.adminlte-hybrid-shell.main-admin-shell .bot-monitor-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .update-safety-check-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .update-center-layout {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .update-safety-layout {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .backups-action-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  body.adminlte-hybrid-shell.main-admin-shell .bot-readiness-grid {
    grid-template-columns: 1fr 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .health-action-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .system-health-info-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .backup-row-actions {
    flex-wrap: wrap;
  }
  body.adminlte-hybrid-shell.main-admin-shell .bot-hero-state {
    min-width: auto;
    width: 100%;
  }
  body.adminlte-hybrid-shell.main-admin-shell .server-action-grid {
    gap: 1.25rem;
  }
}
@media (max-width: 480px) {
  body.adminlte-hybrid-shell.main-admin-shell .bot-readiness-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   v102: Admin permissions pages polish — phase 3H
   Scope: body.adminlte-hybrid-shell.main-admin-shell only
   ============================================================ */

body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-admin-hero {
  background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%);
}

/* ===== Create form grid ===== */
body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-create-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* ===== Permissions role grid ===== */
body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

body.adminlte-hybrid-shell.main-admin-shell .permissions-role-item {
  background: var(--surface-alt, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

body.adminlte-hybrid-shell.main-admin-shell .permissions-role-item strong {
  font-size: 0.85rem;
  color: var(--text, #1e293b);
}

body.adminlte-hybrid-shell.main-admin-shell .permissions-role-item span {
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

/* ===== Role badge ===== */
body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-badge {
  background: var(--accent-soft, #eff6ff);
  color: var(--accent, #2563eb);
  border: 1px solid var(--accent-border, #bfdbfe);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
}

/* ===== Row actions column ===== */
body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
}

body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-actions form {
  margin: 0;
}

body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-actions .btn {
  width: 100%;
  text-align: center;
}

/* ===== Distributor link box ===== */
body.adminlte-hybrid-shell.main-admin-shell .distributor-link-box {
  background: var(--surface-alt, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}

body.adminlte-hybrid-shell.main-admin-shell .distributor-link-code {
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--accent, #2563eb);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-create-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-create-grid {
    grid-template-columns: 1fr;
  }
  body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  body.adminlte-hybrid-shell.main-admin-shell .permissions-admin-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   v103: Mobile topbar/sidebar overlap fix
   Scope: body.adminlte-hybrid-shell.main-admin-shell only
   Fix: topbar fixed + z-index order + drawer/backdrop alignment
   ============================================================ */

/* ── CSS variable: topbar height (used in 3 places below) ── */
body.adminlte-hybrid-shell.main-admin-shell {
  --mob-topbar-h: 66px;
}

/* ── 1. Topbar: fixed + raised above drawer & backdrop ── */
@media (max-width: 1199px) {
  body.adminlte-hybrid-shell.main-admin-shell .mobile-topbar.mobile-only {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-height: var(--mob-topbar-h) !important;
    z-index: 201 !important;
  }

  /* ── 2. Main layout: offset below fixed topbar ── */
  body.adminlte-hybrid-shell.main-admin-shell .main-layout {
    padding-top: calc(var(--mob-topbar-h) + 10px) !important;
  }

  /* ── 3. Drawer: starts at topbar bottom ── */
  body.adminlte-hybrid-shell.main-admin-shell .mobile-drawer.mobile-only {
    top: var(--mob-topbar-h) !important;
    bottom: calc(76px + var(--safe-bottom)) !important;
    height: auto !important;
  }

  /* ── 4. Backdrop: starts at topbar bottom (topbar stays visible) ── */
  body.adminlte-hybrid-shell.main-admin-shell .mobile-menu-backdrop.mobile-only {
    top: var(--mob-topbar-h) !important;
  }
}

/* ── Phone ≤430px adjustments ── */
@media (max-width: 430px) {
  body.adminlte-hybrid-shell.main-admin-shell .mobile-drawer.mobile-only {
    top: var(--mob-topbar-h) !important;
    bottom: calc(72px + var(--safe-bottom)) !important;
  }

  body.adminlte-hybrid-shell.main-admin-shell .mobile-menu-backdrop.mobile-only {
    top: var(--mob-topbar-h) !important;
  }
}


/* ============================================================
   v103b: Desktop margin-right fix (supplement to v103)
   On screens <=1199px, the v84 AdminLTE bridge sets
   margin-right: 282px on .main-layout even when the
   desktop sidebar is hidden (display:none). This leaves
   a blank 282px strip on the right. Fix: reset to 0.
   Also raise sidebar z-index above sticky topbar on desktop.
   ============================================================ */

/* Fix blank right strip on tablets / small laptops (<=1199px) */
@media (max-width: 1199px) {
  body.adminlte-hybrid-shell.main-admin-shell .main-layout.app-main {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  /* Page container: full width on mobile */
  body.adminlte-hybrid-shell.main-admin-shell .page-container.app-content {
    max-width: 100% !important;
  }
}

/* Fix desktop: sidebar should always render above sticky topbar
   at their shared boundary (z-index 50 vs 850) */
body.adminlte-hybrid-shell.main-admin-shell .desktop-sidebar.app-sidebar {
  z-index: 900 !important;
}

/* ===== v114 — Admin merchants: bulk-action bar + checkboxes ===== */

/* Bulk action floating bar */
.bulk-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  animation: bar-in .18s ease;
}
@keyframes bar-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Count badge inside bar */
.bulk-badge {
  font-weight: 700;
  font-size: .9rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  white-space: nowrap;
}

/* Shortcut buttons row */
.bulk-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* Select-all label in table header */
.bulk-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--muted);
  user-select: none;
}
.bulk-select-all-cb {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Checkbox label on each merchant card (card view) */
.merchant-card-cb-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: .8rem;
  color: var(--muted);
}
.merchant-row-cb,
.offer-row-cb {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Highlighted row when checked */
tr:has(.merchant-row-cb:checked),
tr:has(.offer-row-cb:checked) {
  background: color-mix(in srgb, var(--primary) 6%, transparent) !important;
}

/* Date filter inline layout */
.merchant-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.merchant-date-filter input[type="date"] {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
}

@media (max-width: 600px) {
  .bulk-action-bar { gap: 8px; padding: 8px 12px; }
  .bulk-shortcuts  { gap: 6px; }
}
/* ===== end v114 ===== */


/* ============================================================
   v115 / Phase 9: Dashboard responsive polish
   Scope: admin + merchant dashboards only. No route/database changes.
   ============================================================ */
:root {
  --phase9-shadow-soft: 0 14px 38px rgba(15, 23, 42, .08);
  --phase9-shadow-card: 0 10px 28px rgba(15, 23, 42, .07);
  --phase9-border: rgba(148, 163, 184, .24);
  --phase9-surface: rgba(255,255,255,.92);
  --phase9-radius: 20px;
}

.skip-to-content {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 5000;
  transform: translateY(-140%);
  background: var(--primary, #0f766e);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: var(--phase9-shadow-soft);
  font-weight: 800;
}
.skip-to-content:focus { transform: translateY(0); outline: 3px solid rgba(20,184,166,.35); }

body.admin-shell {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
body.admin-shell .main-layout,
body.admin-shell .page-container,
body.admin-shell .app-content { min-width: 0; }

body.adminlte-hybrid-shell.main-admin-shell .app-topbar,
body.merchant-portal-shell .app-topbar {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, .20);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
}

body.adminlte-hybrid-shell.main-admin-shell .desktop-topbar .topbar-actions,
body.merchant-portal-shell .desktop-topbar .topbar-actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.adminlte-hybrid-shell.main-admin-shell .topbar-search,
body.merchant-portal-shell .topbar-search { min-width: min(290px, 100%); }
body.adminlte-hybrid-shell.main-admin-shell .topbar-search input,
body.merchant-portal-shell .topbar-search input { width: 100%; }

body.adminlte-hybrid-shell.main-admin-shell .page-container,
body.merchant-portal-shell .page-container {
  width: 100%;
  padding-inline: clamp(14px, 2.2vw, 30px) !important;
  padding-bottom: calc(36px + var(--safe-bottom, 0px));
}

.page-container > h1:first-child,
.marketing-hero h1,
.dashboard-hero h1,
.campaigns-hero h1,
.cleanup-hero h1 {
  letter-spacing: -.03em;
  line-height: 1.2;
  text-wrap: balance;
}

.page-header,
.marketing-hero,
.dashboard-hero,
.panel,
.card-section,
.marketing-panel,
.form-section-card,
.automation-card,
.cleanup-card,
.merchant-section-card {
  box-shadow: var(--phase9-shadow-card);
  border-color: var(--phase9-border) !important;
}

.section-title-row,
.marketing-hero,
.dashboard-hero,
.campaign-card-head,
.pulse-head {
  gap: 12px;
}
.section-title-row > div,
.marketing-hero-copy,
.admin-dashboard-hero-text { min-width: 0; }
.section-title-row p,
.marketing-hero p,
.dashboard-hero p,
.card small,
.command-tile small,
.campaign-overview-card small {
  max-width: 72ch;
}

/* Better grid behavior on desktop/tablet without touching templates */
.page-container .cards,
.page-container .dashboard-cards,
.page-container .admin-stat-grid,
.page-container .mini-kpi-grid,
.page-container .marketing-action-grid,
.page-container .campaign-card-grid,
.page-container .health-action-grid,
.page-container .bot-status-grid,
.page-container .automation-grid,
.page-container .cleanup-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  align-items: stretch;
}

.page-container .grid,
.page-container .marketing-grid,
.page-container .admin-dashboard-grid,
.page-container .campaign-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  align-items: start;
}

/* Forms: less visual clutter and safer mobile controls */
.page-container form:not(.topbar-search) input,
.page-container form:not(.topbar-search) select,
.page-container form:not(.topbar-search) textarea {
  min-height: 42px;
}
.page-container textarea { resize: vertical; }
.page-container .form-grid,
.page-container .campaign-form-clean .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.page-container label.wide,
.page-container .wide { grid-column: 1 / -1; }

/* Tables: keep desktop readable, mobile card-like, no sideways page overflow */
.table-wrap,
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}
.data-table-toolbar {
  position: sticky;
  top: 82px;
  z-index: 20;
  background: rgba(248, 250, 252, .88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  padding: 8px;
  margin-bottom: 10px;
}
.data-table-search { min-height: 40px; }
.responsive-card-table th,
.responsive-card-table td { vertical-align: middle; }

.inline-actions,
.table-actions,
.quick-actions,
.form-actions-bar,
.marketing-hero-actions,
.campaign-card-actions,
.campaign-save-bar,
.backup-actions,
.health-action-grid,
.cleanup-actions {
  gap: 8px;
}

.btn,
button,
input[type="submit"] {
  touch-action: manipulation;
}
.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .28) !important;
  outline-offset: 2px;
}

/* Sidebar readability */
.clean-sidebar-nav .nav-accordion summary,
.clean-sidebar-nav a {
  min-width: 0;
}
.clean-sidebar-nav .nav-accordion summary span:last-child,
.clean-sidebar-nav a:not(.logout-link) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile strong,
.sidebar-profile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* Small helper inserted by dashboard.js */
.phase9-scroll-top {
  position: fixed;
  left: 18px;
  bottom: calc(92px + var(--safe-bottom, 0px));
  z-index: 210;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary, #0f766e), #14b8a6);
  box-shadow: 0 12px 28px rgba(15, 118, 110, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: .18s ease;
}
.phase9-scroll-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (min-width: 1200px) {
  body.adminlte-hybrid-shell.main-admin-shell .main-layout.app-main,
  body.merchant-portal-shell .merchant-main-layout {
    min-height: 100vh;
  }
  body.adminlte-hybrid-shell.main-admin-shell .app-sidebar,
  body.merchant-portal-shell .app-sidebar {
    width: min(286px, 22vw) !important;
  }
  body.adminlte-hybrid-shell.main-admin-shell .sidebar-nav,
  body.merchant-portal-shell .sidebar-nav {
    padding-bottom: 22px;
  }
}

@media (max-width: 1199px) {
  body.adminlte-hybrid-shell.main-admin-shell,
  body.merchant-portal-shell {
    --mob-topbar-h: 62px;
  }
  body.adminlte-hybrid-shell.main-admin-shell .mobile-topbar.mobile-only,
  body.merchant-portal-shell .mobile-topbar.mobile-only {
    min-height: var(--mob-topbar-h) !important;
    padding-inline: 12px !important;
  }
  body.adminlte-hybrid-shell.main-admin-shell .mobile-drawer.mobile-only,
  body.merchant-portal-shell .mobile-drawer.mobile-only {
    width: min(390px, calc(100vw - 22px)) !important;
    border-radius: 22px 0 0 22px !important;
    box-shadow: -18px 0 45px rgba(15, 23, 42, .25) !important;
  }
  .mobile-menu-list.clean-sidebar-nav {
    padding: 10px !important;
  }
  .mobile-menu-list.clean-sidebar-nav .nav-accordion,
  .mobile-menu-list.clean-sidebar-nav > a {
    border-radius: 16px !important;
  }
  .mobile-menu-list.clean-sidebar-nav .nav-accordion-links {
    grid-template-columns: 1fr !important;
  }
  .desktop-topbar { display: none !important; }
  .page-container { padding-top: 8px !important; }
  .data-table-toolbar { top: calc(var(--mob-topbar-h, 62px) + 8px); }
}

@media (max-width: 767px) {
  body.admin-shell { font-size: 14px; }
  body.adminlte-hybrid-shell.main-admin-shell .page-container,
  body.merchant-portal-shell .page-container {
    padding-inline: 10px !important;
    padding-bottom: calc(96px + var(--safe-bottom, 0px)) !important;
  }
  .page-container > h1:first-child,
  .marketing-hero h1,
  .dashboard-hero h1,
  .campaigns-hero h1,
  .cleanup-hero h1 {
    font-size: clamp(1.35rem, 7vw, 1.9rem) !important;
  }
  .page-header,
  .marketing-hero,
  .dashboard-hero,
  .panel,
  .card-section,
  .marketing-panel,
  .form-section-card,
  .merchant-section-card {
    border-radius: 18px !important;
    padding: 14px !important;
  }
  .section-title-row,
  .marketing-hero,
  .dashboard-hero,
  .campaign-save-bar,
  .campaign-card-actions,
  .quick-actions,
  .form-actions-bar {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .section-title-row .btn,
  .marketing-hero-actions .btn,
  .quick-actions .btn,
  .campaign-card-actions .btn,
  .campaign-save-bar .btn,
  .form-actions-bar .btn,
  .page-container form:not(.topbar-search) > button,
  .page-container form:not(.topbar-search) > .btn {
    width: 100%;
    justify-content: center;
  }
  .mobile-bottom-nav {
    right: 8px !important;
    left: 8px !important;
    bottom: calc(8px + var(--safe-bottom, 0px)) !important;
    min-height: 58px !important;
    border-radius: 22px !important;
  }
  .mobile-bottom-nav a {
    min-width: 0;
    padding: 7px 4px !important;
  }
  .mobile-bottom-nav small {
    font-size: 10px;
    max-width: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .phase9-scroll-top { left: 12px; bottom: calc(76px + var(--safe-bottom, 0px)); width: 40px; height: 40px; }
}

@media (max-width: 560px) {
  .page-container .cards,
  .page-container .dashboard-cards,
  .page-container .admin-stat-grid,
  .page-container .mini-kpi-grid,
  .page-container .marketing-action-grid,
  .page-container .campaign-card-grid,
  .page-container .grid,
  .page-container .marketing-grid,
  .page-container .admin-dashboard-grid,
  .page-container .campaign-management-grid {
    grid-template-columns: 1fr !important;
  }
  .responsive-card-table[data-responsive-table="true"] thead { display: none; }
  .responsive-card-table[data-responsive-table="true"] tbody,
  .responsive-card-table[data-responsive-table="true"] tr,
  .responsive-card-table[data-responsive-table="true"] td { display: block; width: 100%; }
  .responsive-card-table[data-responsive-table="true"] tr {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
    margin-bottom: 10px;
    padding: 8px;
  }
  .responsive-card-table[data-responsive-table="true"] td {
    border: 0 !important;
    padding: 8px 6px !important;
    display: grid;
    grid-template-columns: minmax(92px, 38%) 1fr;
    gap: 10px;
    align-items: start;
  }
  .responsive-card-table[data-responsive-table="true"] td::before {
    content: attr(data-label);
    color: var(--muted, #64748b);
    font-size: .78rem;
    font-weight: 800;
  }
  .responsive-card-table[data-responsive-table="true"] tr[data-empty-row="true"] td {
    display: block;
    text-align: center;
  }
  .responsive-card-table[data-responsive-table="true"] tr[data-empty-row="true"] td::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* ===== end v115 / Phase 9 ===== */

/* ===== v119 / Update Center Arabic Details ===== */
.update-detail-card,
.update-history-detail-block {
  background: rgba(248, 250, 252, .92);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  padding: 1rem;
}
.update-detail-card h3 {
  margin: 0 0 .55rem;
  font-size: .98rem;
  font-weight: 900;
  color: var(--text, #0f172a);
}
.update-detail-card ul,
.update-history-detail-block ul {
  margin: .45rem 0 0;
  padding-inline-start: 1.2rem;
}
.update-detail-card li,
.update-history-detail-block li {
  margin: .28rem 0;
  color: var(--text, #0f172a);
  line-height: 1.75;
}
.update-history-details summary {
  cursor: pointer;
  color: var(--primary, #2563eb);
  font-weight: 800;
  margin-top: .45rem;
}
.update-history-detail-block {
  margin-top: .65rem;
}
.update-history-detail-block p {
  margin: 0 0 .65rem;
  color: var(--muted, #64748b);
}
@media (max-width: 640px) {
  .update-details-grid {
    grid-template-columns: 1fr !important;
  }
  .update-detail-card,
  .update-history-detail-block {
    padding: .85rem;
    border-radius: 14px;
  }
}
/* ===== end v119 ===== */
