/* ════════════════════════════════════════════════════════
   SCOUT — Premium Design System v2.0
   Dark-first · Inter · Sidebar Nav · Glass Cards
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Instrument+Serif:ital,wght@0,400;1,400&display=swap');

/* ── Light Theme (default) ── */
:root {
  --canvas:           #faf8f5;
  --surface-1:        #f4f3ef;
  --surface-2:        #ffffff;
  --surface-3:        #eae9e5;
  --surface-hover:    rgba(0,0,0,0.04);
  --surface-soft:     #f4f3ef;
  --surface-soft-hover: #eae9e5;

  --primary:          #111110;
  --primary-hover:    #2d2d2d;
  --primary-glow:     rgba(17,17,16,0.06);
  --on-primary:       #ffffff;

  --ink:              #111110;
  --charcoal:         #2a2a2a;
  --body:             #5c5c5a;
  --mute:             #8c8c8a;

  --hairline:         rgba(17,17,16,0.08);
  --hairline-strong:  #111110;

  --red:              #dc2626;
  --green:            #16a34a;
  --yellow:           #ca8a04;
  --green-glow:       rgba(22,163,74,0.08);
  --red-glow:         rgba(220,38,38,0.08);

  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        18px;
  --radius-full:      9999px;

  --shadow-sm:        1px 1px 0px #111110;
  --shadow-md:        3px 3px 0px #111110;
  --shadow-lg:        6px 6px 0px #111110;
  --shadow-card:      2px 2px 0px #111110;

  --focus-ring:       rgba(17,17,16,0.08);

  /* ── Legacy aliases ── */
  --bg:               var(--canvas);
  --paper:            var(--canvas);
  --paper2:           var(--surface-1);
  --paper3:           var(--surface-3);
  --ink2:             var(--charcoal);
  --ink3:             var(--body);
  --line:             var(--hairline);
  --line2:            var(--hairline);
  --teal:             var(--primary);
  --amber:            var(--yellow);
  --surface-dark:     #111110;
  --on-dark:          #ffffff;
  --on-dark-mute:     rgba(255,255,255,0.7);
  --shadow:           var(--shadow-md);

  --sidebar-width: 64px;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --canvas:           #0a0a0c;
  --surface-1:        #121215;
  --surface-2:        #18181c;
  --surface-3:        #222228;
  --surface-hover:    rgba(255,255,255,0.04);
  --surface-soft:     #121215;
  --surface-soft-hover: #222228;

  --primary:          #ffffff;
  --primary-hover:    #eaeaea;
  --primary-glow:     rgba(255,255,255,0.1);
  --on-primary:       #0a0a0c;

  --ink:              #f3f2f8;
  --charcoal:         #c8c7d6;
  --body:             rgba(240,239,248,0.65);
  --mute:             rgba(240,239,248,0.4);

  --hairline:         rgba(255,255,255,0.08);
  --hairline-strong:  #ffffff;

  --red:              #f87171;
  --green:            #4ade80;
  --yellow:           #fbbf24;
  --green-glow:       rgba(74,222,128,0.08);
  --red-glow:         rgba(248,113,113,0.08);

  --shadow-sm:        1px 1px 0px #ffffff;
  --shadow-md:        3px 3px 0px #ffffff;
  --shadow-lg:        6px 6px 0px #ffffff;
  --shadow-card:      2px 2px 0px #ffffff;

  --focus-ring:       rgba(255,255,255,0.12);
  
  --bg:               var(--canvas);
  --paper:            var(--canvas);
  --paper2:           var(--surface-1);
  --paper3:           var(--surface-3);
  --ink2:             var(--charcoal);
  --ink3:             var(--body);
  --line:             var(--hairline);
  --line2:            var(--hairline);
  --teal:             var(--primary);
  --amber:            var(--yellow);
  --surface-dark:     var(--surface-2);
  --on-dark:          var(--ink);
  --on-dark-mute:     var(--body);
  --shadow:           var(--shadow-md);
}

