/* =========================================================
   Social Promotion Objective Company (SPO) - Master CSS
   Theme: Deep Corporate Navy + Crisp White Cards
   ========================================================= */

:root {
  --bg-dark: #0a0f1d;
  --bg-subnav: #0f172a;
  --primary-blue: #1d4ed8;
  --primary-hover: #1e40af;
  --accent-cyan: #38bdf8;
  --surface-white: #ffffff;
  --bg-canvas: #f8fafc;
  --border-color: #e2e8f0;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  
  --status-paid-bg: #dcfce7;
  --status-paid-text: #15803d;
  --status-pending-bg: #fef3c7;
  --status-pending-text: #b45309;
  --status-overdue-bg: #fee2e2;
  --status-overdue-text: #b91c1c;
  --status-upcoming-bg: #dbeafe;
  --status-upcoming-text: #1d4ed8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Navbar */
.navbar, .dash-navbar {
  background-color: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container, .dash-nav-container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-logo i {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: 0.2s;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.dash-user-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-blue));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-large {
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 0.8rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

/* Action Buttons inside Tables */
.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.btn-action-view { background: #eff6ff; color: #1d4ed8; }
.btn-action-edit { background: #fef3c7; color: #b45309; }
.btn-action-delete { background: #fee2e2; color: #dc2626; }
.btn-action:hover { opacity: 0.85; }

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #172554 100%);
  color: #ffffff;
  padding: 5.5rem 1.5rem 6.5rem;
  text-align: center;
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: 2.7rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  letter-spacing: -0.5px;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Features Cards */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--surface-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.card-icon {
  width: 50px;
  height: 50px;
  background-color: #eff6ff;
  color: var(--primary-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Admin Tabs Navigation */
.admin-tab-nav {
  background-color: var(--bg-subnav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 57px;
  z-index: 90;
}

.admin-tab-container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: #94a3b8;
  padding: 0.85rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
  white-space: nowrap;
}

.tab-btn:hover { color: #ffffff; }
.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Dashboard Body & Containers */
.dash-main-container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.welcome-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.welcome-section h1 {
  font-size: 1.7rem;
  font-weight: 800;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.metric-card {
  background: var(--surface-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.metric-icon.blue { background: #eff6ff; color: #1d4ed8; }
.metric-icon.purple { background: #faf5ff; color: #7e22ce; }
.metric-icon.green { background: #f0fdf4; color: #15803d; }
.metric-icon.amber { background: #fffbeb; color: #b45309; }
.metric-icon.slate { background: #f8fafc; color: #334155; }
.metric-icon.red { background: #fee2e2; color: #dc2626; }

.metric-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-top: 0.1rem;
}

/* Next Installment Box */
.next-installment-card {
  background: linear-gradient(135deg, #0a0f1d 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 1.8rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.next-inst-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.next-installment-card.is-overdue {
  background: linear-gradient(135deg, #450a0a 0%, #991b1b 100%);
}

.next-installment-card.is-overdue .next-inst-badge {
  background: rgba(254, 202, 202, 0.2);
  color: #fca5a5;
  border-color: #f87171;
}

.next-inst-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
}

/* Progress Bar */
.progress-section {
  padding: 1.3rem 1.6rem;
  margin-bottom: 1.8rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background-color: #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8, #38bdf8);
  border-radius: 20px;
  transition: width 0.6s ease;
}

/* Details & Tables */
.section-margin {
  margin-bottom: 1.8rem;
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.2rem;
}

.card-header-bar h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1.5px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

.text-center { text-align: center; }

/* Status Badges */
.badge-status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-paid { background: var(--status-paid-bg); color: var(--status-paid-text); }
.badge-pending { background: var(--status-pending-bg); color: var(--status-pending-text); }
.badge-upcoming { background: var(--status-upcoming-bg); color: var(--status-upcoming-text); }
.badge-overdue { background: var(--status-overdue-bg); color: var(--status-overdue-text); }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 15, 29, 0.75);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-overlay.active { display: flex; }

.modal-box {
  background-color: var(--surface-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 2.2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wide { max-width: 620px; }

.close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.modal-logo {
  width: 48px;
  height: 48px;
  background-color: #eff6ff;
  color: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 0.8rem;
}

.input-group {
  margin-bottom: 1.1rem;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}

.input-wrapper input,
.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  outline: none;
}

.input-wrapper input { padding-left: 2.6rem; }

.input-wrapper input:focus,
.input-group input:focus,
.input-group select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.calculation-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.error-msg {
  color: var(--status-overdue-text);
  font-size: 0.85rem;
  margin-top: 0.8rem;
  text-align: center;
  font-weight: 500;
}

.admin-search-box {
  display: flex;
  gap: 0.6rem;
}

.admin-search-box input {
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 260px;
}

/* Footer */
.footer {
  background-color: var(--bg-dark);
  color: #94a3b8;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

@media (max-width: 768px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 2.1rem; }
  .admin-search-box { width: 100%; flex-direction: column; }
  .admin-search-box input { width: 100%; }
}
/* Under Verification Badge & Approval Buttons */
.badge-verify {
  background: #ede9fe;
  color: #6d28d9;
}

.btn-action-approve {
  background-color: #dcfce7;
  color: #15803d;
}
.btn-action-approve:hover {
  background-color: #bbf7d0;
}

.btn-action-reject {
  background-color: #fee2e2;
  color: #b91c1c;
}
.btn-action-reject:hover {
  background-color: #fecaca;
}

.pay-mode-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.mode-btn {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.2s;
}

.mode-btn.active {
  border-color: #1d4ed8;
  background: #eff6ff;
  color: #1d4ed8;
}

.upi-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  text-align: left;
}