/* ============================================================
   Career HQ — Main Stylesheet
   ============================================================ */

/* Variables */
:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --surface2: #24243a;
  --border: #2a2a3a;
  --accent: #6c63ff;
  --accent-dim: rgba(108,99,255,0.15);
  --teal: #00d4aa;
  --teal-dim: rgba(0,212,170,0.12);
  --gold: #f5a623;
  --gold-dim: rgba(245,166,35,0.12);
  --text: #e8e8f0;
  --muted: #6b6b8a;
  --danger: #ff4757;
  --warning: #ffa502;
  --radius: 12px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  height: 56px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.nav-tabs {
  display: flex;
  gap: 0.25rem;
}

.nav-tab {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-tab--active {
  color: var(--text);
  background: var(--accent-dim);
  font-weight: 500;
}

/* ============================================================
   Layout
   ============================================================ */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.main {
  padding-top: 80px;
  padding-bottom: 3rem;
  min-height: 100vh;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface2);
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
}

.btn-danger {
  background: var(--danger);
}

.btn-teal {
  background: var(--teal);
  color: #0f0f13;
}

/* ============================================================
   Forms
   ============================================================ */
.label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.input,
.textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

select.input {
  cursor: pointer;
}

.form-row {
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-purple {
  background: rgba(108,99,255,0.2);
  color: #a89cff;
}

.badge-green {
  background: rgba(0,212,170,0.15);
  color: var(--teal);
}

.badge-yellow {
  background: rgba(255,165,2,0.15);
  color: var(--warning);
}

.badge-red {
  background: rgba(255,71,87,0.15);
  color: var(--danger);
}

.badge-gray {
  background: rgba(255,255,255,0.07);
  color: var(--muted);
}

/* ============================================================
   Grid
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .nav-tab { padding: 0.4rem 0.55rem; font-size: 0.8rem; }
}

/* ============================================================
   Stat Boxes
   ============================================================ */
.stat-box {
  background: var(--surface2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   Section
   ============================================================ */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section + .section {
  margin-top: 2rem;
}

/* ============================================================
   Task Rows
   ============================================================ */
.task-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface2);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: opacity 0.2s;
}

.task-row.done {
  opacity: 0.55;
}

.task-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 90px;
  flex-shrink: 0;
  font-weight: 600;
}

.task-check {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   Pipeline Cards
   ============================================================ */
.pipeline-card {
  background: var(--surface2);
  border-radius: 10px;
  padding: 1rem;
  border-left: 3px solid var(--accent);
  margin-bottom: 0.75rem;
}

.pipeline-card.fulltime {
  border-left-color: var(--teal);
}

.pipeline-card-company {
  font-weight: 600;
  font-size: 0.95rem;
}

.pipeline-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.pipeline-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}

/* ============================================================
   Chat
   ============================================================ */
.chat-wrap {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.chat-msg {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--text);
}

.chat-msg.assistant {
  align-self: flex-start;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ============================================================
   Utility
   ============================================================ */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.text-muted { color: var(--muted); font-size: 0.85rem; }
.text-accent { color: var(--accent); }
.text-teal { color: var(--teal); }

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

.spinner {
  animation: spin 0.8s linear infinite;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 24px;
  height: 24px;
}

/* ============================================================
   Hero / Day Counter
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-day {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -2px;
}

.hero-day span {
  color: var(--accent);
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.hero-theme {
  display: inline-block;
  background: var(--accent-dim);
  color: #a89cff;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 12px;
  border-radius: 999px;
  margin-top: 0.75rem;
}

.hero-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin-top: 1.25rem;
  overflow: hidden;
}

.hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ============================================================
   Action Cards
   ============================================================ */
.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.875rem;
  transition: border-color 0.2s;
}

.action-card:hover {
  border-color: #3a3a5a;
}

.action-card.done {
  opacity: 0.55;
}

.action-card.done .action-title {
  text-decoration: line-through;
  color: var(--muted);
}

.action-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}

.action-check {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.action-cat {
  width: 4px;
  height: 36px;
  border-radius: 999px;
  flex-shrink: 0;
}

.action-cat.fractional { background: var(--accent); }
.action-cat.fulltime   { background: var(--teal); }
.action-cat.community  { background: var(--gold); }
.action-cat.admin      { background: var(--muted); }

.action-title {
  font-size: 0.975rem;
  font-weight: 600;
  flex: 1;
  line-height: 1.3;
}

.action-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.action-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.action-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-badge.fractional { background: var(--accent-dim); color: #a89cff; }
.action-badge.fulltime   { background: var(--teal-dim);   color: var(--teal); }
.action-badge.community  { background: var(--gold-dim);   color: var(--gold); }
.action-badge.admin      { background: rgba(255,255,255,0.06); color: var(--muted); }

.action-chevron {
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.action-card.expanded .action-chevron {
  transform: rotate(180deg);
}

.action-body {
  display: none;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.action-card.expanded .action-body {
  display: block;
}

.action-why {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.875rem;
  line-height: 1.5;
  font-style: italic;
}

.action-steps {
  margin-top: 1rem;
  list-style: none;
  counter-reset: step;
}

.action-steps li {
  counter-increment: step;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.action-steps li::before {
  content: counter(step);
  width: 22px;
  height: 22px;
  background: var(--surface2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.action-script {
  margin-top: 1rem;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 0.875rem 1rem;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
  position: relative;
}

.action-script.community {
  border-left-color: var(--gold);
}

.action-script.fulltime {
  border-left-color: var(--teal);
}

.action-script.admin {
  border-left-color: var(--muted);
}

.btn-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  background: var(--border);
  color: var(--muted);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

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

.action-target {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.action-target strong {
  color: var(--text);
}

/* ============================================================
   Stats Strip
   ============================================================ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  text-align: center;
}

.stat-chip .num {
  font-size: 1.75rem;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.stat-chip .lbl {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.3rem;
  display: block;
}

.num-purple { color: var(--accent); }
.num-teal   { color: var(--teal); }
.num-gold   { color: var(--gold); }
.num-white  { color: var(--text); }

/* ============================================================
   Section headers
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.section-header a {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
}

.section-header a:hover {
  text-decoration: underline;
}

/* ============================================================
   Screenshots / Records
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-top: 1.5rem;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-zone p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.screenshot-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.screenshot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-thumb-actions {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.screenshot-thumb:hover .screenshot-thumb-actions {
  opacity: 1;
}

.screenshot-thumb-actions a,
.screenshot-thumb-actions button {
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.screenshot-thumb-actions a {
  background: var(--accent);
  color: white;
  text-decoration: none;
}

.screenshot-thumb-actions button {
  background: var(--danger);
  color: white;
}

.screenshot-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
