/* ===== Layout ===== */
body { background: #f0f4f8; }

.sidebar {
  background: linear-gradient(180deg, #1a3a5c 0%, #2d6a9f 100%);
  min-height: 100vh;
  width: 240px;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 1.25rem 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.sidebar .brand small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: 400;
  margin-top: 2px;
}
.sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0;
}
.sidebar .nav-link i { width: 18px; text-align: center; }
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: white;
  background: rgba(255,255,255,0.15);
}
.sidebar .nav-divider {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0.5rem 0;
}
.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.main-content {
  margin-left: 240px;
  padding: 2rem;
}

/* ===== Cards ===== */
.card-panel {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

/* ===== Stats ===== */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ===== Table ===== */
.table thead th {
  background: #f8f9fa;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e9ecef;
  padding: 0.875rem 1rem;
}
.table tbody td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
  font-size: 0.9rem;
}

/* ===== Avatar ===== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

/* ===== Badge ===== */
.badge-status {
  font-size: 0.75rem;
  padding: 0.35em 0.75em;
  border-radius: 20px;
  font-weight: 500;
}

/* ===== Form sections ===== */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6c757d;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.required::after { content: " *"; color: #dc3545; }

/* ===== History rows ===== */
.history-row {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.btn-add-row {
  border: 2px dashed #dee2e6;
  background: transparent;
  color: #6c757d;
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add-row:hover { border-color: #1a3a5c; color: #1a3a5c; background: #f0f4f8; }

/* ===== Candidate form (public) ===== */
.form-header {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
  color: white;
  padding: 1.25rem 0;
}
.step-bar { background: white; border-bottom: 1px solid #e9ecef; padding: 0.75rem 0; }
.step { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: #adb5bd; }
.step.active { color: #1a3a5c; font-weight: 600; }
.step.done { color: #198754; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
  background: #e9ecef; color: #6c757d; flex-shrink: 0;
}
.step.active .step-num { background: #1a3a5c; color: white; }
.step.done .step-num { background: #198754; color: white; }
.step-divider { flex: 1; height: 1px; background: #dee2e6; min-width: 12px; }

/* ===== Photo upload ===== */
.photo-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.photo-upload-area:hover { border-color: #1a3a5c; background: #f0f4f8; }
.photo-preview-box {
  width: 120px; height: 160px;
  border-radius: 8px;
  background: #e9ecef;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  overflow: hidden;
}
.photo-preview-box img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px; background: #dee2e6;
}
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot {
  position: absolute;
  left: -1.5rem; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #1a3a5c;
  border: 2px solid white;
  box-shadow: 0 0 0 2px #dee2e6;
}
.timeline-date { font-size: 0.75rem; color: #6c757d; }
.timeline-content { font-size: 0.875rem; }

/* ===== Interview card ===== */
.interview-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-left: 4px solid #1a3a5c;
}

/* ===== Login ===== */
.login-wrap {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
  min-height: 100vh;
  display: flex; align-items: center;
}
.login-header {
  background: linear-gradient(135deg, #1a3a5c, #2d6a9f);
  border-radius: 16px 16px 0 0;
  padding: 2rem; text-align: center; color: white;
}
.login-card { border: none; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }

/* ===== Profile photo ===== */
.profile-photo {
  width: 90px; height: 120px;
  border-radius: 8px;
  background: #dee2e6;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Info label ===== */
.info-label { font-size: 0.75rem; color: #6c757d; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.info-value { font-size: 0.9rem; color: #212529; margin-top: 0.1rem; }

/* ===== Email preview ===== */
.email-preview {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.875rem;
  white-space: pre-wrap;
  line-height: 1.8;
}
.email-preview-header {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

/* ===== Alerts ===== */
.alert { border-radius: 8px; font-size: 0.875rem; }

/* Bootstrap bg-opacity-15 補完 */
.bg-opacity-15 { --bs-bg-opacity: 0.15; }

/* ===== PDF Drop Zone ===== */
.pdf-drop-zone {
  border: 2px dashed #dee2e6;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.pdf-drop-zone:hover,
.pdf-drop-zone.drag-over { border-color: #2d6a9f; background: #f0f4f8; }
.pdf-drop-zone.has-file   { border-color: #198754; background: #f0fff4; }
.pdf-drop-zone input[type="file"] { display: none; }