/* ── Smooth theme transitions ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.15s ease,
    box-shadow 0.2s ease;
}

/* Disable transition on elements that shouldn't animate */
.no-transition,
.no-transition * {
  transition: none !important;
}

/* ══════════════════════════════
   TYPOGRAPHY
══════════════════════════════ */
body {
  background-color: var(--canvas);
  background-image: radial-gradient(var(--hairline) 1.2px, transparent 0);
  background-size: 20px 20px;
  color: var(--charcoal);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin-left: var(--sidebar-width);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 28px;
  letter-spacing: 0em;
}

h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 14px; font-weight: 600; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s, opacity 0.15s;
}
a:hover { color: var(--primary-hover); }

code, kbd, pre, samp {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* ══════════════════════════════
   SCROLLBAR
══════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--mute); }

/* ══════════════════════════════
   SIDEBAR NAVIGATION
══════════════════════════════ */
.sidebar-nav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface-2);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 12px 0 16px 0;
  z-index: 900;
  overflow: hidden;
  transition: width 0.22s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-sm);
}

.sidebar-nav:hover {
  width: 220px;
}

[data-theme="dark"] .sidebar-nav {
  background: var(--surface-2);
  border-right-color: var(--hairline);
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 8px;
  height: 52px;
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.sidebar-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  letter-spacing: -0.02em;
}

.sidebar-nav:hover .sidebar-logo-text {
  opacity: 1;
  transform: translateX(0);
}

/* Nav items */
.sidebar-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--mute);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  outline: none;
}

.sidebar-item:hover {
  background: var(--surface-hover);
  color: var(--charcoal);
}

.sidebar-item.active {
  background: var(--primary-glow);
  color: var(--primary);
}

.sidebar-item.active .sidebar-icon {
  color: var(--primary);
}

/* Active accent bar */
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 0.15s;
}

.sidebar-label {
  font-size: 13.5px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.sidebar-nav:hover .sidebar-label {
  opacity: 1;
  transform: translateX(0);
}

/* Footer */
.sidebar-footer {
  padding: 8px 8px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--hairline);
  margin-top: 4px;
  flex-shrink: 0;
}

/* Deadline chip */
.sidebar-deadline-chip {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 10px;
  width: 100%;
  margin-bottom: 2px;
  overflow: hidden;
}

/* Theme toggle icons */
.theme-icon-sun  { display: none; }
.theme-icon-moon { display: block; }
[data-theme="dark"] .theme-icon-sun  { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

/* Stagger label animations per item */
.sidebar-items .sidebar-item:nth-child(1) .sidebar-label { transition-delay: 0.02s; }
.sidebar-items .sidebar-item:nth-child(2) .sidebar-label { transition-delay: 0.04s; }
.sidebar-items .sidebar-item:nth-child(3) .sidebar-label { transition-delay: 0.06s; }
.sidebar-items .sidebar-item:nth-child(4) .sidebar-label { transition-delay: 0.08s; }
.sidebar-items .sidebar-item:nth-child(5) .sidebar-label { transition-delay: 0.10s; }
.sidebar-footer .sidebar-label { transition-delay: 0.04s; }

/* ══════════════════════════════
   LAYOUT UTILITIES
══════════════════════════════ */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}
.page-offset {
  padding-top: 36px;
  padding-bottom: 80px;
}
.section-gap { margin-top: 56px; margin-bottom: 56px; }

.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 20px;
}
.grid-cols-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin-bottom: 28px;
}

