/* ============================================================
   FutureGo Resume Review & Edit Center — 深蓝/金色/玻璃风格
   R1-B: Confirmed Resume Review Center v1
   ============================================================ */

/* ── Overlay ───────────────────────────────────────────────── */
.rrc-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 8, 22, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rrcFadeIn 0.25s ease;
}

@keyframes rrcFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal Container ───────────────────────────────────────── */
.rrc-modal {
  width: min(900px, 95vw);
  max-height: 90vh;
  background: linear-gradient(135deg,
    rgba(15, 20, 45, 0.95) 0%,
    rgba(10, 15, 35, 0.97) 50%,
    rgba(15, 20, 45, 0.95) 100%
  );
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  box-shadow:
    0 0 60px rgba(212, 175, 55, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rrcSlideUp 0.3s ease;
}

@keyframes rrcSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ────────────────────────────────────────────────── */
.rrc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  flex-shrink: 0;
}

.rrc-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rrc-header-icon {
  font-size: 28px;
  line-height: 1;
}

.rrc-header-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f0e6c5;
  letter-spacing: 0.02em;
}

.rrc-header-subtitle {
  font-size: 0.78rem;
  color: rgba(240, 230, 197, 0.45);
  margin-top: 2px;
}

.rrc-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.rrc-close-btn:hover {
  background: rgba(255, 60, 60, 0.15);
  border-color: rgba(255, 60, 60, 0.3);
  color: #ff6b6b;
}

/* ── PDF link in header ─────────────────────────────────────── */
.rrc-header-pdf-row {
  margin-top: 6px;
}

.rrc-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.07);
  color: #f5d76e;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  vertical-align: middle;
  transition: all 0.2s;
}

.rrc-pdf-link:hover {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.13);
  color: #ffe28a;
}

.rrc-pdf-link-icon {
  flex: 0 0 auto;
  font-size: 14px;
}

.rrc-pdf-link-name {
  min-width: 0;
  max-width: min(400px, 50vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rrc-pdf-link-open {
  opacity: 0.7;
  flex: 0 0 auto;
  font-size: 13px;
}

.rrc-pdf-link-dimmed {
  opacity: 0.45;
  cursor: default;
  font-weight: 400;
  border-color: rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.4);
}

.rrc-pdf-link-dimmed:hover {
  border-color: rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 640px) {
  .rrc-pdf-link-name {
    max-width: 50vw;
  }
}

/* ── Tabs ──────────────────────────────────────────────────── */
.rrc-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rrc-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}

.rrc-tab:hover {
  color: rgba(255, 255, 255, 0.75);
}

.rrc-tab.active {
  color: #d4af37;
  border-bottom-color: #d4af37;
}

/* ── Body (scrollable) ─────────────────────────────────────── */
.rrc-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 100px 28px; /* bottom padding for fixed footer */
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.2) transparent;
}

.rrc-body::-webkit-scrollbar {
  width: 5px;
}

.rrc-body::-webkit-scrollbar-track {
  background: transparent;
}

.rrc-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 3px;
}

/* ── Section Panel ─────────────────────────────────────────── */
.rrc-section-panel {
  display: none;
  animation: rrcFadeIn 0.2s ease;
}

.rrc-section-panel.active {
  display: block;
}

.rrc-section-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.rrc-section-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ── Item Card ─────────────────────────────────────────────── */
.rrc-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
  position: relative;
}

.rrc-item-card:hover {
  border-color: rgba(212, 175, 55, 0.15);
}

.rrc-item-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.rrc-item-index {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(212, 175, 55, 0.7);
  letter-spacing: 0.05em;
}

.rrc-item-delete {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 60, 60, 0.15);
  background: rgba(255, 60, 60, 0.05);
  color: rgba(255, 100, 100, 0.7);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rrc-item-delete:hover {
  background: rgba(255, 60, 60, 0.2);
  border-color: rgba(255, 60, 60, 0.4);
  color: #ff6b6b;
}

/* ── Field Grid ────────────────────────────────────────────── */
.rrc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rrc-fields.single-col {
  grid-template-columns: 1fr;
}

.rrc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rrc-field.full-width {
  grid-column: 1 / -1;
}

.rrc-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rrc-field input,
.rrc-field textarea,
.rrc-field select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e8e0c5;
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.rrc-field input:focus,
.rrc-field textarea:focus,
.rrc-field select:focus {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.rrc-field input::placeholder,
.rrc-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.rrc-field textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

/* ── Flat Skills (textarea only) ───────────────────────────── */
.rrc-skills-flat {
  width: 100%;
}

.rrc-skills-flat textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e8e0c5;
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.rrc-skills-flat textarea:focus {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.rrc-skills-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 6px;
}

/* ── Add Button ────────────────────────────────────────────── */
.rrc-add-btn-wrap {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 16px;
}

.rrc-add-btn {
  padding: 10px 28px;
  border-radius: 25px;
  border: 1px dashed rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.05);
  color: rgba(212, 175, 55, 0.8);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.rrc-add-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.5);
  color: #d4af37;
}

/* ── Footer ────────────────────────────────────────────────── */
.rrc-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 28px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  background: linear-gradient(180deg,
    rgba(15, 20, 45, 0.6) 0%,
    rgba(10, 15, 35, 0.98) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.rrc-footer-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  flex: 1;
}

.rrc-save-btn {
  padding: 12px 36px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg, #d4af37, #b8960f);
  color: #0a0f23;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.rrc-save-btn:hover {
  background: linear-gradient(135deg, #e2c04d, #c9a415);
  box-shadow: 0 6px 28px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.rrc-save-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.rrc-save-btn:disabled:hover {
  background: linear-gradient(135deg, #d4af37, #b8960f);
  box-shadow: none;
  transform: none;
}

/* ── Success / Error Banner ────────────────────────────────── */
.rrc-banner {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  animation: rrcFadeIn 0.25s ease;
}

.rrc-banner-success {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #d4af37;
}

.rrc-banner-error {
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.2);
  color: #ff6b6b;
}

.rrc-banner-warning {
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.2);
  color: #ffa500;
}

/* ── Review Entry Button (inside wfParseStatus) ────────────── */
.wf-review-btn-wrap {
  margin-top: 10px;
}

.wf-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 25px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.1) 0%,
    rgba(212, 175, 55, 0.05) 100%
  );
  color: #f0e6c5;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s;
  letter-spacing: 0.02em;
}

.wf-review-btn:hover {
  background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.22) 0%,
    rgba(212, 175, 55, 0.1) 100%
  );
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
  transform: translateY(-1px);
}

.wf-review-btn-icon {
  font-size: 1.1em;
}

.wf-review-hint {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 6px;
  line-height: 1.4;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .rrc-modal {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .rrc-header {
    padding: 16px 20px;
  }

  .rrc-body {
    padding: 16px 20px 100px 20px;
  }

  .rrc-footer {
    padding: 12px 20px;
    flex-direction: column;
    gap: 10px;
  }

  .rrc-footer-hint {
    text-align: center;
  }

  .rrc-save-btn {
    width: 100%;
    text-align: center;
  }

  .rrc-fields {
    grid-template-columns: 1fr;
  }

  .rrc-tabs {
    padding: 0 8px;
  }

  .rrc-tab {
    padding: 10px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .rrc-header-title {
    font-size: 1.05rem;
  }

  .rrc-item-card {
    padding: 14px;
  }
}
