/* ==========================================================================
   SHUBHUM KURU (SOMA) PARTNERS — Design System
   Exact Color Palette & Typography Match with soma.css
   Palette Tokens: #757575, #4B4752, #282829, #FFFCC6, #2D2D2E, #FBFBF9, #FFFFFF
   Typography: 'IBM Plex Serif', 'Noto Sans Devanagari', serif
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  /* Exact User Palette from soma.css: #757575, #4B4752, #282829, #FFFCC6, #2D2D2E */
  --ink: #282829;
  --ink-soft: #4B4752;
  --ivory: #FBFBF9;
  --beige: #F5F4EE;
  --beige-deep: #EDECE4;
  --white: #FFFFFF;
  --surface-dark: #2D2D2E;
  --surface-deep: #282829;

  --terracotta: #282829;
  --terracotta-deep: #1D1D1E;
  --terracotta-soft: #FFFCC6;
  --terracotta-glow: #FFFCC6;

  --rose-vibrant: #4B4752;
  --rose-soft: #757575;
  --rose-blush: #FFFCC6;
  --rose-mist: #EDECE4;
  --rose-light: #FBFBF9;

  --sage: #4B4752;
  --sage-deep: #282829;
  --sage-soft: #FFFCC6;

  --gold: #4B4752;
  --gold-soft: #FFFCC6;
  --muted: #757575;
  --line: #4B4752;
  --line-soft: #ECEBE9;

  /* Semantic Aliases ensuring 100% theme consistency */
  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-muted: var(--muted);
  --bg-body: var(--ivory);
  --bg-surface: var(--white);
  --bg-card: var(--white);
  --bg-subtle: var(--beige);
  --bg-input: var(--white);
  --border-subtle: var(--line-soft);
  --border-card: var(--line-soft);
  --border-gold: var(--line);
  --border-input: #dcdad5;
  --gold-primary: var(--ink);
  --gold-light: var(--ink-soft);
  --gold-glow: rgba(255, 252, 198, 0.45);
  --font-serif: 'IBM Plex Serif', 'Noto Sans Devanagari', serif;
  --font-sans: 'IBM Plex Serif', 'Noto Sans Devanagari', serif;

  --success: #2e7d32;
  --success-bg: rgba(46, 125, 50, 0.10);
  --danger: #c62828;
  --danger-bg: rgba(198, 40, 40, 0.10);

  /* Fonts — 100% Unified with soma.css */
  --font-display: 'IBM Plex Serif', 'Noto Sans Devanagari', serif;
  --font-body: 'IBM Plex Serif', 'Noto Sans Devanagari', serif;
  --font-mono: 'IBM Plex Serif', 'Noto Sans Devanagari', serif;

  /* Radii */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(40, 40, 41, 0.05), 0 2px 8px rgba(75, 71, 82, 0.04);
  --shadow-md: 0 4px 12px rgba(40, 40, 41, 0.08), 0 12px 28px rgba(75, 71, 82, 0.06);
  --shadow-lg: 0 8px 24px rgba(40, 40, 41, 0.12), 0 28px 56px rgba(75, 71, 82, 0.10);
}

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

body {
  background-color: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle atmospheric mesh background matching app-shell */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 252, 198, 0.35), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(75, 71, 82, 0.06), transparent 60%),
    radial-gradient(600px 300px at 50% 120%, rgba(255, 252, 198, 0.20), transparent 70%);
  background-image:
    linear-gradient(rgba(75, 71, 82, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 71, 82, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Navigation Header (Exact soma.css match) ──────────────── */
.site-header {
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #675E81 0%, #58475a 50%, #71678a 100%) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 4px 20px rgba(40, 40, 41, 0.20) !important;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-om {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 30% 30%, #4B4752, #282829 80%);
  color: #FFFCC6;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 20px rgba(75, 71, 82, 0.4);
  border: 1px solid rgba(255, 252, 198, 0.4);
}

.brand-info h1 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  line-height: 1.1;
}

.brand-info span {
  font-size: 11px;
  color: #FFFCC6;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Container ────────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  flex: 1;
}

/* ── Hero Headers ─────────────────────────────────────────────── */
.form-hero {
  text-align: center;
  margin-bottom: 36px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: #282829;
  color: #FFFCC6;
  border: 1px solid #4B4752;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.form-hero h2 {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--ink);
  margin-bottom: 10px;
  font-weight: 600;
}

.form-hero p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Cards & Surfaces ─────────────────────────────────────────── */
.app-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.form-section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}

.form-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #282829;
  border: 1px solid #4B4752;
  color: #FFFCC6;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

/* ── Grids & Inputs ───────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.col-span-2 {
  grid-column: span 2;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
}

.req-star {
  color: var(--ink);
}

.input-control,
.select-control,
.textarea-control {
  width: 100%;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1.5px solid #dcdad5;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.input-control:focus,
.select-control:focus,
.textarea-control:focus {
  outline: none;
  border-color: #4B4752;
  box-shadow: 0 0 0 3px rgba(75, 71, 82, 0.15);
}

.input-control::placeholder,
.textarea-control::placeholder {
  color: var(--muted);
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button .input-control {
  flex: 1;
}

/* ── Radio Group (Influencer vs Astrologer) ─────────────────────── */
.type-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}

