:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #0b5d7a;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #0b5d7a;
  --primary-hover: #084960;
  --primary-soft: #e0f2fe;
  --primary-text: #0369a1;
  --success: #10b981;
  --success-soft: #d1fae5;
  --success-text: #047857;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --warning-text: #b45309;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --danger-text: #b91c1c;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  direction: rtl;
  min-height: 100vh;
}

/* ================= Top Navigation Bar ================= */
.admin-navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.25rem;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.brand-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-right: 0.5rem;
}

.user-nav-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.user-role-badge {
  background: var(--primary-soft);
  color: var(--primary-text);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.btn-nav-action {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-nav-action:hover {
  background: var(--surface-alt);
  color: var(--text-main);
}

.btn-nav-logout {
  border-color: var(--danger-soft);
  color: var(--danger-text);
  background: var(--danger-soft);
}

.btn-nav-logout:hover {
  background: var(--danger);
  color: white;
}

/* ================= Layout Structure ================= */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 65px);
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 1.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  width: 100%;
  transition: all 0.15s ease-in-out;
}

.nav-tab-btn .tab-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.nav-tab-btn:hover {
  background: var(--surface-alt);
  color: var(--text-main);
}

.nav-tab-btn.active {
  background: var(--primary-soft);
  color: var(--primary-text);
}

/* Main Content Area */
.admin-main {
  flex: 1;
  padding: 1.75rem;
  max-width: 1400px;
  margin: 0 auto;
}

