/* ===================================================== */
/* COLOR SYSTEM (SINGLE SOURCE OF TRUTH) */
/* ===================================================== */

:root {
  --score-a-bg: #2e7d32;
  --score-a-fg: #ffffff;

  --score-b-bg: #9acd32;
  --score-b-fg: #2f4f00;

  --score-c-bg: #fbc02d;
  --score-c-fg: #000000;

  --score-d-bg: #fb8c00;
  --score-d-fg: #ffffff;

  --score-e-bg: #c62828;
  --score-e-fg: #ffffff;
}

/* ===================================================== */
/* LAYOUT */
/* ===================================================== */

#reviews_block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#reviews_block > * {
  width: 90%;
}

#worker_block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 60%;
  margin: 0 auto 20px auto;
}

#worker_left,
#worker_right {
  display: flex;
  gap: 10px;
}

#worker_center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#worker_right button,
#worker_center button {
  height: 42px;
  padding: 8px 14px;
  font-size: 15px;
}

label {
  margin-right: 6px;
  font-weight: bold;
}

/* ===================================================== */
/* FOLDER / TABS */
/* ===================================================== */

.folder .data-tabs {
  display: flex;
  gap: 10px;
  padding-left: 10px;
  margin-bottom: -5px;
  width: 90%;
}

.folder .data-tab {
  padding: 10px 22px;
  background: #e6e6e6;
  border: 2px solid #555;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
  color: #333;
}

.folder .data-tab:hover:not(.active) {
  background: #dcdcdc;
}

.folder .data-tab.active {
  background: #ffffff;
  z-index: 2;
}

.folder .data-content {
  border: 2px solid #555;
  border-radius: 0 10px 10px 10px;
  padding: 20px;
  background: #fff;
  position: relative;
  z-index: 1;
}

/* ===================================================== */
/* PANELS */
/* ===================================================== */

.review_section {
  display: none;
}

.review_section.active {
  display: block;
}

/* ===================================================== */
/* FORMS */
/* ===================================================== */

.review-form {
  width: 90%;
  margin: 0 auto;
  display: grid;
  row-gap: 18px;
}

.review-row {
  display: grid;
  grid-template-columns: 160px 1fr 160px 1fr;
  column-gap: 14px;
  align-items: center;
}

.review-row label {
  text-align: right;
  font-weight: bold;
}

.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  height: 36px;
  padding: 6px 8px;
  font-size: 15px;
  box-sizing: border-box;
}

.review-form textarea {
  height: auto;
  resize: vertical;
}

/* ===================================================== */
/* DISABLED STATES */
/* ===================================================== */

.review-form input:disabled,
.review-form select:disabled,
.review-form textarea:disabled,
#worker_block button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.review-selector {
  width: 100%;
  height: 36px;
  padding: 6px 8px;
  font-size: 15px;
  box-sizing: border-box;
}

/* ===================================================== */
/* SCORE FRAMES */
/* ===================================================== */

.score-frame {
  border: 2px solid #444;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  background: #fafafa;
}

.score-title {
  font-weight: bold;
  font-size: 18px;
  text-align: center;
  margin-bottom: 6px;
}

.score-subtitle {
  font-size: 14px;
  text-align: center;
  color: #555;
  margin-bottom: 12px;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.score-header select {
  padding: 6px 10px;
  font-size: 14px;
}

.score-value {
  font-weight: bold;
  font-size: 16px;
}

/* ===================================================== */
/* SCORE OPTIONS */
/* ===================================================== */

.score-options {
  border-top: 1px solid #ccc;
  margin-top: 12px;
}

.score-option {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid #ccc;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.score-option-letter {
  font-weight: bold;
  width: 20px;
}

.score-option.active {
  font-weight: bold;
  border-left: 6px solid rgba(0, 0, 0, 0.25);
}

/* ===================================================== */
/* SCORE COLORS — CONSISTENT TEXT COLOR */
/* ===================================================== */

.score-A {
  background-color: #c8e6c9;
  color: #1a1a1a;
}

.score-B {
  background-color: #e6f4b2;
  color: #1a1a1a;
}

.score-C {
  background-color: #fff3cd;
  color: #1a1a1a;
}

.score-D {
  background-color: #ffe0b2;
  color: #1a1a1a;
}

.score-E {
  background-color: #f8d7da;
  color: #1a1a1a;
}

#review_worker_score,
#review_worker_score_range {
  text-align: center;
  font-weight: bold;
  color: #1a1a1a;
  padding: 6px 8px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

#review_worker_score.range-deficiente,
#review_worker_score_range.range-deficiente {
  background-color: #f8d7da;
}

#review_worker_score.range-regular,
#review_worker_score_range.range-regular {
  background-color: #ffe0b2;
}

#review_worker_score.range-bueno,
#review_worker_score_range.range-bueno {
  background-color: #fff3cd;
}

#review_worker_score.range-muy-bueno,
#review_worker_score_range.range-muy-bueno {
  background-color: #e6f4b2;
}

#review_worker_score.range-excepcional,
#review_worker_score_range.range-excepcional {
  background-color: #c8e6c9;
}

.score-frame.locked {
  pointer-events: none;
  opacity: 0.6;
}

#review_score {
  max-height: 70vh;
  overflow-y: auto;
}