/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f0fe;
  padding: 24px;
}

.login-card {
  width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* --- Brand Top --- */
.login-brand-top {
  text-align: center;
  padding: 40px 36px 0;
}

.login-logo {
  margin-bottom: 16px;
}

.login-brand-name {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.login-brand-tagline {
  font-size: 13px;
  color: #a0aab4;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

/* --- Form Body --- */
.login-form-body {
  padding: 28px 36px 36px;
}

.login-field {
  margin-bottom: 16px;
}

.login-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #e2e6ec;
  border-radius: 10px;
  background: #f9fafb;
  color: #333;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22,119,255,0.08);
  background: #fff;
}

.login-input::placeholder {
  color: #ccc;
}

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.login-check {
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.login-link {
  font-size: 13px;
  color: #1677ff;
  text-decoration: none;
}

.login-link:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 11px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #1677ff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 18px;
}

.login-btn:hover {
  background: #4096ff;
}

.login-divider {
  text-align: center;
  margin-bottom: 18px;
  position: relative;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #eef0f4;
}

.login-divider span {
  position: relative;
  display: inline-block;
  padding: 0 12px;
  background: #fff;
  font-size: 12px;
  color: #bbb;
}

.login-google-btn {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  background: #fff;
  border: 1px solid #e2e6ec;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s;
  margin-bottom: 22px;
}

.login-google-btn:hover {
  background: #f9fafb;
}

.login-signup {
  text-align: center;
  font-size: 13px;
  color: #999;
}

.login-signup a {
  color: #1677ff;
  text-decoration: none;
  font-weight: 500;
}

.login-signup a:hover {
  text-decoration: underline;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #e8f0fe;
  color: #333;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* ===== Header ===== */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 15px;
  color: #888;
  margin-bottom: 14px;
}

.tagline {
  margin-bottom: 28px;
}

.tagline-line {
  display: block;
  color: #5a9ec2;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.tagline-line--last {
  font-size: 17px;
  font-weight: 500;
  padding-left: 28px;
  margin-top: 6px;
}

/* --- Header Actions --- */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 18px;
}

.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #999;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.util-btn:hover {
  color: #555;
  background: rgba(0,0,0,0.04);
}

/* --- Language Toggle --- */
.lang-toggle {
  display: inline-flex;
  gap: 0;
  margin-top: 12px;
  background: #eef0f4;
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn--active {
  background: #fff;
  color: #1677ff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lang-btn:hover:not(.lang-btn--active) {
  color: #555;
}

/* ===== Upload Zone ===== */
.upload-section {
  text-align: center;
}

.upload-zone {
  border: 2px dashed #c0c8d4;
  border-radius: 12px;
  padding: 48px 24px;
  background: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 16px;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #1677ff;
  background: #f0f5ff;
}

.upload-zone.drag-over {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1);
}

.upload-icon {
  margin-bottom: 12px;
}

.upload-text {
  font-size: 16px;
  color: #555;
  margin-bottom: 6px;
}

.upload-link {
  color: #1677ff;
  font-weight: 500;
}

.upload-hint {
  font-size: 13px;
  color: #aaa;
}

/* ===== File Info ===== */
.file-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #e8f4e8;
  border: 1px solid #b7d7b7;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.file-icon {
  font-size: 16px;
}

.file-name {
  color: #333;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s;
}

.btn-remove:hover {
  color: #ff4d4f;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 36px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #1677ff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 180px;
}

.btn-primary:hover:not(:disabled) {
  background: #4096ff;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.btn-primary:disabled {
  background: #b0c4de;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  font-size: 15px;
  color: #1677ff;
  background: #fff;
  border: 1px solid #1677ff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f0f5ff;
}

/* ===== Loading ===== */
.loading-section {
  text-align: center;
  padding: 48px 20px 60px;
  max-width: 480px;
  margin: 0 auto;
}

/* --- Spinner --- */
.loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid #e8e8e8;
  border-top: 4px solid #1677ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 28px;
}

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

/* --- Tip --- */
.loading-tip {
  font-size: 15px;
  font-weight: 500;
  color: #444;
  margin-bottom: 36px;
  min-height: 22px;
  transition: opacity 0.4s;
}

/* --- Steps --- */
.loading-steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.3s, background 0.3s;
}

/* Pending */
.loading-step--pending {
  color: #c0c0c0;
}

