/* =============================================
   DIVEROID Admin — admin.css
   ============================================= */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  font-family: inherit;
}
input,
select,
textarea {
  font-family: inherit;
}

/* ---------- Layout Shell ---------- */
.admin-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo .brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.sidebar-logo .brand-sub {
  font-size: 11px;
  color: #50a9fc;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  padding: 12px 20px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
  border-radius: 0;
  cursor: pointer;
  user-select: none;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.nav-link.active {
  background: #1e293b;
  color: #ffffff;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #50a9fc;
  border-radius: 0 2px 2px 0;
}

.nav-link .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link .nav-label {
  flex: 1;
}

.nav-link .nav-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  color: #475569;
}

.nav-link.open .nav-arrow {
  transform: rotate(90deg);
}

/* Submenu */
.nav-submenu {
  display: none;
  background: rgba(0, 0, 0, 0.2);
}

.nav-submenu.open {
  display: block;
}

.nav-submenu .nav-link {
  padding: 9px 20px 9px 50px;
  font-size: 13px;
  color: #64748b;
}

.nav-submenu .nav-link:hover,
.nav-submenu .nav-link.active {
  color: #cbd5e1;
}

.nav-submenu .nav-link.active {
  background: transparent;
  color: #ffffff;
}

.nav-submenu .nav-link.active::before {
  display: none;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #50a9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.sidebar-user-role {
  font-size: 11px;
  color: #475569;
}

.sidebar-logout {
  color: #475569;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  padding: 4px;
}

.sidebar-logout:hover {
  color: #ef4444;
}

/* ---------- Main Area ---------- */
.main-area {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

/* ---------- Top Header ---------- */
.top-header {
  height: 60px;
  min-height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}

.breadcrumb .sep {
  color: #cbd5e1;
}

.breadcrumb .current {
  color: #0f172a;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: #64748b;
  transition: background 0.15s;
}

.header-bell:hover {
  background: #f8fafc;
}

.bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid white;
}

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #50a9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Page Content ---------- */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.page-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
}

/* ---------- Cards ---------- */
.card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.card-body {
  padding: 20px;
}

/* ---------- Stat Cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-change {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.up {
  color: #10b981;
}
.stat-change.down {
  color: #ef4444;
}
.stat-change.neutral {
  color: #64748b;
}

.stat-icon {
  float: right;
  font-size: 28px;
  margin-top: -8px;
}

/* ---------- Chart Grid ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-wrapper {
  position: relative;
  height: 260px;
}

/* ---------- Tables ---------- */
.table-container {
  overflow-x: auto;
}

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

thead th {
  background: #f1f5f9;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

thead th:first-child {
  border-radius: 6px 0 0 6px;
}
thead th:last-child {
  border-radius: 0 6px 6px 0;
}

tbody td {
  padding: 12px 14px;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: #f8fafc;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background: #d1fae5;
  color: #065f46;
}
.badge-red {
  background: #fee2e2;
  color: #991b1b;
}
.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}
.badge-orange {
  background: #fef3c7;
  color: #92400e;
}
.badge-gray {
  background: #f1f5f9;
  color: #475569;
}
.badge-purple {
  background: #ede9fe;
  color: #5b21b6;
}
.badge-count {
  background: #ef4444;
  color: white;
  border-radius: 10px;
  padding: 2px 7px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  transition:
    opacity 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.88;
}

.btn-primary {
  background: #50a9fc;
  color: white;
}
.btn-secondary {
  background: white;
  border: 1px solid #e2e8f0;
  color: #374151;
}
.btn-danger {
  background: #ef4444;
  color: white;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 12px;
}

/* ---------- Inputs ---------- */
.input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-input {
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0f172a;
  background: white;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: #50a9fc;
  box-shadow: 0 0 0 3px rgba(25, 141, 250, 0.1);
}

.form-select {
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0f172a;
  background: white;
  outline: none;
  cursor: pointer;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: block;
  margin-bottom: 6px;
}

