/* Ayuzaa Admin Dashboard & Auth Stylesheet - Razorpay Fintech Light Edition */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --primary: #0d7a5f;
  --primary-hover: #095945;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --navy: #0c2340;
  --accent: #e8a825;
  
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --success-border: #a7f3d0;
  
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --warning-border: #fde68a;
  
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --danger-border: #fecaca;
  
  --info: #2563eb;
  --info-bg: #eff6ff;
  --info-text: #1e40af;
  --info-border: #bfdbfe;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-dropdown: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.15s ease-in-out;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ============================================================
   ADMIN AUTH / LOGIN PAGE (EXECUTIVE MINIMALIST REDESIGN)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #f8faf9;
}

.auth-split-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Brand Panel (Desktop Landscape) */
.auth-brand-panel {
  flex: 0 0 44%;
  background: linear-gradient(155deg, #093c2f 0%, #06221a 100%);
  color: #ffffff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  top: -15%;
  right: -15%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 168, 37, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.brand-panel-header img {
  height: 42px;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.brand-panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.brand-panel-content h2 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.brand-panel-content p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 32px;
}

.brand-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
}

.brand-feature-item i {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.brand-panel-footer {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-panel-footer i {
  color: #10b981;
}

/* Right Form Panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 32px;
  background: #ffffff;
  position: relative;
}

.auth-form-top-link {
  position: absolute;
  top: 32px;
  right: 36px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.auth-form-top-link:hover {
  color: var(--primary);
}

.auth-card-clean {
  width: 100%;
  max-width: 380px;
}

.mobile-brand-header {
  display: none;
  text-align: center;
  margin-bottom: 24px;
}

.mobile-brand-header img {
  height: 38px;
  margin-bottom: 10px;
}

.auth-title-group {
  margin-bottom: 28px;
}

.auth-title-group h1 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.auth-title-group p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.form-group-clean {
  margin-bottom: 18px;
}

.form-group-clean label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

.form-input-clean {
  width: 100%;
  height: 46px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input-clean:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 122, 95, 0.12);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 42px;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}

.toggle-password-btn:hover {
  color: var(--primary);
}

.auth-btn-solid {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

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

.auth-btn-solid:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-alert-clean {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 18px;
  display: none;
  line-height: 1.45;
}

.auth-alert-clean.show {
  display: block;
}

.auth-alert-clean.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-alert-clean.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.auth-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
}

.auth-extra-row a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-extra-row a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.setup-toggle-text {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

.setup-toggle-text button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: 12px;
}

@media (max-width: 991px) {
  .auth-split-container {
    flex-direction: column;
  }
  .auth-brand-panel {
    display: none;
  }
  .auth-form-panel {
    background: #f8faf9;
    padding: 32px 16px;
    min-height: 100vh;
  }
  .auth-form-top-link {
    top: 20px;
    right: 20px;
  }
  .auth-card-clean {
    background: #ffffff;
    padding: 32px 24px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  }
  .mobile-brand-header {
    display: block;
  }
}

/* ============================================================
   RAZORPAY FINTECH LIGHT DASHBOARD LAYOUT
   ============================================================ */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-app);
}

/* SIDEBAR (Light Fintech Style) */
.admin-sidebar {
  width: 250px;
  background: #ffffff;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  border-right: 1px solid var(--border-color);
  transition: var(--transition);
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-brand img {
  height: 32px;
  object-fit: contain;
}

.sidebar-brand-text h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.sidebar-brand-text span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  font-weight: 700;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  font-weight: 700;
  margin: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
  border: none;
  width: 100%;
  background: transparent;
  text-align: left;
}

.nav-item i {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: var(--text-light);
  transition: color 0.15s;
}

.nav-item:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.nav-item:hover i {
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active i {
  color: var(--primary);
}

.nav-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.nav-item.active .nav-badge {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  background: #fafbfc;
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.admin-user-info {
  flex: 1;
  overflow: hidden;
}

.admin-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-role {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.logout-icon-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  background: #ffffff;
  transition: var(--transition);
}

.logout-icon-btn:hover {
  color: var(--danger);
  border-color: #fca5a5;
  background: #fef2f2;
}

/* MAIN CONTENT */
.admin-main {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-app);
}

/* TOP NAVBAR (Clean Fintech Style) */
.admin-topbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.mobile-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-breadcrumb span.crumb-root {
  font-weight: 600;
  color: #64748b;
}

.topbar-breadcrumb span.crumb-sep {
  color: #cbd5e1;
}

.topbar-breadcrumb span.crumb-active {
  font-weight: 700;
  color: #0f172a;
}

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

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--success-bg);
  color: var(--success-text);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--success-border);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.topbar-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.admin-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

