/* ═══════════════════════════════════════════
   SHOTSPOT DESIGN SYSTEM
   Warm cream + red accent + navy utility
   ═══════════════════════════════════════════ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

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

/* ── Design Tokens ── */
:root {
  /* Primary palette */
  --bg-base: #f7f3ea;
  --bg-primary: #f7f3ea;
  --bg-secondary: #f2ede1;
  --text-primary: #111318;
  --text-muted: #4e5562;
  --accent: #ff3b30;
  --accent-deep: #d91f15;
  --accent-secondary: #ffd400;

  /* Supporting palette */
  --headline-dark: #0f1218;
  --brand-dark: #1a1f2b;
  --heading-dark: #171b24;
  --secondary-body: #2f3744;
  --navy: #2c3e58;
  --navy-hover: #375071;
  --navy-end: #111a2a;
  --navy-deep: #16243a;
  --hero-black: #0b0b0b;
  --white: #ffffff;
  --off-white-1: #f8fbff;
  --off-white-2: #f7fbff;
  --off-white-3: #f5f9ff;

  /* Semantic colors */
  --green: #10B981;
  --green-bg: rgba(16, 185, 129, 0.1);
  --green-glow: rgba(16, 185, 129, 0.15);
  --yellow: #F59E0B;
  --yellow-bg: rgba(245, 158, 11, 0.1);
  --yellow-glow: rgba(245, 158, 11, 0.15);
  --blue: #3B82F6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  --blue-glow: rgba(59, 130, 246, 0.15);
  --red: #EF4444;
  --red-bg: rgba(239, 68, 68, 0.1);

  /* Surface / overlay */
  --panel: rgba(255, 255, 255, 0.9);
  --soft-surface: rgba(255, 255, 255, 0.72);
  --border: rgba(0, 0, 0, 0.18);
  --border-strong: rgba(0, 0, 0, 0.22);
  --border-light: rgba(0, 0, 0, 0.10);

  /* Atmosphere / glow */
  --coral-glow: rgba(255, 122, 80, 0.26);
  --hot-coral-glow: rgba(255, 77, 58, 0.3);
  --yellow-warm-glow: rgba(255, 228, 148, 0.24);
  --gold-glow: rgba(255, 205, 75, 0.28);
  --accent-glow: rgba(255, 59, 48, 0.22);
  --warm-border: rgba(255, 142, 96, 0.46);

  /* Shapes */
  --radius-sm: 0.75rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 4px 16px var(--accent-glow);
  --shadow-accent-lg: 0 8px 32px var(--accent-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
  --duration-slow: 0.4s;
}

/* ── Base Styles ── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
  color: var(--headline-dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ── Form Inputs ── */
.ds-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.ds-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12);
}

.ds-input::placeholder { color: #94a3b8; }

/* ── Label ── */
.ds-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--secondary-body);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Buttons ── */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
              background var(--duration-fast),
              box-shadow var(--duration-normal);
  text-decoration: none;
}

.ds-btn:active { transform: scale(0.98); }
.ds-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.ds-btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-accent);
}

.ds-btn-primary:hover {
  background: var(--accent-deep);
  box-shadow: var(--shadow-accent-lg);
  transform: translateY(-1px);
}

.ds-btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.ds-btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

.ds-btn-full { width: 100%; }

/* ── Cards ── */
.ds-card {
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal);
}

.ds-card:hover {
  box-shadow: var(--shadow-md);
}

/* ── Pill Badge ── */
.ds-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ds-pill-accent {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(255, 59, 48, 0.15);
}

.ds-pill-green {
  background: var(--green-glow);
  color: var(--green);
}

.ds-pill-yellow {
  background: var(--yellow-glow);
  color: var(--yellow);
}

/* ── Status Tags ── */
.ds-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ds-status-waiting { background: var(--blue-bg); color: var(--blue); }
.ds-status-notified { background: var(--yellow-bg); color: var(--yellow); }
.ds-status-active { background: var(--green-bg); color: var(--green); }
.ds-status-done { background: var(--bg-secondary); color: var(--text-muted); }
.ds-status-error { background: var(--red-bg); color: var(--red); }

/* ── Auth Card (login/signup/reset) ── */
.ds-auth-wrapper {
  max-width: 420px;
  width: 100%;
}

.ds-auth-card {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

/* ── Error / Success Boxes ── */
.ds-error-box {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.ds-success-box {
  display: none;
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

/* ── Topbar (Dashboard) ── */
.ds-topbar {
  background: var(--brand-dark);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ds-topbar-brand {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-topbar-brand img { height: 24px; width: auto; }
.ds-topbar-brand .accent { color: var(--accent); }

/* ── Animations ── */
@keyframes ds-fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes ds-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes ds-slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ds-animate-in {
  animation: ds-fadeIn var(--duration-slow) var(--ease-out) both;
}

.ds-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ds-spin 0.7s linear infinite;
}

/* ── Footer ── */
.ds-footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Utility Classes ── */
.ds-text-accent { color: var(--accent); }
.ds-text-muted { color: var(--text-muted); }
.ds-text-center { text-align: center; }
.ds-font-sora { font-family: 'Sora', sans-serif; }
.ds-fw-600 { font-weight: 600; }
.ds-fw-700 { font-weight: 700; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .ds-auth-card { padding: 32px 20px; }
  .ds-card { padding: 20px; }
}