.view-section {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.view-section.active {
  display: block;
}

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

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ================= Stat Cards Grid ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.stat-info h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.stat-info .stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.icon-brokers { background: #e0e7ff; color: #4338ca; }
.stat-icon.icon-packages { background: #dcfce7; color: #15803d; }
.stat-icon.icon-addons { background: #fef3c7; color: #b45309; }
.stat-icon.icon-subscribers { background: #e0f2fe; color: #0369a1; }

/* ================= Filters & Controls ================= */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.input-search, .select-filter {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface-alt);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s;
}

.input-search {
  min-width: 250px;
}

.input-search:focus, .select-filter:focus {
  border-color: var(--border-focus);
  background: #fff;
}

/* ================= Buttons ================= */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-edit {
  background: var(--primary-soft);
  color: var(--primary-text);
  border-color: rgba(3, 105, 161, 0.2);
}

.btn-edit:hover {
  background: var(--primary);
  color: white;
}

.btn-delete {
  background: var(--danger-soft);
  color: var(--danger-text);
  border-color: rgba(185, 28, 28, 0.2);
}

.btn-delete:hover {
  background: var(--danger);
  color: white;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger-text);
  border: 1px solid rgba(185, 28, 28, 0.3);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.badge-prefix {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
}

/* ================= Tables ================= */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.data-table th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-main);
}

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

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

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-carrier { background: #e0f2fe; color: #0369a1; }
.badge-tenant { background: #f1f5f9; color: #475569; }
.badge-count { background: #f3e8ff; color: #6b21a8; }
.badge-price { background: #dcfce7; color: #15803d; font-weight: 800; }

/* ================= Modals ================= */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScale 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  background: var(--surface-alt);
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  background: var(--surface-alt);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--border-focus);
  background: #fff;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ================= Toast Notification ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 280px;
  animation: toastSlide 0.25s ease-out;
}

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

.toast-success { background: #065f46; color: white; }
.toast-error { background: #991b1b; color: white; }
.toast-info { background: #075985; color: white; }

/* Responsive */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-left: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    overflow-x: auto;
    padding: 0.75rem;
  }
  .nav-tab-btn {
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
  }
  .admin-main {
    padding: 1rem;
  }
}

/* ================= WhatsApp & QR Styles ================= */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px dashed #cbd5e1;
  margin: 1rem 0;
  min-height: 280px;
}

.qr-code-img {
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  padding: 8px;
}

.qr-instructions {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.badge-ready {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

.badge-qr {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  animation: pulse-qr 2s infinite;
}

.badge-lkgs {
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 600;
}

.badge-stopped {
  background: #f1f5f9;
  color: #64748b;
}

@keyframes pulse-qr {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* ================= Phase E2 SuperAdmin Customer Wizard Styles ================= */
.modal-wizard {
  overflow: hidden;
}

.wizard-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  margin: -1.25rem -1.5rem 1.5rem -1.5rem;
}

.wizard-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 2;
  cursor: default;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.wizard-step-node.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(11, 93, 122, 0.15);
}

.wizard-step-node.active .step-label {
  color: var(--primary);
  font-weight: 700;
}

.wizard-step-node.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.wizard-step-node.completed .step-label {
  color: var(--success-text);
}

.wizard-step-connector {
  flex: 1;
  height: 3px;
  background: var(--border);
  margin: 0 0.5rem 1.25rem 0.5rem;
  transition: background 0.3s ease;
}

.wizard-step-connector.completed {
  background: var(--success);
}

.wizard-error-banner {
  background: var(--danger-soft);
  color: var(--danger-text);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Plan Cards Grid */
.plans-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.plan-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.plan-card.selected {
  border-color: var(--primary);
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(11, 93, 122, 0.15);
}

.plan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.plan-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.plan-card-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.35rem 0;
}

.plan-card-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: normal;
}

.plan-card-quotas {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.interval-pill {
  padding: 0.4rem 0.85rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.interval-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Review Table */
.wizard-review-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

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

.review-table tr {
  border-bottom: 1px solid #f1f5f9;
}

.review-table tr:last-child {
  border-bottom: none;
}

.review-table td {
  padding: 0.6rem 0;
}

.review-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 35%;
}

.review-val {
  color: var(--text-main);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .wizard-steps-indicator {
    padding: 0.75rem 0.5rem;
  }
  .step-label {
    display: none;
  }
  .plans-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= Step 5: Customer Requests & Provisioning Styles ================= */
.requests-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.filter-status-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.filter-tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.filter-tab-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.filter-tab-btn.active {
  background: var(--primary, #0284c7);
  color: #ffffff;
  border-color: var(--primary, #0284c7);
}

.search-box {
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.search-box input {
  width: 100%;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text-main);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary, #0284c7);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* Request Status Badges */
.badge-req-new {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-req-contacted {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.badge-req-negotiating {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-req-approved {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-req-trial {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.badge-req-rejected {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

/* Direct Action Buttons */
.btn-xs {
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-wa-direct {
  background: #25d366;
  color: #ffffff;
  border: 1px solid #22c55e;
  font-weight: 700;
  text-decoration: none;
}

.btn-wa-direct:hover {
  background: #16a34a;
  color: #ffffff;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid #f87171;
  color: #dc2626;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

/* Provisioning Mode Switcher */
.mode-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.mode-toggle-btn:hover {
  background: #f1f5f9;
}

.mode-toggle-btn.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 1px #0284c7;
}

.wizard-section-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.wizard-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
}

/* ================= Phase 2A: Owners & Main Lines Master Data UI ================= */
.badge-owner {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

.badge-system {
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 600;
}

.badge-package {
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
  border: 1px solid #bbf7d0;
}

.badge-active {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

.badge-inactive {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
}

.badge-closed {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
}

.btn-replace {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.btn-replace:hover {
  background: #dcfce7;
  color: #15803d;
}

.btn-close-line {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}

.btn-close-line:hover {
  background: #ffedd5;
  color: #9a3412;
}

.detail-kpi-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
}

.detail-kpi-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.25rem;
}

.detail-kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ================= Phase 2B: SuperAdmin Excel Import Wizard ================= */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--border);
  z-index: 1;
  transform: translateY(-50%);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  cursor: default;
}

.wizard-step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.wizard-step.active .wizard-step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.wizard-step.completed .wizard-step-circle {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.wizard-step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.wizard-step.active .wizard-step-label {
  color: var(--primary);
  font-weight: 700;
}

.wizard-step.completed .wizard-step-label {
  color: #059669;
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.entity-option-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.entity-option-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.entity-option-card.selected {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.entity-option-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.entity-option-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
}

.entity-option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--surface-alt);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.strategy-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.strategy-card:hover {
  border-color: #93c5fd;
}

.strategy-card.selected {
  border-color: var(--primary);
  background: #eff6ff;
}

.strategy-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--text-heading);
}

.strategy-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ================= Phase 1B Command Center Styles ================= */
.dashboard-quick-actions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.quick-actions-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.quick-actions-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 1;
}

.btn-quick-action {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease-in-out;
  font-family: inherit;
}

.btn-quick-action:hover {
  background: var(--primary-soft);
  color: var(--primary-text);
  border-color: rgba(3, 105, 161, 0.3);
  transform: translateY(-1px);
}

.dashboard-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.alert-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeIn 0.2s ease-in-out;
}

.alert-card-item.alert-warning {
  background: #fefce8;
  border-color: #fef08a;
  color: #854d0e;
}

.alert-card-item.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-card-item.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.alert-card-item.alert-purple {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}

.alert-card-item.alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.alert-card-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.alert-card-icon {
  font-size: 1.2rem;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

.stats-grid-8 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Admin Users Module (Phase P0) */
.badge-role-admin {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  border: 1px solid #fde68a;
}

.badge-role-tenant {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  border: 1px solid #bae6fd;
}

.badge-role-broker {
  background: #fef9c3;
  color: #854d0e;
  font-weight: 600;
  border: 1px solid #fef08a;
}

.modal-notice-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.4;
}




