/* It's Your Call Design System - Matches landing page tokens */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --flame: #FF4D00;
  --flame-light: #FF6B2C;
  --flame-dark: #CC3D00;
  --dark: #0A0A0A;
  --darker: #050505;
  --gray-900: #141414;
  --gray-800: #1C1C1C;
  --gray-700: #2A2A2A;
  --gray-600: #3A3A3A;
  --gray-500: #5A5A5A;
  --gray-400: #8A8A8A;
  --gray-300: #B0B0B0;
  --gray-200: #D0D0D0;
  --white: #FAFAFA;
  --ice: #00C2FF;
  --green: #00D26A;
  --green-dark: #00A854;
  --yellow: #FFB800;
  --red: #FF3B3B;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--darker);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 77, 0, 0.1);
}

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

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--flame);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

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

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

.nav-link:hover {
  color: var(--white);
  background: var(--gray-800);
}

.nav-link.active {
  color: var(--white);
  background: var(--gray-800);
}

.nav-cta {
  background: var(--flame);
  color: var(--white) !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 20px !important;
  transition: all 0.2s;
}

.nav-cta:hover {
  background: var(--flame-light) !important;
}

/* Page wrapper */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 40px 60px;
  min-height: 100vh;
}

.page-narrow {
  max-width: 720px;
}

/* Page header */
.page-header {
  margin-bottom: 48px;
}

.page-eyebrow {
  font-size: 0.8rem;
  color: var(--flame);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  margin-bottom: 12px;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.page-subtitle {
  color: var(--gray-400);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.6;
}

/* Cards */
.card {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--gray-700);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-text {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Form elements */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--flame);
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.15);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--gray-500);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

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

.form-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 6px;
}

/* Urgency selector */
.urgency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.urgency-option {
  padding: 16px;
  background: var(--gray-800);
  border: 2px solid var(--gray-700);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.urgency-option:hover {
  border-color: var(--gray-600);
}

.urgency-option.selected {
  border-color: var(--flame);
  background: rgba(255, 77, 0, 0.08);
}

.urgency-option input {
  display: none;
}

.urgency-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.urgency-label {
  font-weight: 600;
  font-size: 0.85rem;
  display: block;
}

.urgency-desc {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--flame);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--flame-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 77, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--gray-800);
  color: var(--white);
  border: 1px solid var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-700);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-300);
  border: 1px solid var(--gray-700);
}

.btn-ghost:hover {
  color: var(--white);
  border-color: var(--gray-600);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

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

/* Badges / Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-emergency {
  background: rgba(255, 59, 59, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 59, 59, 0.3);
}

.badge-repair {
  background: rgba(255, 184, 0, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.badge-maintenance {
  background: rgba(0, 194, 255, 0.15);
  color: var(--ice);
  border: 1px solid rgba(0, 194, 255, 0.3);
}

.badge-quote {
  background: rgba(0, 210, 106, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 210, 106, 0.3);
}

.badge-general {
  background: rgba(138, 138, 138, 0.15);
  color: var(--gray-300);
  border: 1px solid rgba(138, 138, 138, 0.3);
}

.badge-new { background: rgba(0, 194, 255, 0.15); color: var(--ice); border: 1px solid rgba(0, 194, 255, 0.3); }
.badge-responded { background: rgba(255, 184, 0, 0.15); color: var(--yellow); border: 1px solid rgba(255, 184, 0, 0.3); }
.badge-booked { background: rgba(0, 210, 106, 0.15); color: var(--green); border: 1px solid rgba(0, 210, 106, 0.3); }
.badge-completed { background: rgba(0, 210, 106, 0.15); color: var(--green); border: 1px solid rgba(0, 210, 106, 0.3); }
.badge-lost { background: rgba(255, 59, 59, 0.15); color: var(--red); border: 1px solid rgba(255, 59, 59, 0.3); }

/* Response message bubble */
.response-bubble {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: 16px;
  padding: 28px;
  margin: 24px 0;
  position: relative;
}

.response-bubble::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--flame), var(--flame-light), transparent);
  border-radius: 16px 16px 0 0;
}

.response-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-800);
}

.response-avatar {
  width: 36px;
  height: 36px;
  background: var(--flame);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.response-from {
  font-weight: 600;
  font-size: 0.9rem;
}

.response-time {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-left: auto;
}

.response-body {
  color: var(--gray-300);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Time slot picker */
.slot-grid {
  display: grid;
  gap: 20px;
}

.slot-day {
  margin-bottom: 12px;
}

.slot-day-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-800);
  color: var(--gray-300);
}

.slot-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.slot-btn {
  padding: 12px 16px;
  background: var(--gray-800);
  border: 2px solid var(--gray-700);
  border-radius: 10px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.slot-btn:hover {
  border-color: var(--flame);
  background: rgba(255, 77, 0, 0.08);
}

.slot-btn.selected {
  border-color: var(--flame);
  background: rgba(255, 77, 0, 0.12);
  color: var(--flame-light);
}

.slot-btn .slot-period {
  font-size: 0.7rem;
  color: var(--gray-500);
  display: block;
  margin-top: 2px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: 14px;
  padding: 24px;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.stat-card-value .accent {
  color: var(--flame);
}

/* Table */
.table-wrap {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: 16px;
  overflow: hidden;
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

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

th {
  text-align: left;
  padding: 14px 24px;
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  border-bottom: 1px solid var(--gray-800);
  background: rgba(20, 20, 20, 0.5);
}

td {
  padding: 16px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(42, 42, 42, 0.5);
  color: var(--gray-300);
}

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

tr:hover td {
  background: rgba(42, 42, 42, 0.2);
}

td .lead-name {
  color: var(--white);
  font-weight: 600;
}

td .lead-phone {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* Confirmation page */
.confirm-card {
  text-align: center;
  padding: 48px;
}

.confirm-icon {
  width: 80px;
  height: 80px;
  background: rgba(0, 210, 106, 0.12);
  border: 2px solid rgba(0, 210, 106, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px;
}

.confirm-code {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--flame);
  letter-spacing: 2px;
  margin: 16px 0;
}

.confirm-details {
  background: var(--gray-800);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}

.confirm-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-700);
}

.confirm-detail-row:last-child {
  border-bottom: none;
}

.confirm-detail-label {
  color: var(--gray-400);
  font-size: 0.85rem;
}

.confirm-detail-value {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-700);
  border-top-color: var(--flame);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  gap: 16px;
  color: var(--gray-400);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* Glow orb */
.glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
  pointer-events: none;
}

.glow-1 { background: var(--flame); top: -300px; right: -200px; }
.glow-2 { background: var(--ice); bottom: -300px; left: -200px; opacity: 0.05; }

/* Filters bar */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: 8px;
  color: var(--gray-400);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  color: var(--white);
  border-color: var(--flame);
  background: rgba(255, 77, 0, 0.08);
}

/* Footer */
.app-footer {
  padding: 30px 40px;
  border-top: 1px solid var(--gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.app-footer span {
  color: var(--gray-500);
  font-size: 0.8rem;
}

.app-footer a {
  color: var(--gray-400);
  text-decoration: none;
}

/* Utility */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-flame { color: var(--flame); }
.text-muted { color: var(--gray-400); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Mobile */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav-links { gap: 4px; }
  .nav-link { padding: 8px 10px; font-size: 0.8rem; }
  .page { padding: 90px 20px 40px; }
  .urgency-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .slot-times { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { overflow-x: auto; }
  table { min-width: 600px; }
  .filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  .app-footer { flex-direction: column; gap: 8px; padding: 20px; }
}
