/* ================================================================
   投递追踪 · 暗色科技风主题  (Cyberpunk / Tech UI)
   ================================================================ */

/* ==================== Reset & Variables ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core palette - dark tech */
  --bg-deep:      #0a0e17;
  --bg-surface:   #111827;
  --bg-card:      #161c2a;
  --bg-card-hover:#1c2338;
  --bg-elevated:  #1e293b;

  /* Accent - cyan/neon */
  --accent:       #00e5ff;
  --accent-dim:   #00b8d4;
  --accent-glow:  rgba(0,229,255,0.25);
  --accent-soft:  rgba(0,229,255,0.08);

  /* Secondary accent - purple */
  --purple:       #a855f7;
  --purple-glow:  rgba(168,85,247,0.25);
  --purple-soft:  rgba(168,85,247,0.1);

  /* Status colors (neon variants) */
  --green:        #00e676;
  --green-glow:   rgba(0,230,118,0.25);
  --green-soft:   rgba(0,230,118,0.08);
  --orange:       #ff9100;
  --orange-glow:  rgba(255,145,0,0.25);
  --orange-soft:  rgba(255,145,0,0.08);
  --red:          #ff3d71;
  --red-glow:     rgba(255,61,113,0.25);
  --red-soft:     rgba(255,61,113,0.08);

  /* Text */
  --text:         #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:   #64748b;
  --text-dim:     #475569;

  /* Borders */
  --border:       #1e293b;
  --border-light: #334155;
  --border-glow:  rgba(0,229,255,0.2);

  /* Radii */
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    6px;

  /* Shadows */
  --shadow:       0 1px 3px rgba(0,0,0,0.4);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.5);
  --glow-sm:      0 0 8px var(--accent-glow);
  --glow-md:      0 0 16px var(--accent-glow);
  --glow-lg:      0 0 32px var(--accent-glow);

  --transition:   0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ==================== Base ==================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow-x: hidden;
}

/* Tech grid background */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(0,229,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* Selection */
::selection { background: var(--accent-glow); color: #fff; }

/* ==================== Header ==================== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px 10px;
  backdrop-filter: blur(16px);
}
.header::after {
  content: '';
  position: absolute; bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}
.header-top {
  display: flex; justify-content: space-between; align-items: center;
}
.logo {
  font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, #38bdf8 40%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}
.header-actions { display: flex; gap: 8px; align-items: center; }
.btn-icon {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-icon:hover {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.stats-bar {
  display: flex; gap: 10px; margin-top: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.stats-bar::-webkit-scrollbar { display: none; }
.stat-chip {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 5px 12px; font-size: 12px;
  white-space: nowrap; display: flex; align-items: center; gap: 4px;
  transition: var(--transition); flex-shrink: 0;
}
.stat-chip:hover { border-color: var(--accent); box-shadow: var(--glow-sm); }
.stat-chip .num { font-weight: 700; font-size: 15px; color: var(--accent); }

/* ==================== Tab Bar ==================== */
.tab-bar {
  display: flex; background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 104px; z-index: 99;
  backdrop-filter: blur(12px);
}
.tab {
  flex: 1; padding: 13px 10px; border: none; background: none;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  position: relative; font-weight: 500; transition: var(--transition);
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); font-weight: 600; }
.tab.active::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 36px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--accent-glow), 0 0 16px var(--accent-glow);
}

/* ==================== Page ==================== */
.page { display: none; padding: 16px 20px 110px; }
.page.active { display: block; animation: pageIn 0.25s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== Filter Bar ==================== */
.filter-bar {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.filter-select, .search-input {
  padding: 9px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px;
  background: var(--bg-card); color: var(--text); outline: none;
  transition: var(--transition); font-family: inherit;
}
.filter-select:focus, .search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 8px var(--accent-glow);
}
.search-input { flex: 1; min-width: 140px; }
.search-input::placeholder { color: var(--text-dim); }
.filter-select { min-width: 100px; }

/* ==================== Job Card ==================== */
.job-list { display: flex; flex-direction: column; gap: 10px; }
.job-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; position: relative;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  overflow: hidden;
}
.job-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x,50%) var(--mouse-y,50%), var(--accent-soft), transparent 40%);
  opacity: 0; transition: opacity 0.3s;
}
.job-card:hover::before { opacity: 1; }
.job-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px var(--border-glow);
  transform: translateY(-1px);
}
.job-card:active { transform: scale(0.99); }

