/* =========================================================
   Wilson Family — Design System
   Modern, warm, energetic
   ========================================================= */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #1a1a2e;
  --ink-soft: #6b7280;
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.08);
  --accent: #ff6b35;
  --accent-soft: #ffb088;
  --accent-light: rgba(255, 107, 53, 0.1);
  --emerald: #10b981;
  --emerald-light: rgba(16, 185, 129, 0.1);
  --rose: #ef4444;
  --sky: #3b82f6;
  --rule: rgba(0, 0, 0, 0.07);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --radius: 16px;
  --radius-lg: 24px;
}

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

html, body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

.hidden { display: none !important; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow.centered { text-align: center; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

em { font-style: italic; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm), 0 0 0 0 rgba(37, 99, 235, 0);
}
.btn-primary:hover {
  background: var(--primary-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(37, 99, 235, 0.2);
  text-decoration: none;
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--rule);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.link-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.link-btn:hover { color: var(--primary); background: var(--primary-light); }

/* =========================================================
   SHARED HEADER
   ========================================================= */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-room {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-left: 2px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.user-chip > span:first-child { font-size: 20px; }

/* =========================================================
   MODAL
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.2s ease-out;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule);
  animation: rise 0.3s ease-out both;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.modal-close:hover { color: var(--ink); background: var(--bg); }
.modal-title {
  font-size: 24px;
  margin: 8px 0 20px;
  font-weight: 700;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-form label > span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.modal-form label > span em {
  font-weight: 400;
  color: var(--ink-soft);
  opacity: 0.7;
  margin-left: 6px;
}
.modal-form input,
.modal-form select {
  background: var(--bg);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  transition: all 0.15s ease;
}
.modal-form input:focus,
.modal-form select:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-light);
}
.modal-form .btn-primary { margin-top: 8px; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 720px) {
  .app-header {
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .user-chip { justify-content: center; }
}
