/* ===================================================================
   The Men of Issachar Vision — Soul Winning Data
   Custom styles (Tailwind CDN handles most utility classes)
   =================================================================== */

:root {
  --navy-950: #0a1628;
  --navy-900: #0f2340;
  --navy-800: #15325a;
  --navy-700: #1c3f70;
  --gold-500: #d4af37;
  --gold-400: #e2c766;
  --gold-600: #b8932a;
  --cream-50: #faf8f3;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--cream-50);
}

.font-serif-display {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Gradient brand backgrounds */
.brand-gradient {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
}

.gold-accent-line {
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #17223b;
  font-weight: 600;
  transition: all .18s ease;
}
.btn-gold:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(212,175,55,.55);
}
.btn-gold:active { transform: translateY(0); }

.btn-navy {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: #fff;
  font-weight: 600;
  transition: all .18s ease;
}
.btn-navy:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(15,35,64,.5);
}

/* Card hover lift */
.stat-card {
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -10px rgba(15,35,64,.25);
}

/* Sidebar nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  border-radius: .6rem;
  color: #cbd5e1;
  font-weight: 500;
  font-size: .93rem;
  transition: all .15s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.nav-item.active {
  background: rgba(212,175,55,.14);
  color: var(--gold-400);
  border-left: 3px solid var(--gold-500);
}
.nav-item i { width: 20px; text-align: center; }

/* Views */
.app-view { display: none; }
.app-view.active { display: block; animation: fadeIn .3s ease; }

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

/* Table styling */
.data-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 5;
}
.data-table tbody tr:hover { background: #f8fafc; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-admin { background: #fef3c7; color: #92400e; }
.badge-coordinator { background: #dbeafe; color: #1e40af; }
.badge-soul_winner { background: #dcfce7; color: #166534; }
.badge-viewer { background: #e2e8f0; color: #475569; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-yes { background: #dcfce7; color: #166534; }
.badge-no { background: #e2e8f0; color: #475569; }
.badge-notsure { background: #fef3c7; color: #92400e; }
.badge-urgent { background: #fee2e2; color: #991b1b; }
.badge-counselling { background: #ede9fe; color: #5b21b6; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,22,40,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 1rem; backdrop-filter: blur(2px);
}

/* Toast */
#toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 200;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  min-width: 260px; max-width: 340px;
  padding: .8rem 1rem; border-radius: .6rem;
  color: #fff; font-size: .88rem; font-weight: 500;
  box-shadow: 0 10px 25px -8px rgba(0,0,0,.35);
  animation: slideIn .25s ease;
  display: flex; align-items: center; gap: .6rem;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(30px);} to { opacity: 1; transform: translateX(0);} }
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-info { background: #1c3f70; }

/* Mobile sidebar */
@media (max-width: 1024px) {
  #sidebar { position: fixed; left: -280px; top: 0; bottom: 0; z-index: 60; transition: left .25s ease; }
  #sidebar.open { left: 0; }
  #sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
  #sidebar-overlay.open { display: block; }
}

.form-input {
  width: 100%;
  border: 1px solid #dbe2ea;
  border-radius: .6rem;
  padding: .65rem .9rem;
  font-size: .92rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: #fff;
}
.form-input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212,175,55,.18);
}
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: .3rem;
}

.export-tab-btn {
  padding: .6rem 1.1rem;
  border-radius: .6rem;
  font-size: .85rem;
  font-weight: 600;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all .15s ease;
  cursor: pointer;
}
.export-tab-btn:hover { border-color: var(--gold-500); color: #17223b; }
.export-tab-btn.active {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: #fff;
  border-color: var(--navy-800);
}

.winner-tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: .3rem .5rem .3rem .75rem;
  font-size: .8rem;
  font-weight: 600;
}
.winner-tag button {
  color: #b45309;
  line-height: 1;
}
.winner-tag button:hover { color: #7c2d12; }

.cross-watermark {
  position: absolute;
  opacity: .06;
  font-size: 14rem;
  pointer-events: none;
  color: #fff;
  transform: rotate(-8deg);
}