/* Status left-border glow */
.job-card.status-applied       { border-left: 2px solid var(--accent); }
.job-card.status-resume_screening { border-left: 2px solid var(--purple); }
.job-card.status-written_test  { border-left: 2px solid #f472b6; }
.job-card.status-interview_1   { border-left: 2px solid var(--orange); }
.job-card.status-interview_2   { border-left: 2px solid #fb923c; }
.job-card.status-interview_3   { border-left: 2px solid var(--red); }
.job-card.status-final_interview { border-left: 2px solid #ff1744; }
.job-card.status-offer         { border-left: 2px solid var(--green); }
.job-card.status-rejected      { border-left: 2px solid var(--text-dim); opacity: 0.65; }

.job-card-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px;
}
.job-company { font-size: 15px; font-weight: 700; color: var(--text); }
.job-position { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.job-meta {
  display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--text-muted); margin-bottom: 8px;
}
.job-meta span {
  background: var(--bg-elevated); padding: 3px 8px; border-radius: 10px;
  border: 1px solid var(--border);
}
.job-footer { display: flex; justify-content: space-between; align-items: center; }
.wait-days { font-size: 11px; color: var(--text-muted); }
.wait-days.warn  { color: var(--orange); font-weight: 600; }
.wait-days.danger { color: var(--red); font-weight: 600; }

/* ==================== Status Badge ==================== */
.status-badge {
  display: inline-block; padding: 4px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.status-badge.applied          { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(0,229,255,0.2); }
.status-badge.resume_screening { background: var(--purple-soft); color: var(--purple); border: 1px solid rgba(168,85,247,0.2); }
.status-badge.written_test     { background: rgba(244,114,182,0.1); color: #f472b6; border: 1px solid rgba(244,114,182,0.2); }
.status-badge.interview_1      { background: var(--orange-soft); color: var(--orange); border: 1px solid rgba(255,145,0,0.2); }
.status-badge.interview_2      { background: rgba(251,146,60,0.1); color: #fb923c; border: 1px solid rgba(251,146,60,0.2); }
.status-badge.interview_3      { background: var(--red-soft); color: var(--red); border: 1px solid rgba(255,61,113,0.2); }
.status-badge.final_interview  { background: rgba(255,23,68,0.12); color: #ff1744; border: 1px solid rgba(255,23,68,0.25); }
.status-badge.offer            { background: var(--green-soft); color: var(--green); border: 1px solid rgba(0,230,118,0.2); }
.status-badge.rejected         { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }

/* ==================== Priority Dot ==================== */
.priority-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px;
}
.priority-high   { background: var(--red); box-shadow: 0 0 6px var(--red-glow); }
.priority-medium { background: var(--orange); box-shadow: 0 0 6px var(--orange-glow); }
.priority-low    { background: var(--text-dim); }

/* ==================== Empty State ==================== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 15px; }
.empty-hint { font-size: 13px; margin-top: 4px; color: var(--text-dim); }

/* ==================== FAB ==================== */
.fab {
  position: fixed; bottom: 28px; right: 24px;
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #00b8d4 100%);
  color: #0a0e17; border: none; font-size: 26px; cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow), 0 0 40px rgba(0,229,255,0.15);
  z-index: 90; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease; font-weight: 700; line-height: 1;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px var(--accent-glow), 0 0 48px rgba(0,229,255,0.25); }
.fab:active { transform: scale(0.95); }

/* ==================== FAB Menu ==================== */
.fab-menu {
  position: fixed; bottom: 90px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 89; pointer-events: none; opacity: 0;
  transform: translateY(8px); transition: all 0.25s ease;
}
.fab-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fab-sub {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.fab-sub:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--glow-sm); transform: scale(1.1); }

/* ==================== Modal ==================== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(2,4,12,0.8); backdrop-filter: blur(4px);
  z-index: 200; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 500px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px var(--border-glow);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-header h2 { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { border-color: var(--red); color: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.modal-body { padding: 20px; }

/* ==================== Form ==================== */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); background: var(--bg-elevated);
  outline: none; transition: var(--transition); font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 8px var(--accent-glow);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 600; cursor: pointer; border: none;
  transition: var(--transition); font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #00b8d4 100%);
  color: #0a0e17; box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 4px 16px var(--accent-glow), 0 0 24px rgba(0,229,255,0.2); transform: translateY(-1px); }
.btn-danger  { background: linear-gradient(135deg, var(--red) 0%, #d32f2f 100%); color: #fff; }
.btn-danger:hover  { box-shadow: 0 4px 16px var(--red-glow); }
.btn-outline {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.btn-sm  { padding: 6px 12px; font-size: 11px; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }
.form-actions { display: flex; gap: 8px; margin-top: 18px; }

/* ==================== Detail Modal ==================== */
.detail-section { margin-bottom: 18px; }
.detail-section h3 {
  font-size: 12px; color: var(--accent); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.detail-row {
  display: flex; justify-content: space-between;
  padding: 7px 0; font-size: 13px;
}
.detail-row .label { color: var(--text-muted); }
.detail-row .value { font-weight: 500; text-align: right; color: var(--text); }
.detail-link {
  color: var(--accent); text-decoration: none; word-break: break-all; font-size: 12px;
}
.detail-link:hover { text-decoration: underline; text-shadow: 0 0 8px var(--accent-glow); }
.detail-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* Timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, var(--accent), var(--border));
}
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item::before {
  content: ''; position: absolute; left: -18px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px var(--accent-glow);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-date { font-size: 11px; color: var(--text-dim); }
.timeline-desc { font-size: 13px; color: var(--text); margin-top: 2px; }

/* ==================== Stats Page ==================== */
.stats-grid { display: flex; flex-direction: column; gap: 14px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-card h3 { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 5px; }
.funnel-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.funnel-label { width: 60px; text-align: right; color: var(--text-secondary); flex-shrink: 0; }
.funnel-bar-wrap { flex: 1; background: var(--bg-elevated); border-radius: 4px; height: 22px; position: relative; overflow: hidden; }
.funnel-bar {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #00b8d4);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 6px; color: #0a0e17; font-weight: 700; font-size: 11px;
  min-width: 28px; transition: width 0.5s ease;
  box-shadow: 0 0 8px var(--accent-glow);
}
.funnel-count { width: 30px; text-align: left; font-weight: 600; font-size: 13px; flex-shrink: 0; }

/* Industry chart */
.industry-chart { display: flex; flex-wrap: wrap; gap: 8px; }
.industry-tag {
  padding: 5px 12px; border-radius: 14px; font-size: 12px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(0,229,255,0.15); font-weight: 500;
}

/* Channel chart */
.channel-chart { display: flex; flex-direction: column; gap: 6px; }
.channel-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.channel-name { width: 75px; color: var(--text-secondary); flex-shrink: 0; }
.channel-bar-wrap { flex: 1; background: var(--bg-elevated); border-radius: 3px; height: 16px; overflow: hidden; }
.channel-bar { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--purple), #c084fc); transition: width 0.5s ease; }
.channel-count { width: 26px; font-weight: 600; font-size: 12px; flex-shrink: 0; }

/* ==================== Schedule Page ==================== */
.schedule-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 10px;
}
.schedule-title { font-size: 14px; font-weight: 600; color: var(--text); }
.schedule-day {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
}
.schedule-day.today   { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.schedule-day.tomorrow { border-color: var(--purple); box-shadow: 0 0 8px var(--purple-glow); }
.schedule-day-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; font-size: 13px;
}
.schedule-date { font-weight: 600; }
.schedule-count { font-size: 11px; color: var(--accent); font-weight: 600; }
.schedule-empty { color: var(--text-dim); font-size: 12px; padding: 2px 0; }

.interview-card {
  padding: 10px 12px; background: var(--bg-elevated);
  border-radius: var(--radius-sm); margin-bottom: 6px; cursor: pointer;
  transition: var(--transition); border-left: 2px solid var(--accent);
}
.interview-card:hover { background: var(--accent-soft); border-color: var(--accent); }
.interview-card:last-child { margin-bottom: 0; }
.interview-time { font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.interview-company { font-size: 12px; color: var(--text); font-weight: 500; }
.interview-notes { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.section-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; margin-top: 8px; }
.upcoming-section { margin-top: 14px; }
.upcoming-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 6px;
  cursor: pointer; transition: var(--transition);
}
.upcoming-item:hover { border-color: var(--border-light); }
.upcoming-item.urgency-now { border-left: 2px solid var(--red); }
.upcoming-item.urgency-soon { border-left: 2px solid var(--orange); }
.upcoming-left { flex-shrink: 0; }
.upcoming-days {
  display: inline-block; padding: 3px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent);
}
.urgency-now .upcoming-days { background: var(--red-soft); color: var(--red); }
.urgency-soon .upcoming-days { background: var(--orange-soft); color: var(--orange); }
.upcoming-right { flex: 1; font-size: 12px; }
.upcoming-right small { color: var(--text-muted); }

/* ==================== Review Page ==================== */
.review-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  cursor: pointer; transition: var(--transition);
}
.review-card:hover { border-color: var(--border-light); }
.review-card-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px;
}
.review-company { font-size: 14px; font-weight: 700; color: var(--text); }
.review-rating { font-size: 13px; }
.review-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.review-section-label {
  font-size: 11px; font-weight: 600; color: var(--accent); margin-top: 6px; margin-bottom: 2px;
}
.review-text { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* Star rating */
.star-rating { display: flex; gap: 3px; margin-top: 3px; }
.star { font-size: 22px; cursor: pointer; color: var(--border); transition: var(--transition); user-select: none; }
.star.active { color: var(--orange); text-shadow: 0 0 6px var(--orange-glow); }

/* ==================== Info Page ==================== */
.info-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
}
.info-block-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.info-block-header h3 { font-size: 14px; font-weight: 700; color: var(--text); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-item { font-size: 12px; }
.info-label { color: var(--text-dim); display: block; font-size: 10px; margin-bottom: 1px; text-transform: uppercase; }
.info-value { color: var(--text); font-weight: 500; }
.info-card {
  padding: 10px 12px; background: var(--bg-elevated); border-radius: var(--radius-sm);
  margin-bottom: 6px; border: 1px solid var(--border);
}
.info-card-title { font-size: 13px; font-weight: 600; color: var(--text); }
.info-card-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.info-card-desc { font-size: 12px; color: var(--text-secondary); margin-top: 3px; line-height: 1.6; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  padding: 5px 12px; background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(0,229,255,0.15); border-radius: 14px;
  font-size: 12px; font-weight: 500;
}

/* ==================== Extra Small Btn ==================== */
.btn-xs {
  padding: 4px 8px; font-size: 10px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-muted); cursor: pointer; font-family: inherit;
}
.btn-xs:hover { border-color: var(--accent); color: var(--accent); }

/* ==================== Toast ==================== */
.toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elevated); color: var(--accent);
  padding: 10px 22px; border-radius: 20px; font-size: 13px;
  font-weight: 500; opacity: 0; transition: all 0.3s ease;
  z-index: 300; pointer-events: none; white-space: nowrap;
  border: 1px solid var(--border-glow);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== Confirm Dialog ==================== */
.confirm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(2,4,12,0.8); backdrop-filter: blur(4px);
  z-index: 250; align-items: center; justify-content: center; padding: 20px;
}
.confirm-overlay.active { display: flex; }
.confirm-dialog {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  max-width: 320px; width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  animation: modalIn 0.25s ease;
}
.confirm-dialog p { margin-bottom: 14px; font-size: 14px; color: var(--text); }
.confirm-dialog .btn-row { display: flex; gap: 10px; justify-content: center; }

/* ==================== Help / Guide Modal ==================== */
.help-section {
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.help-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.help-section h3 {
  font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.help-section p { font-size: 12px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 6px; }
.help-key {
  display: inline-block; padding: 2px 8px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 4px;
  font-family: inherit; font-size: 11px; font-weight: 600; margin: 0 2px;
  color: var(--accent);
}

/* ==================== Responsive ==================== */

/* ---------- Phone (≤480px) ---------- */
@media (max-width: 480px) {
  /* Body safe area */
  body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0; }

  /* Header */
  .header { padding: 12px 14px 8px; }
  .logo { font-size: 16px; }
  .btn-icon { width: 30px; height: 30px; font-size: 14px; }
  .stat-chip { font-size: 11px; padding: 4px 9px; }
  .stat-chip .num { font-size: 13px; }

  /* Tabs — compact scroll */
  .tab-bar { top: 86px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab { font-size: 12px; padding: 12px 8px; flex: none; min-width: 52px; white-space: nowrap; }
  .tab.active::after { width: 28px; }

  /* Pages */
  .page, .page.active { padding: 12px 14px 100px; }

  /* Filter bar */
  .filter-bar { gap: 6px; }
  .filter-bar .btn-sm { font-size: 11px; padding: 8px 10px; white-space: nowrap; }
  .search-input { flex: 2 1 100%; min-width: unset; }
  .filter-select { flex: 1; min-width: unset; font-size: 12px; padding: 8px 10px; }

  /* Job cards */
  .job-card { padding: 12px 14px; }
  .job-company { font-size: 14px; }
  .job-position { font-size: 12px; }
  .job-meta { font-size: 11px; gap: 4px; }
  .job-meta span { padding: 2px 6px; font-size: 10px; }

  /* Modal — full width */
  .modal-overlay { padding: 8px; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: var(--radius) var(--radius) 0 0; }
  .modal-header { padding: 14px 16px; }
  .modal-header h2 { font-size: 15px; }
  .modal-body { padding: 14px 16px; }

  /* Form */
  .form-row { flex-direction: column; gap: 0; }
  .form-input, .form-select, .form-textarea { font-size: 16px; padding: 12px 14px; } /* 16px prevents iOS zoom */
  .form-label { font-size: 11px; }
  .btn { padding: 12px 16px; font-size: 14px; }
  .btn-block { width: 100%; }
  .btn-row { flex-wrap: wrap; gap: 8px; }
  .btn-row .btn { flex: 1; min-width: 80px; }

  /* FAB */
  .fab { bottom: calc(20px + env(safe-area-inset-bottom)); right: 16px; width: 48px; height: 48px; font-size: 24px; }
  .fab-menu { bottom: calc(76px + env(safe-area-inset-bottom)); right: 16px; gap: 8px; }
  .fab-sub { width: 38px; height: 38px; }

  /* Toast */
  .toast { bottom: 84px; font-size: 12px; padding: 8px 18px; }

  /* Detail actions */
  .detail-actions { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .detail-actions .btn { flex: 1 1 auto; min-width: 60px; padding: 8px 10px; font-size: 11px; }

  /* Stats */
  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .funnel-label { width: 50px; font-size: 11px; }
  .funnel-count { width: 24px; font-size: 12px; }
  .funnel-row { gap: 6px; }

  /* Schedule */
  .schedule-toolbar { flex-wrap: wrap; gap: 8px; justify-content: center; }
  .schedule-toolbar .btn { font-size: 12px; padding: 8px 14px; width: auto; flex: none; }
  .schedule-title { font-size: 13px; }
  .section-title { font-size: 13px; }

  /* Review */
  .review-card { padding: 12px 14px; }

  /* Info page */
  .info-grid { grid-template-columns: 1fr; }
  .skill-tags { gap: 6px; }
  .skill-tag { font-size: 11px; padding: 4px 10px; }

  /* Confirm dialog */
  .confirm-dialog { max-width: 280px; padding: 20px; }

  /* Help modal */
  .help-section h3 { font-size: 13px; }
  .help-section p { font-size: 11px; }
}

/* ---------- Tablet (481–768px) ---------- */
@media (min-width: 481px) and (max-width: 768px) {
  .header { padding: 14px 18px 10px; }
  .page, .page.active { padding: 16px 18px 120px; }
  .modal { max-width: 90%; }
  .filter-bar { flex-wrap: wrap; }
  .search-input { min-width: 180px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Small Desktop (769–1023px) ---------- */
@media (min-width: 769px) {
  .filter-bar { flex-wrap: nowrap; }
  .info-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .funnel-label { width: 70px; }
}

/* ---------- Wide (≥1024px) ---------- */
@media (min-width: 1024px) {
  #app { max-width: 800px; margin: 0 auto; }
  .header { border-radius: 0 0 var(--radius) var(--radius); }
  .tab-bar { border-radius: var(--radius) var(--radius) 0 0; top: 110px; }
  .stats-grid { grid-template-columns: 1fr 1fr 1fr; }
}