/* ══════════════════════════════
   SECTION UTILITIES
══════════════════════════════ */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  padding: 2px 8px;
  border-radius: 99px;
  color: var(--mute);
}
.section-title { font-size: 22px; font-weight: 700; }
.section-desc  { font-size: 14.5px; color: var(--body); margin-bottom: 28px; line-height: 1.6; }

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card-flat, .setup-card {
  background: var(--surface-2);
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.setup-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--hairline);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-hover:hover {
  border-color: var(--hairline-strong);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.card-glass {
  background: var(--surface-2);
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-dark {
  background: var(--surface-3);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: var(--ink); }

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--hairline-strong);
  outline: none;
  height: 40px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: all 0.12s ease;
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translate(1px, 1px); box-shadow: none; }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--surface-1);
  color: var(--charcoal);
  border-color: var(--hairline-strong);
}
.btn-secondary:hover {
  background: var(--surface-3);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--hairline-strong);
}
.btn-outline:hover {
  background: var(--surface-1);
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.btn-red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-red:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--body);
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn-disabled, .btn[disabled] {
  background: var(--surface-1) !important;
  color: var(--mute) !important;
  border-color: var(--hairline) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Icon button */
.btn-icon {
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* ══════════════════════════════
   FORM FIELDS
══════════════════════════════ */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 40px;
  background: var(--surface-2);
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: all 0.12s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-md);
  transform: translate(-1px, -1px);
}

input::placeholder, textarea::placeholder { color: var(--mute); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9b98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 38px;
  cursor: pointer;
}

textarea { resize: vertical; min-height: 90px; }

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-group label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ══════════════════════════════
   BADGES / PILLS
══════════════════════════════ */
.badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-1);
  color: var(--charcoal);
  border: 1px solid var(--hairline);
}
.badge-green  { background: var(--green-glow); color: var(--green); border-color: rgba(74,222,128,0.2); }
.badge-red    { background: var(--red-glow);   color: var(--red);   border-color: rgba(248,113,113,0.2); }
.badge-yellow { background: rgba(234,179,8,0.1); color: var(--yellow); border-color: rgba(234,179,8,0.2); }
.badge-indigo { background: var(--primary-glow); color: var(--primary); border-color: rgba(99,102,241,0.2); }