.user-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-email-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.role-pill-sm {
  font-size: 9px;
  letter-spacing: 0.6px;
  font-weight: 800;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.quick-action-card {
  background: #ffffff;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.quick-action-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quick-action-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-action-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

/* CONTENT CONTAINER */
.admin-content {
  padding: 24px;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* ============================================================
   KPI METRIC CARDS (Razorpay Minimalist Light Style)
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.kpi-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.kpi-icon.revenue { background: #ecfdf5; color: #0d7a5f; }
.kpi-icon.orders { background: #eff6ff; color: #2563eb; }
.kpi-icon.users { background: #ede9fe; color: #7c3aed; }
.kpi-icon.bottles { background: #fef8eb; color: #b45309; }
.kpi-icon.cancelled { background: #fef2f2; color: #dc2626; }
.kpi-icon.failed { background: #fffbeb; color: #d97706; }

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  line-height: 1.1;
  margin: 6px 0 4px;
}

.kpi-trend {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
}

.kpi-trend.up { color: #16a34a; }

/* ============================================================
   PANELS & DATA TABLES (Razorpay Style)
   ============================================================ */
.panel {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  overflow: hidden;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title h3 {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-main);
}

.panel-title p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 220px;
}

.search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 122, 95, 0.12);
}

/* Horizontal Sub-tabs (Razorpay style) */
.table-tabs-row {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  padding: 0 16px;
  overflow-x: auto;
}

.table-tab {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.table-tab:hover {
  color: var(--text-main);
}

.table-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

/* TABLE STYLING */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: #f8fafc;
  padding: 11px 16px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: #1e293b;
}

.admin-table tbody tr {
  transition: background-color 0.15s;
}

.admin-table tbody tr:hover {
  background-color: #fafbfc;
}

.order-code {
  font-weight: 700;
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
}

.customer-cell {
  display: flex;
  flex-direction: column;
}

.customer-name {
  font-weight: 650;
  color: var(--text-main);
}

.customer-phone {
  font-size: 12px;
  color: var(--text-muted);
}

.product-pill {
  display: inline-block;
  font-weight: 600;
  color: var(--text-main);
}

.product-qty {
  font-size: 11px;
  color: var(--text-muted);
}

.price-tag {
  font-weight: 750;
  color: var(--text-main);
  font-size: 13px;
}

/* STATUS BADGES (Fintech Pastel Style) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.paid {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.status-badge.processing {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.status-badge.shipped {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-badge.delivered {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-badge.cancelled {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.status-badge.failed {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

/* ACTIONS IN TABLE */
.table-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.action-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: #cbd5e1;
}

.action-btn.whatsapp {
  color: #16a34a;
}
.action-btn.whatsapp:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.action-btn.invoice {
  color: #4338ca;
}
.action-btn.invoice:hover {
  background: #e0e7ff;
  border-color: #c7d2fe;
}

.action-btn.delete {
  color: var(--danger);
}
.action-btn.delete:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.btn-recover-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #16a34a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-recover-wa:hover {
  background: #15803d;
  color: #ffffff;
}

.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-role.super-admin {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.badge-role.customer {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.cancel-reason-tag {
  display: inline-block;
  font-size: 11px;
  color: #991b1b;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 4px;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 36px;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.empty-state h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 12px;
  max-width: 320px;
  margin: 0 auto;
}

/* ============================================================
   MODALS (Order Details, Tax Invoice)
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: modalPop 0.15s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 750;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

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

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #fafbfc;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.order-detail-box {
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.order-detail-box h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}

.order-detail-box p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.status-change-group {
  margin-top: 14px;
  padding: 14px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

.status-change-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.status-select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
}

.status-select:focus {
  border-color: var(--primary);
}

/* ============================================================
   TAX INVOICE TEMPLATE (GST Compliant)
   ============================================================ */
.invoice-modal-card {
  max-width: 780px;
}

.tax-invoice-container {
  background: #ffffff;
  padding: 24px;
  color: #111111;
  font-family: var(--font-sans);
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.invoice-brand h2 {
  font-size: 22px;
  font-weight: 900;
  color: #0c2340;
  letter-spacing: -0.3px;
}

.invoice-brand p {
  font-size: 11px;
  color: #555555;
  margin-top: 2px;
}

.invoice-badge-title {
  text-align: right;
}

.invoice-badge-title h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.invoice-party-box {
  background: #f9fafb;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.invoice-party-box h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 800;
  margin-bottom: 4px;
}

.invoice-party-box p {
  font-size: 12px;
  color: #111111;
  line-height: 1.45;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.invoice-items-table th {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #374151;
  text-align: left;
}

.invoice-items-table td {
  border: 1px solid #e5e7eb;
  padding: 10px;
  font-size: 12px;
}

.invoice-totals {
  width: 280px;
  margin-left: auto;
  border-collapse: collapse;
}

.invoice-totals td {
  padding: 4px 8px;
  font-size: 12px;
}

.invoice-totals tr.grand-total {
  font-size: 14px;
  font-weight: 800;
  color: #0c2340;
  border-top: 1.5px solid #111111;
}

.invoice-footer {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px dashed #d1d5db;
  text-align: center;
  font-size: 11px;
  color: #6b7280;
}

/* ============================================================
   SECURITY BARRIER SCREEN
   ============================================================ */
#securityBarrier {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #0f172a;
  text-align: center;
}

.barrier-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 36px 28px;
  box-shadow: var(--shadow-modal);
}

.barrier-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fef2f2;
  color: #dc2626;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1px solid #fecaca;
}

.barrier-box h2 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.barrier-box p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ============================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ============================================================ */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }

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

  .sidebar-close-btn {
    display: block;
  }

  .admin-main {
    margin-left: 0;
  }

  .mobile-toggle-btn {
    display: block;
  }

  .admin-topbar {
    padding: 0 16px;
  }

  .admin-content {
    padding: 16px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-actions {
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .tax-invoice-container {
    padding: 14px;
  }

  .invoice-header {
    flex-direction: column;
    gap: 8px;
  }

  .invoice-badge-title {
    text-align: left;
  }

  .invoice-meta-grid {
    grid-template-columns: 1fr;
  }

  .invoice-totals {
    width: 100%;
  }
}

/* ============================================================
   PRINT STYLES (Invoices)
   ============================================================ */
@media print {
  body * { visibility: hidden; }
  .tax-invoice-container, .tax-invoice-container * { visibility: visible; }
  .tax-invoice-container { position: absolute; left: 0; top: 0; width: 100%; padding: 0; margin: 0; }
  .modal-overlay { background: none; position: static; }
  .modal-card { box-shadow: none; border: none; max-width: 100%; }
  .modal-header, .modal-footer { display: none !important; }
}