/* Current */
.loading-step--active {
  color: #1677ff;
  background: #f0f5ff;
  font-weight: 500;
}

/* Done */
.loading-step--done {
  color: #22c55e;
}

/* Step icon */
.loading-step-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 50%;
  transition: all 0.3s;
}

.loading-step--pending .loading-step-icon {
  background: #f0f0f0;
  color: #ccc;
}

.loading-step--active .loading-step-icon {
  background: #1677ff;
  color: #fff;
  animation: pulse-icon 1.2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,119,255,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(22,119,255,0); }
}

.loading-step--done .loading-step-icon {
  background: #dcfce7;
  color: #22c55e;
}

/* ===== Dashboard: 4 Modules ===== */
.dashboard { max-width: 960px; margin: 0 auto; }

/* Module Card */
.m2-card, .m3-card, .m4-card {
  background: #fff; border: 1px solid #eef0f4; border-radius: 16px;
  padding: 28px 30px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.m-title {
  font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.m-title::before { content: ''; display: inline-block; width: 4px; height: 18px; border-radius: 2px; background: #3b82f6; flex-shrink: 0; }

/* ═══ M1: Hero ═══ */
.m1-hero { text-align: center; margin-bottom: 20px; }

.m1-score-ring {
  position: relative; width: 120px; height: 120px; margin: 0 auto 16px;
}
.m1-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.m1-ring-bg { fill: none; stroke: #eef0f4; stroke-width: 6; }
.m1-ring-fill { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1.2s ease; }
.m1-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.m1-score-num { font-size: 36px; font-weight: 700; line-height: 1; color: #1a1a2e; }
.m1-score-max { font-size: 12px; color: #999; }
.m1-grade { font-size: 14px; font-weight: 600; color: #1677ff; margin-top: 4px; }
.m1-stars { color: #f59e0b; font-size: 16px; letter-spacing: 2px; margin: 4px 0 8px; }
.m1-subtitle { font-size: 12px; color: #999; margin-bottom: 16px; }

.m1-verdict-card {
  background: #fff; border: 1px solid #eef0f4; border-radius: 14px; padding: 20px 24px;
  text-align: left; max-width: 640px; margin: 0 auto 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.m1-verdict-line { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.m1-verdict-reason { font-size: 13px; color: #22c55e; margin-bottom: 6px; line-height: 1.6; }
.m1-verdict-concern { font-size: 13px; color: #ef4444; line-height: 1.6; }

.m1-compete { display: flex; justify-content: center; gap: 32px; margin: 0 auto 20px; max-width: 640px; }
.m1-compete-item { text-align: center; }
.m1-compete-val { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.m1-compete-label { font-size: 11px; color: #999; }
.m1-compete-boost { color: #22c55e; }

.m1-prob-row { display: flex; justify-content: center; gap: 24px; margin-top: 16px; }
.m1-prob-card { text-align: center; flex: 1; max-width: 120px; padding: 12px; background: #fafafa; border-radius: 10px; }
.m1-prob-val { font-size: 24px; font-weight: 700; }
.m1-prob-label { font-size: 11px; color: #888; margin-top: 2px; }

/* ═══ M2: Advantages + Risks ═══ */
.m2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.m2-col-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.m2-col-title--adv { color: #166534; }
.m2-col-title--risk { color: #991b1b; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-adv { padding: 4px 12px; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-radius: 20px; font-size: 12px; font-weight: 500; }
.tag-risk { padding: 4px 12px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 20px; font-size: 12px; font-weight: 500; }

.risk-viz { margin-top: 20px; }
.risk-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 12px; }
.risk-item:last-child { border-bottom: none; }
.risk-icon { font-size: 14px; flex-shrink: 0; }
.risk-name { width: 80px; font-weight: 600; color: #333; flex-shrink: 0; }
.risk-bar { flex: 1; height: 4px; background: #eef0f4; border-radius: 2px; overflow: hidden; }
.risk-bar-fill { height: 100%; border-radius: 2px; }
.risk-reason { color: #999; font-size: 11px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══ M3: Interview ═══ */
.m3-path { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; padding: 12px 16px; background: #fafafa; border-radius: 10px; font-size: 11px; }
.m3-path-step { padding: 4px 10px; background: #fff; border: 1px solid #eef0f4; border-radius: 6px; color: #555; white-space: nowrap; }
.m3-path-arrow { color: #ccc; }

.m3-accordion { margin-bottom: 24px; }
.m3-acc-item { border: 1px solid #f0f0f0; border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.m3-acc-header { padding: 12px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: #333; background: #fafafa; user-select: none; }
.m3-acc-header:hover { background: #f5f5f5; }
.m3-acc-stars { color: #f59e0b; font-size: 11px; margin-right: 8px; }
.m3-acc-body { display: none; padding: 12px 16px; font-size: 12px; color: #666; line-height: 1.6; border-top: 1px solid #f0f0f0; }
.m3-acc-body.open { display: block; }
.m3-acc-meta { display: flex; gap: 16px; margin-top: 6px; font-size: 11px; color: #999; }

/* ═══ M4: Optimization ═══ */
.m4-priority { margin-bottom: 20px; }
.m4-p-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
.m4-p-item:last-child { border-bottom: none; }
.m4-p-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; width: 80px; flex-shrink: 0; }
.m4-p-action { flex: 1; color: #333; }
.m4-p-boost { color: #22c55e; font-weight: 600; white-space: nowrap; }
.m4-p-summary { text-align: right; font-size: 14px; font-weight: 700; color: #22c55e; padding-top: 10px; }

.m4-rewrite { margin-bottom: 20px; }
.m4-rw-item { padding: 14px; background: #fafafa; border-radius: 10px; border: 1px solid #f0f0f0; margin-bottom: 10px; }
.m4-rw-meta { font-size: 11px; color: #999; margin-bottom: 6px; }
.m4-rw-old { font-size: 12px; color: #aaa; text-decoration: line-through; margin-bottom: 6px; }
.m4-rw-new { font-size: 13px; color: #1a1a2e; line-height: 1.6; padding: 8px 12px; background: #f0fdf4; border-radius: 8px; border: 1px solid #bbf7d0; margin-bottom: 8px; }
.m4-rw-btns { display: flex; gap: 6px; }
.m4-btn { padding: 4px 12px; font-size: 11px; border: 1px solid #e2e6ec; border-radius: 6px; cursor: pointer; background: #fff; color: #888; }
.m4-btn:hover { border-color: #1677ff; color: #1677ff; }

.m4-before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.m4-ba-col { padding: 14px; border-radius: 10px; font-size: 12px; }
.m4-ba-col--before { background: #fef2f2; border: 1px solid #fecaca; }
.m4-ba-col--after { background: #f0fdf4; border: 1px solid #bbf7d0; }
.m4-ba-label { font-weight: 700; font-size: 11px; margin-bottom: 6px; }
.m4-ba-label--before { color: #dc2626; }
.m4-ba-label--after { color: #16a34a; }

.m4-checklist { }
.m4-cl-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: #555; cursor: pointer; }
.m4-cl-item.done { color: #22c55e; text-decoration: line-through; }
.m4-cl-check { width: 18px; height: 18px; border: 2px solid #ddd; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; flex-shrink: 0; transition: all 0.2s; }
.m4-cl-item.done .m4-cl-check { background: #22c55e; border-color: #22c55e; }

/* --- Actions --- */
.dash-actions { text-align: center; padding: 16px 0 40px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .m2-grid, .m4-before-after { grid-template-columns: 1fr; }
  .m1-compete { flex-wrap: wrap; gap: 16px; }
  .m1-prob-row { flex-wrap: wrap; gap: 12px; }
  .login-card { width: calc(100vw - 48px); max-width: 420px; }
  .header h1 { font-size: 24px; }
  .upload-zone { padding: 32px 16px; }
}

/* ===== Error ===== */
.error-section {
  text-align: center;
  padding: 40px 0;
}

.error-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 10px;
  padding: 16px 24px;
  margin-bottom: 20px;
  max-width: 500px;
}

.error-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.error-text {
  font-size: 14px;
  color: #ff4d4f;
  text-align: left;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .login-card {
    width: calc(100vw - 48px);
    max-width: 420px;
  }

  .dash-hero {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .dash-score-ring {
    width: 120px;
    height: 120px;
  }

  .ring-value {
    font-size: 32px;
  }

  .dash-two-col {
    grid-template-columns: 1fr;
  }

  .score-explain-lists {
    grid-template-columns: 1fr;
  }

  .hr-details {
    grid-template-columns: 1fr;
  }

  .skill-name {
    width: 100px;
    font-size: 12px;
  }

  .header h1 {
    font-size: 24px;
  }

  .upload-zone {
    padding: 32px 16px;
  }
}