/* ══════════════════════════════
   TERMINAL CARD
══════════════════════════════ */
.terminal-card {
  background: #0e0e14;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #c8c7d6;
  position: relative;
  box-shadow: var(--shadow-md);
}
[data-theme="light"] .terminal-card { background: #1a1a24; }

.terminal-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-card pre { white-space: pre-wrap; word-break: break-all; color: #d1d0e0; }
.terminal-card pre .cmd     { color: #a5b4fc; font-weight: 600; }
.terminal-card pre .comment { color: #4b4b6a; }

/* ══════════════════════════════
   TOGGLE SWITCH
══════════════════════════════ */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface-1);
  border: 1.5px solid var(--hairline-strong);
  border-radius: 99px;
  transition: 0.2s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 3px;
  bottom: 3px;
  background: var(--mute);
  border-radius: 50%;
  transition: 0.2s;
}
input:checked + .slider { background: var(--primary); border-color: var(--primary); }
input:checked + .slider:before { transform: translateX(18px); background: #fff; }

/* ══════════════════════════════
   SETTINGS LAYOUT
══════════════════════════════ */
.settings-full-width { padding: 32px 40px 80px 40px; }

.settings-layout {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 600px;
  box-shadow: var(--shadow-md);
}
.settings-sidebar {
  width: 260px;
  background: var(--surface-1);
  border-right: 1.5px solid var(--hairline-strong);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.settings-sidebar-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 10px;
  margin-bottom: 8px;
}
.settings-tabs { display: flex; flex-direction: column; gap: 4px; }
.settings-tab-btn {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--body);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-tab-btn:hover { background: var(--surface-soft-hover); color: var(--ink); }
.settings-tab-btn.active {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-sm);
}
.settings-panels { flex: 1; padding: 32px; min-width: 0; overflow-y: auto; }
.settings-panel { display: none; animation: fadeUp 0.2s ease-out; }
.settings-panel.active { display: block; }

/* ══════════════════════════════
   KANBAN BOARD
══════════════════════════════ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.kanban-col {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 200px;
}
.kanban-col-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mute);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-count {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mute);
}
.kanban-card {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}
.kanban-col.drag-over {
  background: var(--primary-glow);
  border-color: var(--primary);
}
.kanban-company-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.kanban-company-meta {
  font-size: 11.5px;
  color: var(--mute);
}
.kanban-add-btn {
  width: 100%;
  padding: 7px;
  border: 1.5px dashed var(--hairline-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.kanban-add-btn:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

/* ══════════════════════════════
   FLASHCARD
══════════════════════════════ */
.flashcard-scene {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  perspective: 1000px;
}
.flashcard {
  width: 100%;
  min-height: 220px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }

.flashcard-face {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-md);
}
.flashcard-face.back { transform: rotateY(180deg); }
.flashcard-hint {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mute);
  margin-bottom: 16px;
}
.flashcard-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}
.flashcard-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 3px 10px;
  border-radius: 99px;
  margin-top: 16px;
}
.flashcard-rating {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
  margin-top: 20px;
}
.flashcard-rating button {
  padding: 8px;
  border-radius: 9px;
  border: 1.5px solid var(--hairline);
  background: var(--surface-1);
  color: var(--body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.flashcard-rating .rate-again  { border-color: var(--red);    color: var(--red); }
.flashcard-rating .rate-hard   { border-color: var(--yellow); color: var(--yellow); }
.flashcard-rating .rate-good   { border-color: var(--green);  color: var(--green); }
.flashcard-rating .rate-easy   { border-color: var(--primary); color: var(--primary); }
.flashcard-rating button:hover { transform: translateY(-1px); filter: brightness(1.1); }

/* ══════════════════════════════
   ACTIVITY HEATMAP
══════════════════════════════ */
.heatmap-grid {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 100%;
}
.heatmap-week { display: flex; flex-direction: column; gap: 3px; }
.heatmap-day {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--surface-3);
  transition: background 0.1s;
  cursor: pointer;
}
.heatmap-day[data-level="1"] { background: rgba(99,102,241,0.2); }
.heatmap-day[data-level="2"] { background: rgba(99,102,241,0.4); }
.heatmap-day[data-level="3"] { background: rgba(99,102,241,0.65); }
.heatmap-day[data-level="4"] { background: var(--primary); }
[data-theme="light"] .heatmap-day { background: #e5e5e5; }
[data-theme="light"] .heatmap-day[data-level="1"] { background: #c7d2fe; }
[data-theme="light"] .heatmap-day[data-level="2"] { background: #818cf8; }
[data-theme="light"] .heatmap-day[data-level="3"] { background: #6366f1; }
[data-theme="light"] .heatmap-day[data-level="4"] { background: #4338ca; }

/* ══════════════════════════════
   COMMAND PALETTE
══════════════════════════════ */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.cmd-palette-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cmd-palette-modal {
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 560px;
  max-width: calc(100vw - 48px);
  overflow: hidden;
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.15s ease;
}
.cmd-palette-overlay.open .cmd-palette-modal {
  transform: scale(1) translateY(0);
}
.cmd-palette-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}
.cmd-palette-header svg { color: var(--mute); flex-shrink: 0; }
#cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  min-height: unset;
  padding: 0;
  box-shadow: none;
}
#cmd-palette-input::placeholder { color: var(--mute); }
.cmd-palette-header kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--mute);
}
.cmd-palette-list { padding: 8px; max-height: 360px; overflow-y: auto; }
.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.1s;
}
.cmd-item:hover, .cmd-item.selected {
  background: var(--surface-hover);
}
.cmd-item.selected { background: var(--primary-glow); }
.cmd-icon { font-size: 17px; flex-shrink: 0; }
.cmd-label { flex: 1; font-size: 14px; font-weight: 500; color: var(--ink); }
.cmd-shortcut {
  font-size: 11px;
  color: var(--mute);
  font-family: 'JetBrains Mono', monospace;
}
.cmd-palette-footer {
  display: flex;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
  color: var(--mute);
}
.cmd-palette-footer kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--mute);
}

/* ══════════════════════════════
   PROGRESS BARS
══════════════════════════════ */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.progress-bar-fill.green  { background: var(--green); }
.progress-bar-fill.red    { background: var(--red); }
.progress-bar-fill.yellow { background: var(--yellow); }