.type-radio-card {
  position: relative;
  background: var(--beige);
  border: 1.5px solid #dcdad5;
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.type-radio-card input {
  position: absolute;
  opacity: 0;
}

.type-radio-card:hover {
  border-color: var(--ink-soft);
}

.type-radio-card.selected {
  border-color: #282829;
  background: #282829;
  color: #FFFCC6;
}

.type-radio-card.selected .type-name {
  color: #FFFCC6;
}

.type-radio-card.selected .type-desc {
  color: #dcdad5;
}

.type-radio-card .type-icon {
  font-size: 26px;
}

.type-radio-card .type-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.type-radio-card .type-desc {
  font-size: 12px;
  color: var(--muted);
}

/* ── Buttons (Exact soma.css match) ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: #282829 !important;
  color: #FFFCC6 !important;
  box-shadow: 0 4px 18px rgba(40, 40, 41, 0.25);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  background: #4B4752 !important;
  color: #FFFCC6 !important;
  box-shadow: 0 6px 26px rgba(75, 71, 82, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  border: 1.5px solid var(--ink-soft);
  color: var(--ink);
}

.btn-secondary:hover {
  background: #282829;
  color: #FFFCC6;
  border-color: #282829;
}

.btn-otp {
  padding: 0 16px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  background: #282829;
  border: 1px solid #4B4752;
  color: #FFFCC6;
  cursor: pointer;
}

.btn-otp:hover:not(:disabled) {
  background: #4B4752;
}

.btn-otp:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-submit-large {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  margin-top: 12px;
}

/* ── OTP Verification Panel ───────────────────────────────────── */
.otp-panel {
  display: none;
  background: var(--beige);
  border: 1.5px dashed #4B4752;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 10px;
}

.otp-box {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: #ffffff;
  border: 1.5px solid #4B4752;
  border-radius: var(--radius-sm);
  color: #282829;
}

/* ── Alerts ───────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.alert-success {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #1b5e20;
}

.alert-danger {
  background: #ffebee;
  border: 1px solid #e57373;
  color: #b71c1c;
}

/* ── Success Screen ───────────────────────────────────────────── */
.success-card {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: var(--radius-full);
  background: #282829;
  color: #FFFCC6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 18px rgba(40, 40, 41, 0.25);
}

/* ── Tables ───────────────────────────────────────────────────── */
table.custom-table,
table.partner-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.custom-table th,
table.partner-grid-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--muted);
  border-bottom: 1.5px solid var(--line-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

table.custom-table td,
table.partner-grid-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  vertical-align: middle;
}

table.custom-table tr:hover td,
table.partner-grid-table tr:hover td {
  background: var(--beige);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pill.pending,
.status-pill.pending_approval,
.status-pill.pending_clearance {
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
}

.status-pill.active,
.status-pill.available,
.status-pill.paid,
.status-pill.completed {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.status-pill.rejected,
.status-pill.suspended,
.status-pill.cancelled,
.status-pill.failed {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* ── Dashboard Sidebar Navigation Layout ──────────────────────── */
.dash-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  background-color: var(--ivory);
}

.dash-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #282829 0%, #1e1e1f 100%);
  color: #FFFFFF;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 99;
  transition: transform 0.25s ease;
}

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

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

.sidebar-brand .brand-om {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.sidebar-brand h2 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

.sidebar-brand span {
  font-size: 10px;
  color: #FFFCC6;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.sidebar-profile-card {
  margin: 16px 16px 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.sidebar-profile-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-profile-role {
  font-size: 11px;
  color: #FFFCC6;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-nav {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-nav-title {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding: 12px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s ease;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.sidebar-link.active {
  background: rgba(255, 252, 198, 0.14);
  color: #FFFCC6;
  font-weight: 600;
}

.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #FFFCC6;
  border-radius: 0 4px 4px 0;
}

.sidebar-link .link-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-link .link-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  background: #FFFCC6;
  color: #282829;
}

.sidebar-footer {
  padding: 16px 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 4px rgba(40, 40, 41, 0.03);
}

.dash-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line-soft);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
}

.dash-content {
  padding: 28px 32px 60px;
  flex: 1;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 960px) {
  .sidebar-toggle-btn {
    display: inline-flex;
  }

  .dash-sidebar {
    position: fixed;
    left: -270px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }

  .dash-sidebar.open {
    transform: translateX(270px);
  }

  .dash-content {
    padding: 20px 16px 40px;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 14px 18px;
  }

  .app-card {
    padding: 22px 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.col-span-2 {
    grid-column: span 1;
  }

  .type-radio-group {
    grid-template-columns: 1fr;
  }
}

/* ── OTP Verification Modal on Submit ──────────────────────────── */
.soma-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 40, 41, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  animation: modalFadeIn 0.25s ease-out;
}

.soma-modal-card {
  background: var(--surface);
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  padding: 36px 32px 30px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  position: relative;
  transform: translateY(0);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-x {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close-x:hover {
  color: var(--ink);
}

.modal-badge-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
  box-shadow: 0 4px 14px rgba(40, 40, 41, 0.2);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 22px;
}

.modal-otp-input {
  width: 220px;
  max-width: 100%;
  height: 52px;
  font-size: 26px;
  letter-spacing: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: center;
  margin: 0 auto 16px;
  display: block;
  background: var(--beige);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-otp-input:focus {
  border-color: var(--ink);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(40, 40, 41, 0.08);
}

.modal-status-msg {
  font-size: 12px;
  margin-bottom: 16px;
  min-height: 18px;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.btn-link-resend {
  background: none;
  border: none;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-size: 12px;
}

.btn-link-resend:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}