/* ============================================================
   AstroNagendra Partner System — Shared Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Tiro+Devanagari+Hindi:ital@0;1&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --gold:      #c9932a;
  --gold2:     #e8b84b;
  --gold3:     #f5d78e;
  --saffron:   #d4601a;
  --green:     #22c55e;
  --green2:    #16a34a;
  --red:       #ef4444;
  --blue:      #3b82f6;
  --violet:    #7c3aed;

  --ink:       #0d0a04;
  --ink2:      #140f06;
  --surface:   #1c1508;
  --surface2:  #251d0c;
  --card:      #2a2010;
  --card2:     #342810;
  --border:    rgba(201,147,42,0.2);
  --border2:   rgba(201,147,42,0.12);

  --text:      #f0e8d0;
  --text2:     #c8b88a;
  --text3:     #7a6a4a;

  --radius:    14px;
  --radius-lg: 20px;
  --shadow:    0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
.cinzel    { font-family: 'Cinzel', serif; }
.hindi     { font-family: 'Tiro Devanagari Hindi', serif; }

h1, h2, h3 { font-family: 'Cinzel', serif; line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

.eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.sec-title { color: var(--gold2); }
em { color: var(--gold3); font-style: normal; }

.gold-line {
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--saffron));
  margin: 14px auto 20px;
  border-radius: 2px;
}

/* ── LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 80px 20px; }
.section.compact { padding: 50px 20px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 10, 4, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold3);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand .sub {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text3);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: 50px;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--saffron));
  color: var(--ink);
  box-shadow: 0 4px 20px rgba(201,147,42,0.3);
}

.btn-primary:hover { box-shadow: 0 8px 28px rgba(201,147,42,0.4); }

.btn-green {
  background: linear-gradient(135deg, var(--green), var(--green2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(34,197,94,0.25);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}

.btn-outline:hover { border-color: var(--gold); color: var(--gold3); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  font-size: 0.78rem;
}

.btn-sm { padding: 7px 16px; font-size: 0.72rem; }
.btn-lg { padding: 14px 36px; font-size: 0.95rem; }
.btn-full { width: 100%; }

.btn-wa {
  background: #25d366;
  color: #fff;
}

.btn-wa:hover { background: #1ea952; }

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201,147,42,0.15);
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border2);
}

/* ── STAT WIDGETS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.stat-box {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
}

.stat-val {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold2);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 0.68rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
}

.badge-pending  { background: rgba(234,179,8,0.15);  color: #eab308; border: 1px solid rgba(234,179,8,0.3); }
.badge-active   { background: rgba(34,197,94,0.12);  color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-rejected { background: rgba(239,68,68,0.12);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.badge-inactive { background: rgba(107,114,128,0.15);color: #9ca3af; border: 1px solid rgba(107,114,128,0.3); }
.badge-affiliate   { background: rgba(201,147,42,0.1);  color: var(--gold3); border: 1px solid var(--border); }
.badge-consultant  { background: rgba(124,61,181,0.12); color: #c084fc;     border: 1px solid rgba(124,61,181,0.3); }
.badge-paid     { background: rgba(34,197,94,0.12);  color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-due      { background: rgba(234,179,8,0.15);  color: #eab308; border: 1px solid rgba(234,179,8,0.3); }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-group label span { color: #ef4444; margin-left: 2px; }

.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus { border-color: var(--gold); }
.form-control::placeholder { color: var(--text3); }

select.form-control { cursor: pointer; }
select.form-control option { background: var(--card); color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"] { margin-top: 3px; accent-color: var(--gold); }

.form-check-text {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
}

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

.data-table thead tr {
  background: var(--surface2);
}

.data-table th {
  padding: 10px 14px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  font-size: 0.84rem;
  color: var(--text2);
  border-bottom: 1px solid rgba(201,147,42,0.06);
  vertical-align: middle;
}

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

.data-table tr:hover td { background: rgba(201,147,42,0.03); }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--surface2);
  border-radius: 50px;
  border: 1px solid var(--border2);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 50px;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text3);
  transition: all 0.2s;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--saffron));
  color: var(--ink);
  font-weight: 700;
}

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

/* ── TOAST / ALERTS ── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 0.82rem;
  color: var(--text);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.84rem;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.3);  color: #4ade80; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }
.alert-info    { background: rgba(201,147,42,0.08);border: 1px solid var(--border);         color: var(--gold3); }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ── LOADING ── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,10,4,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

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

.empty-state .icon { font-size: 3rem; margin-bottom: 14px; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; color: var(--text2); margin-bottom: 8px; }
.empty-state p { font-size: 0.84rem; }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 24px 0;
}

/* ── FOOTER ── */
.footer {
  background: var(--ink2);
  border-top: 1px solid var(--border2);
  padding: 32px 24px;
  text-align: center;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--text3);
  line-height: 1.8;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.4s ease both; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 52px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .tabs { gap: 2px; }
  .tab-btn { padding: 7px 12px; font-size: 0.65rem; }
  .navbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-lg { padding: 12px 24px; font-size: 0.85rem; }
}

/* ── UTILS ── */
.text-center { text-align: center; }
.text-gold   { color: var(--gold3); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text3); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.fw-bold { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