.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

/* ---------- Tabs ---------- */
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.tab-btn:hover {
  color: #0f172a;
}

.tab-btn.active {
  color: #50a9fc;
  border-bottom-color: #50a9fc;
  font-weight: 600;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ---------- Filter Tabs ---------- */
.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.filter-tab.active,
.filter-tab:hover {
  background: #50a9fc;
  color: white;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  justify-content: flex-end;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.page-btn:hover {
  background: #f1f5f9;
}
.page-btn.active {
  background: #50a9fc;
  color: white;
  border-color: #50a9fc;
}

/* ---------- Product Cards Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.product-code {
  font-size: 11px;
  font-weight: 700;
  background: #0f172a;
  color: white;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.product-specs {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* ---------- Right Drawer ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.drawer-overlay.open {
  display: block;
  opacity: 1;
}

.drawer {
  position: fixed;
  right: -420px;
  top: 0;
  bottom: 0;
  width: 400px;
  background: white;
  z-index: 201;
  transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.drawer.open {
  right: 0;
}

.drawer-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #64748b;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  margin-top: 20px;
}

.drawer-section-title:first-child {
  margin-top: 0;
}

.info-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.info-label {
  color: #64748b;
  min-width: 80px;
  font-weight: 500;
}

.info-value {
  color: #0f172a;
  font-weight: 500;
}

/* ---------- Info Banner ---------- */
.info-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13.5px;
  font-weight: 500;
}

.info-banner-blue {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.info-banner-green {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
}

.stats-row-item {
  flex: 1;
  text-align: center;
  padding: 16px;
  background: white;
  border: 1px solid #e2e8f0;
}

.stats-row-item:first-child {
  border-radius: 10px 0 0 10px;
}
.stats-row-item:last-child {
  border-radius: 0 10px 10px 0;
}
.stats-row-item + .stats-row-item {
  border-left: none;
}

.stats-row-value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.stats-row-label {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* ---------- Login Page ---------- */
.login-page {
  min-height: 100vh;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: #1e293b;
  border-radius: 16px;
  padding: 40px;
  width: 380px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .brand {
  font-size: 28px;
  font-weight: 800;
  color: white;
  letter-spacing: 2px;
}

.login-logo .sub {
  font-size: 12px;
  color: #50a9fc;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 4px;
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-form .form-label {
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.login-form .form-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
}

.login-form .form-input:focus {
  border-color: #50a9fc;
  box-shadow: 0 0 0 3px rgba(25, 141, 250, 0.15);
}

.login-form .form-input::placeholder {
  color: #475569;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: #50a9fc;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.15s;
}

.login-btn:hover {
  opacity: 0.88;
}

/* ---------- Placeholder Box ---------- */
.placeholder-box {
  height: 260px;
  border-radius: 10px;
  background: #f8fafc;
  border: 2px dashed #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
}

.placeholder-box .ph-icon {
  font-size: 36px;
}
.placeholder-box .ph-text {
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Misc ---------- */
.divider {
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
}

.mono {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12.5px;
}

.text-muted {
  color: #64748b;
}
.text-sm {
  font-size: 12.5px;
}
.fw-600 {
  font-weight: 600;
}

.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-20 {
  margin-bottom: 20px;
}

/* ── Sidebar Merchant Section ── */
.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}

.nav-merchant-section .nav-link {
  color: #93c5fd;
}

.nav-merchant-section .nav-link:hover {
  background: rgba(29, 78, 216, 0.2);
  color: #bfdbfe;
}

.nav-merchant-section .nav-link.active {
  background: #1d4ed8;
  color: white;
}

.nav-merchant-section .nav-submenu {
  background: rgba(29, 78, 216, 0.08);
}

.nav-merchant-section .nav-submenu .nav-link {
  color: #60a5fa;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: white;
  border-radius: 14px;
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: white;
  cursor: pointer;
  font-size: 16px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-body {
  padding: 20px 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── AI Draft Box ── */
.ai-draft {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  font-size: 13.5px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 12px;
}
.ai-draft-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.reply-textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0f172a;
  resize: vertical;
  min-height: 120px;
  outline: none;
}
.reply-textarea:focus {
  border-color: #50a9fc;
  box-shadow: 0 0 0 3px rgba(25, 141, 250, 0.1);
}

/* ── Demo Mode Badge ── */
.demo-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.demo-badge .role-pill {
  background: #50a9fc;
  color: white;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  text-transform: uppercase;
}

/* ── Language Toggle ── */
.lang-toggle {
  display: flex;
  gap: 2px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}
.lang-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}
.lang-btn.active {
  background: #50a9fc;
  color: white;
  box-shadow: 0 1px 3px rgba(80, 169, 252, 0.35);
}
.lang-btn:hover:not(.active) {
  color: #475569;
}

/* ── Standalone lang toggle (login pages) ── */
.lang-toggle-float {
  position: fixed;
  top: 20px;
  right: 24px;
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px;
  backdrop-filter: blur(8px);
  z-index: 100;
}
.lang-toggle-float .lang-btn {
  color: rgba(255, 255, 255, 0.6);
}
.lang-toggle-float .lang-btn.active {
  background: #50a9fc;
  color: white;
}

/* ── Merchant Site Preview Button ── */
.sidebar-merchant-preview {
  padding: 12px 16px;
  margin: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(29, 78, 216, 0.12);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  text-decoration: none;
  display: block;
}
.sidebar-merchant-preview:hover {
  background: rgba(29, 78, 216, 0.25);
}

/* ── Progress Bar ── */
.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: #50a9fc;
  transition: width 0.3s;
}

/* ── System Status Dot ── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.status-dot.green {
  background: #10b981;
  box-shadow: 0 0 0 2px #d1fae5;
}
.status-dot.red {
  background: #ef4444;
}
.status-dot.gray {
  background: #94a3b8;
}

/* ── Insight Cards ── */
.insight-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.insight-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.insight-body {
  flex: 1;
}
.insight-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}
.insight-desc {
  font-size: 12.5px;
  color: #64748b;
}

/* ── Section Header ── */
.section-header {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

/* ── Merchant Portal Sidebar ── */
.merchant-shell .sidebar {
  background: #0f2040;
}
.merchant-shell .sidebar-logo .brand-sub {
  color: #60a5fa;
}
.merchant-shell .nav-link {
  color: #93c5fd;
}
.merchant-shell .nav-link.active {
  background: #1d4ed8;
}

/* ── Additional Grid Utilities ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.grid-65-35 {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 16px;
}
.mb-24 {
  margin-bottom: 24px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.text-right {
  text-align: right;
}
/* =============================================
   Phase 3 — Loading Skeleton & Error States
   ============================================= */

/* Skeleton shimmer animation */
@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }
  100% {
    background-position: 600px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
  display: inline-block;
}

/* Skeleton presets */
.skeleton-text {
  height: 14px;
  width: 80%;
}
.skeleton-title {
  height: 28px;
  width: 60%;
}
.skeleton-value {
  height: 36px;
  width: 90px;
}
.skeleton-badge {
  height: 20px;
  width: 52px;
  border-radius: 20px;
}
.skeleton-row {
  height: 44px;
  width: 100%;
  margin-bottom: 2px;
  border-radius: 0;
}
.skeleton-chart {
  height: 220px;
  width: 100%;
  border-radius: 8px;
}

/* Full stat-card skeleton */
.stat-card.loading .stat-value,
.stat-card.loading .stat-change,
.stat-card.loading .stat-label {
  color: transparent !important;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 4px;
  pointer-events: none;
}

/* Error state banner */
.api-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  color: #991b1b;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.api-error-banner .error-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.api-error-banner .error-retry {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
}

/* Demo / dev mode banner */
.api-dev-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 16px;
  color: #92400e;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* ──────────────────────────────────────── */

.w-full {
  width: 100%;
}
