/* ============================================================
   YourScribe Design System
   Source of truth: /CLAUDE.md
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- Custom Properties --- */
:root {
  /* Primary accent */
  --ys-primary: #3B82F6;
  --ys-primary-end: #6366F1;

  /* Text */
  --ys-text: #0F172A;
  --ys-text-muted: #64748B;

  /* State colours */
  --ys-state-active: #3B82F6;
  --ys-state-paused: #EDBA5A;
  --ys-state-stop: #C4918B;

  /* Card (glassmorphism) */
  --ys-card-bg: rgba(255, 255, 255, 0.55);
  --ys-card-border: 1px solid rgba(255, 255, 255, 0.8);
  --ys-card-shadow: 0 8px 40px rgba(99, 102, 241, 0.06);

  /* Tab pills */
  --ys-tab-active-bg: rgba(99, 102, 241, 0.08);
  --ys-tab-active-border: #818CF8;
  --ys-tab-inactive-bg: rgba(255, 255, 255, 0.6);

  /* Toggle / segmented control */
  --ys-toggle-bg: rgba(241, 245, 249, 0.8);

  /* Radii */
  --ys-btn-radius: 14px;
  --ys-card-radius: 24px;
  --ys-tab-radius: 10px;
}

/* ============================================================
   Base Styles
   ============================================================ */

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(170deg, #F1F5F9 0%, #E8EDF4 50%, #F0F4F8 100%);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  color: var(--ys-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--ys-text);
}

code, pre, kbd, samp, .mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   Card — Glassmorphism
   ============================================================ */

.ys-card {
  background: var(--ys-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--ys-card-radius);
  border: var(--ys-card-border);
  box-shadow: var(--ys-card-shadow);
}

/* ============================================================
   Buttons
   ============================================================ */

.ys-btn-primary,
.ys-btn-secondary,
.ys-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--ys-btn-radius);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
  text-decoration: none;
  line-height: 1.4;
}

.ys-btn-primary:hover,
.ys-btn-secondary:hover,
.ys-btn-danger:hover {
  transform: translateY(-1px);
}

/* Primary — blue-indigo gradient */
.ys-btn-primary {
  background: linear-gradient(to right, var(--ys-primary), var(--ys-primary-end));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.ys-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* Secondary — frosted white */
.ys-btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ys-text);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.06);
}

.ys-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Danger — soft rose (NOT red) */
.ys-btn-danger {
  background: rgba(196, 145, 139, 0.08);
  color: var(--ys-state-stop);
  border: 1.5px solid rgba(196, 145, 139, 0.4);
}

.ys-btn-danger:hover {
  background: rgba(196, 145, 139, 0.15);
  box-shadow: 0 4px 12px rgba(196, 145, 139, 0.12);
}

/* ============================================================
   Tab Pills
   ============================================================ */

.ys-tab-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ys-tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: var(--ys-tab-radius);
  background: var(--ys-tab-inactive-bg);
  border: 1px solid rgba(148, 163, 184, 0.1);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--ys-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.ys-tab-pill:hover {
  background: rgba(99, 102, 241, 0.04);
}

.ys-tab-pill.active {
  background: var(--ys-tab-active-bg);
  border: 1.5px solid var(--ys-tab-active-border);
  color: var(--ys-primary-end);
  font-weight: 700;
}

/* ============================================================
   Toggle / Segmented Controls
   ============================================================ */

.ys-toggle-group {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--ys-tab-radius);
  background: var(--ys-toggle-bg);
}

.ys-toggle-option {
  padding: 6px 16px;
  border-radius: calc(var(--ys-tab-radius) - 2px);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--ys-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.ys-toggle-option.active {
  background: #fff;
  color: var(--ys-text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ============================================================
   Form Elements
   ============================================================ */

.ys-label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--ys-text-muted);
  letter-spacing: 0.02em;
}

.ys-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--ys-tab-radius);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--ys-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.ys-input::placeholder {
  color: var(--ys-text-muted);
  opacity: 0.6;
}

.ys-input:focus {
  outline: none;
  border-color: var(--ys-tab-active-border);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

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

/* ============================================================
   Top Navigation
   ============================================================ */

.ys-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  gap: 16px;
}

.ys-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--ys-btn-radius);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--ys-text);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.ys-nav-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

/* Logout — soft rose */
.ys-nav-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--ys-btn-radius);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--ys-state-stop);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.ys-nav-btn-danger:hover {
  transform: translateY(-1px);
  background: rgba(196, 145, 139, 0.12);
  box-shadow: 0 4px 12px rgba(196, 145, 139, 0.1);
}

/* ============================================================
   Tab Content
   ============================================================ */

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================================
   Utilities
   ============================================================ */

.ys-text-muted {
  color: var(--ys-text-muted);
}

.ys-text-center {
  text-align: center;
}

.ys-container {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}
