/* GridVoice Shared Styles — matches landing page design tokens */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #0a0a0a;
  --dark: #111113;
  --card: #18181b;
  --border: #27272a;
  --muted: #71717a;
  --text: #d4d4d8;
  --white: #fafafa;
  --amber: #f59e0b;
  --amber-dim: #92400e;
  --amber-glow: rgba(245, 158, 11, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.08);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.08);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.08);
  --orange: #f97316;
  --orange-dim: rgba(249, 115, 22, 0.08);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--white);
  line-height: 1.15;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Grid background */
.grid-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.content { position: relative; z-index: 1; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo .bolt {
  color: var(--amber);
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}

.nav-link.active {
  color: var(--amber);
  background: var(--amber-glow);
}

.nav-link.btn-logout {
  color: var(--muted);
}

/* ============================================
   LAYOUT
   ============================================ */
.page-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.card:hover {
  border-color: rgba(245, 158, 11, 0.2);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stat-card .stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-input::placeholder {
  color: #52525b;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--amber);
  color: var(--black);
}

.btn-primary:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--dark);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--card);
  border-color: var(--muted);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-safe {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-need_help {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-offering_help {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-evacuated {
  background: var(--orange-dim);
  color: var(--orange);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================
   READINESS METER
   ============================================ */
.readiness-meter {
  width: 100%;
  height: 8px;
  background: var(--dark);
  border-radius: 100px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.readiness-meter-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

.readiness-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
}

.readiness-score.score-low { color: var(--red); }
.readiness-score.score-mid { color: var(--amber); }
.readiness-score.score-high { color: var(--green); }

/* ============================================
   CONTACT LIST
   ============================================ */
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.contact-item:hover {
  border-color: rgba(245, 158, 11, 0.2);
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-weight: 600;
  color: var(--white);
  font-size: 0.95rem;
}

.contact-details {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.contact-actions {
  display: flex;
  gap: 0.5rem;
}

.contact-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--amber-glow);
  color: var(--amber);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 12px;
}

/* ============================================
   CHECKLIST
   ============================================ */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.checklist-item:hover {
  border-color: rgba(245, 158, 11, 0.2);
}

.checklist-item.checked {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.03);
}

.checklist-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checklist-item.checked .checklist-check {
  background: var(--green);
  border-color: var(--green);
  color: var(--black);
}

.checklist-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.checklist-text p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================
   STATUS BOARD
   ============================================ */
.status-board-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(39, 39, 42, 0.5);
}

.status-board-item:last-child {
  border-bottom: none;
}

.status-board-name {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--white);
  flex: 1;
}

.status-board-time {
  font-size: 0.75rem;
  color: #52525b;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.alert.show { display: block; }

.alert-error {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

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

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 700px) {
  .page-container { padding: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav { padding: 0.75rem 1rem; }
  .nav-link { padding: 6px 10px; font-size: 0.8rem; }
  .stat-card .stat-num { font-size: 1.5rem; }
}
