/* PulseUnit — dark theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0b0f;
  --surface: #13151c;
  --surface-2: #1a1d27;
  --border: rgba(255,255,255,0.08);
  --border-active: rgba(99,179,237,0.4);
  --text: #e8eaf0;
  --muted: #8891a8;
  --accent: #63b3ed;
  --accent-dark: #2b6cb0;
  --green: #68d391;
  --yellow: #f6ad55;
  --red: #fc8181;
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── Layout ── */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 50;
}
.nav-logo { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.nav-logo span { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 7px; font-size: 14px; font-weight: 500;
  border: none; cursor: pointer; transition: opacity 0.15s, transform 0.1s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #0a0b0f; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #c53030; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── Hero / Landing ── */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px 60px;
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(99,179,237,0.08) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  background: rgba(99,179,237,0.12); border: 1px solid rgba(99,179,237,0.25);
  font-size: 12px; color: var(--accent); font-weight: 500; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -1.5px;
  line-height: 1.1; color: var(--text); margin-bottom: 18px; max-width: 700px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { font-size: 17px; color: var(--muted); max-width: 500px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; padding: 48px 32px; max-width: 960px; margin: 0 auto;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.feature-icon { font-size: 24px; margin-bottom: 10px; }
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted); }

/* ── Dashboard ── */
.dashboard { padding: 32px; max-width: 1100px; margin: 0 auto; width: 100%; }
.page-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
}
.page-header h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.team-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.team-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.team-name { font-weight: 600; font-size: 16px; }
.team-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.team-actions { display: flex; gap: 8px; }
.team-card-body { padding: 16px 20px; }

.latest-standup {
  background: var(--surface-2); border-radius: 7px; padding: 14px;
  font-size: 13px; white-space: pre-wrap; font-family: 'SF Mono', 'Fira Code', monospace;
  color: #c8d0e0; max-height: 200px; overflow-y: auto; margin-bottom: 14px;
  border: 1px solid var(--border);
}
.no-standup { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0; }

.standup-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500;
}
.badge-green { background: rgba(104,211,145,0.12); color: var(--green); }
.badge-blue { background: rgba(99,179,237,0.12); color: var(--accent); }
.badge-yellow { background: rgba(246,173,85,0.12); color: var(--yellow); }

/* history collapse */
.history-toggle {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-size: 12px; padding: 0; margin-top: 6px;
}
.history-list { margin-top: 10px; }
.history-item {
  padding: 10px 0; border-top: 1px solid var(--border); font-size: 12px;
}
.history-item-date { color: var(--muted); margin-bottom: 6px; }
.history-content { white-space: pre-wrap; font-family: monospace; color: #b0bac8; max-height: 120px; overflow-y: auto; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  padding: 24px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); }

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--border-active); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.linear-teams-select { margin-top: 10px; }

/* ── Loading / Error ── */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--text); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  padding: 10px 14px; border-radius: 7px; font-size: 13px; margin-bottom: 16px;
}
.alert-error { background: rgba(252,129,129,0.1); border: 1px solid rgba(252,129,129,0.3); color: var(--red); }
.alert-success { background: rgba(104,211,145,0.1); border: 1px solid rgba(104,211,145,0.3); color: var(--green); }

/* ── Empty states ── */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

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