/* ============================================================
   Borderless Bird Dog Portal — styles.css
   Dark Navy + Gold theme. Mobile-first responsive.
   ============================================================ */

:root {
  --bg-base:       #070B14;
  --bg-card:       #0F1623;
  --bg-card-hover: #141D2E;
  --bg-input:      #0A0F1C;
  --border:        #1C2740;
  --border-light:  #243352;
  --gold:          #D4A017;
  --gold-bright:   #F0B429;
  --gold-dim:      #7A5C0B;
  --gold-bg:       rgba(212, 160, 23, 0.08);
  --text:          #E2E8F0;
  --text-muted:    #64748B;
  --text-dim:      #475569;
  --green:         #10B981;
  --green-bg:      rgba(16, 185, 129, 0.10);
  --red:           #EF4444;
  --red-bg:        rgba(239, 68, 68, 0.10);
  --amber:         #F59E0B;
  --blue:          #3B82F6;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card:   0 2px 12px rgba(0, 0, 0, 0.3);
  --transition:    all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ============ HEADER ============ */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #070B14;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text);
  text-transform: uppercase;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid var(--gold-dim);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============ SCREENS ============ */
.screen {
  display: none;
  min-height: calc(100vh - 64px);
}
.screen.active { display: block; }

/* ============ AUTH SCREENS ============ */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: calc(100vh - 64px);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.auth-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 20px;
}

.auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card p {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.7;
}

.auth-card a {
  color: var(--gold);
  text-decoration: none;
}
.auth-card a:hover { color: var(--gold-bright); text-decoration: underline; }

/* ============ FORMS ============ */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}

.field input, .field textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.field input:focus, .field textarea:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.12);
}

.field input::placeholder {
  color: var(--text-dim);
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #070B14;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 160, 23, 0.25);
}

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--bg-card-hover);
}

.btn-gold-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--gold-bg);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-gold-outline:hover {
  background: rgba(212, 160, 23, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

/* ============ LOADING SCREEN ============ */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-wrap p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============ DASHBOARD ============ */
.dashboard {
  padding: 32px 20px 80px;
}

/* Greeting bar */
.greeting-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.greeting-left h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.greeting-left p {
  font-size: 13px;
  color: var(--text-muted);
}

.greeting-email {
  font-size: 12px;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid var(--gold-dim);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Section heading */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

.section-head .count-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 20px;
}

/* ============ DEAL CARDS ============ */
.deals-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.deal-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.deal-card.status-passed {
  opacity: 0.7;
}

.deal-card-top {
  padding: 20px 22px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.deal-meta h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.deal-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.deal-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.deal-meta-item .dot {
  width: 3px;
  height: 3px;
  background: var(--text-dim);
  border-radius: 50%;
}

.deal-id-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Pipeline tracker */
.pipeline-wrap {
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

.pipeline-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.pipeline-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Line behind dots */
.pipeline-track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--border);
  transform: translateY(-50%);
  z-index: 0;
}

.pipeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 7px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
}

.step-dot.done {
  background: var(--gold);
  border-color: var(--gold);
  color: #070B14;
}

.step-dot.current {
  background: var(--bg-base);
  border-color: var(--gold);
  border-width: 2.5px;
  box-shadow: 0 0 0 4px rgba(212, 160, 23, 0.2);
}

.step-dot.failed {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.step-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

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

.step-label.failed-label {
  color: var(--red);
}

/* Progress bar fill */
.pipeline-progress {
  position: absolute;
  top: 50%;
  left: 8px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: translateY(-50%);
  z-index: 0;
  transition: width 0.6s ease;
  border-radius: 2px;
}

/* Deal bottom: recommendation */
.deal-bottom {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.recommendation-block {
  flex: 1;
  min-width: 200px;
}

.rec-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}

.rec-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}

.notes-block {
  flex: 1;
  min-width: 200px;
}

.notes-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.submitted    { color: #94A3B8; background: rgba(148,163,184,0.10); border: 1px solid rgba(148,163,184,0.2); }
.status-badge.submitted::before { background: #94A3B8; }

.status-badge.screening    { color: var(--amber); background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.25); }
.status-badge.screening::before { background: var(--amber); animation: pulse 1.8s ease-in-out infinite; }

.status-badge.under_review { color: var(--blue); background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.25); }
.status-badge.under_review::before { background: var(--blue); animation: pulse 1.8s ease-in-out infinite; }

.status-badge.loi          { color: var(--gold-bright); background: var(--gold-bg); border: 1px solid var(--gold-dim); }
.status-badge.loi::before  { background: var(--gold-bright); animation: pulse 1.8s ease-in-out infinite; }

.status-badge.dd           { color: #A78BFA; background: rgba(167,139,250,0.10); border: 1px solid rgba(167,139,250,0.3); }
.status-badge.dd::before   { background: #A78BFA; animation: pulse 1.4s ease-in-out infinite; }

.status-badge.passed       { color: var(--text-dim); background: rgba(100,116,139,0.10); border: 1px solid rgba(100,116,139,0.2); }
.status-badge.passed::before { background: var(--text-dim); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.empty-state .icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 13px; max-width: 320px; margin: 0 auto; }

/* ============ PAYOUT SECTION ============ */
.payout-section {
  margin-top: 8px;
}

.payout-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.payout-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.payout-text h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.payout-text p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
}

.payout-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
}

.payout-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.payout-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

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

.no-payouts {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ============ SUBMIT CTA ============ */
.submit-cta {
  background: linear-gradient(135deg, rgba(212,160,23,0.06) 0%, rgba(212,160,23,0.02) 100%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cta-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}

.cta-text p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ DIVIDER ============ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ============ FORM SUCCESS / ERROR ============ */
.form-success {
  display: none;
  text-align: center;
  padding: 24px 0 8px;
}

.form-success .check {
  font-size: 40px;
  margin-bottom: 12px;
}

.form-success h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}

.form-success p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert-error   { background: var(--red-bg); border: 1px solid rgba(239,68,68,0.25); color: #FCA5A5; }
.alert-success { background: var(--green-bg); border: 1px solid rgba(16,185,129,0.25); color: #6EE7B7; }
.alert-info    { background: var(--gold-bg); border: 1px solid var(--gold-dim); color: var(--gold); }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 700px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-card {
    padding: 28px 24px;
  }

  .deal-card-top {
    flex-direction: column;
  }

  .deal-bottom {
    flex-direction: column;
  }

  .greeting-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .submit-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .pipeline-track {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .step-label {
    font-size: 8px;
  }

  .payout-placeholder {
    flex-direction: column;
  }

  .header-badge { display: none; }
}

@media (max-width: 440px) {
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 16px; }
  .dashboard { padding: 24px 16px 60px; }
}

/* ============ UTILITIES ============ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