/* ══════════════════════════════
   HERO SECTION
══════════════════════════════ */
.hero {
  text-align: center;
  padding: 48px 0 40px 0;
  margin-bottom: 32px;
}
.hero h1 { font-size: 36px; color: var(--ink); margin-bottom: 12px; }
.hero p  { color: var(--body); font-size: 15.5px; max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* ══════════════════════════════
   CHARTS (inline SVG)
══════════════════════════════ */
svg text { font-family: 'Inter', sans-serif !important; fill: var(--mute) !important; }

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  from { background-position: -300px 0; }
  to   { background-position: 300px 0; }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--primary-glow); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes wordSwoop {
  0%   { opacity: 0; transform: translateY(10px) scale(0.95); filter: blur(4px); }
  60%  { opacity: 1; transform: translateY(-1px) scale(1.01); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes wordSwoosh {
  0%   { opacity: 0; transform: translateY(6px) scale(0.95); filter: blur(1px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes countdown-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.word-token, .animated-word {
  display: inline-block;
  opacity: 0;
  animation: wordSwoop 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
}
.animated-word { animation: wordSwoosh 0.25s cubic-bezier(0.25,1,0.5,1) forwards; }

.fade-up     { animation: fadeUp  0.3s ease-out both; }
.fade-in     { animation: fadeIn  0.25s ease-out both; }
.scale-in    { animation: scaleIn 0.2s ease-out both; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-3) 50%, var(--surface-1) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 6px;
}

/* ══════════════════════════════
   AUTH WARNING
══════════════════════════════ */
.auth-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--yellow);
  margin-bottom: 20px;
}
.auth-warning a { color: var(--yellow); text-decoration: underline; }

/* ══════════════════════════════
   UNIVERSAL FOOTER
══════════════════════════════ */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
  margin-top: 56px;
  font-size: 13px;
  color: var(--mute);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
}
@media (max-width: 600px) {
  footer { flex-direction: column; gap: 8px; text-align: center; }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 900px) {
  .kanban-board { grid-template-columns: repeat(2,1fr); }
  .grid-cols-3  { grid-template-columns: 1fr 1fr; }
  .grid-cols-4  { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  body { margin-left: 0; padding-bottom: 64px; }

  .sidebar-nav {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--hairline);
    padding: 0 8px;
  }
  .sidebar-nav:hover { width: 100%; }
  .sidebar-logo { display: none; }
  .sidebar-items {
    flex-direction: row;
    flex: 1;
    justify-content: space-around;
    overflow: visible;
    padding: 0;
    gap: 0;
  }
  .sidebar-item { flex-direction: column; gap: 3px; padding: 6px 10px; font-size: 10px; }
  .sidebar-item::before { display: none; }
  .sidebar-label { opacity: 1; transform: none; font-size: 10px; transition: none; }
  .sidebar-footer { flex-direction: row; border-top: none; padding: 0; margin: 0; }

  .grid-cols-2  { grid-template-columns: 1fr; }
  .grid-cols-3  { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
  .settings-full-width { padding: 20px 20px 80px 20px; }
  .settings-layout { flex-direction: column; min-height: auto; }
  .settings-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--hairline); }
  .settings-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .settings-tab-btn { width: auto; white-space: nowrap; }
  .settings-panels { padding: 20px; }

  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .page-offset { padding-top: 24px; }
}

/* ══════════════════════════════
   DARK MODE SPECIFIC OVERRIDES
══════════════════════════════ */
[data-theme="dark"] .setup-card,
[data-theme="dark"] .card-flat {
  background: var(--surface-2);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 4px 20px rgba(0,0,0,0.4);
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--surface-1);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  background: var(--surface-2);
}

[data-theme="dark"] .btn-secondary { background: var(--surface-3); border-color: var(--hairline-strong); }
[data-theme="dark"] .btn-outline   { border-color: var(--hairline-strong); }

/* ══════════════════════════════
   SETTINGS PANEL ANIMATION
══════════════════════════════ */
@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
