/* ================================================
   RESET & BASE
   ================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --green: #1e8a4a;
  --green-dark: #166638;
  --red: #d93025;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-400: #bdc1c6;
  --gray-600: #80868b;
  --gray-800: #3c4043;
  --gray-900: #202124;

  /* Rating colors */
  --rating-excellent-bg: #e6f4ea;
  --rating-excellent-text: #137333;
  --rating-excellent-border: #ceead6;
  --rating-rtg-bg: #fef7e0;
  --rating-rtg-text: #b06000;
  --rating-rtg-border: #fce8b2;
  --rating-ni-bg: #fce8e6;
  --rating-ni-text: #c5221f;
  --rating-ni-border: #f5c6c4;
  --rating-it-bg: #3c1414;
  --rating-it-text: #ffffff;
  --rating-it-border: #5c1a1a;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .14);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ================================================
   AUTH OVERLAY
   ================================================ */

.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #e8f0fe 0%, #f8f9fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-card {
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  margin-bottom: 20px;
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-card p {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.auth-error {
  margin-top: 16px;
  padding: 10px 14px;
  background: #fce8e6;
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 13px;
  text-align: left;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn-success:hover {
  background: var(--green-dark);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-google {
  background: white;
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
}

.btn-google:hover {
  background: var(--gray-50);
  box-shadow: var(--shadow-md);
}

/* ================================================
   HEADER
   ================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

.user-email {
  font-size: 12px;
  color: var(--gray-600);
}

/* ================================================
   MAIN
   ================================================ */

.main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ================================================
   STEP INDICATOR
   ================================================ */

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 4px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.step-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--gray-300, #dadce0);
  background: white;
  color: var(--gray-400);
  transition: all 0.25s;
  flex-shrink: 0;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  transition: color 0.25s;
  white-space: nowrap;
}

/* Active step */
.step-item.active .step-bubble {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.step-item.active .step-label {
  color: var(--blue);
  font-weight: 600;
}

/* Completed step */
.step-item.completed .step-bubble {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.step-item.completed .step-label {
  color: var(--green);
}

/* Connector line between steps */
.step-connector {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 12px;
  border-radius: 1px;
  transition: background 0.25s;
}

.step-connector.completed {
  background: var(--green);
}

/* ================================================
   CARDS
   ================================================ */

.card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.card h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-subtitle {
  color: var(--gray-600);
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ================================================
   INPUT
   ================================================ */

.input-group {
  display: flex;
  gap: 10px;
}

/* Input wrapper — provides relative context for the dropdown */
.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-search-icon {
  position: absolute;
  left: 12px;
  color: var(--gray-400);
  pointer-events: none;
  z-index: 1;
  flex-shrink: 0;
}

.input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-with-icon {
  padding-left: 38px;
  padding-right: 36px;
}

.input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}

.input::placeholder {
  color: var(--gray-400);
}

/* Clear button inside input */
.input-clear {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: var(--gray-200);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gray-600);
  transition: background 0.15s;
  z-index: 1;
}

.input-clear:hover {
  background: var(--gray-400);
  color: white;
}

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--gray-100);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover,
.search-result:focus {
  background: var(--gray-50);
  outline: none;
}

.search-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #e8f5e9;
  color: #0f9d58;
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-result-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-date {
  font-size: 11px;
  color: var(--gray-600);
}

.search-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--gray-600);
  text-align: center;
}

.search-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--gray-600);
}

/* Selected sheet display (Phase B of Step 1) */
.selected-sheet-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.selected-sheet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e8f5e9;
  color: #0f9d58;
  flex-shrink: 0;
}

.selected-sheet-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-sheet-actions {
  display: flex;
  gap: 10px;
}

/* Back button (top of Step 2) */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border: none;
  background: none;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.btn-back:hover {
  color: var(--blue);
}

.error-message {
  margin-top: 10px;
  color: var(--red);
  font-size: 13px;
}

/* ================================================
   LOADING
   ================================================ */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  gap: 16px;
  color: var(--gray-600);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ================================================
   SUMMARY BAR
   ================================================ */

.summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: white;
  border-radius: var(--radius);
  padding: 18px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.summary-meta h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.export-btn-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.export-doc-ref {
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.export-doc-ref:hover {
  text-decoration: underline;
}

.summary-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.summary-stat {
  font-size: 13px;
  color: var(--gray-600);
}

.sheet-subtitle {
  font-size: 13px;
  color: var(--gray-600);
}

/* ================================================
   RATING BADGES
   ================================================ */

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.rating-badge::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.rating-excellent {
  background: var(--rating-excellent-bg);
  color: var(--rating-excellent-text);
  border-color: var(--rating-excellent-border);
}

.rating-rtg {
  background: var(--rating-rtg-bg);
  color: var(--rating-rtg-text);
  border-color: var(--rating-rtg-border);
}

.rating-ni {
  background: var(--rating-ni-bg);
  color: var(--rating-ni-text);
  border-color: var(--rating-ni-border);
}

.rating-it {
  background: var(--rating-it-bg);
  color: var(--rating-it-text);
  border-color: var(--rating-it-border);
}

/* ================================================
   SELF-REFLECTION & RECOMMENDATIONS (collapsible)
   ================================================ */

.self-reflection {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.self-reflection-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.self-reflection-toggle::-webkit-details-marker {
  display: none;
}

.self-reflection-toggle::after {
  content: '▾';
  margin-left: auto;
  font-size: 16px;
  color: var(--gray-600);
  transition: transform 0.2s;
}

details[open] .self-reflection-toggle::after {
  transform: rotate(180deg);
}

.self-reflection-body {
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reflection-item {}

.reflection-question {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.reflection-answer {
  font-size: 14px;
  color: var(--gray-900);
  line-height: 1.6;
}

.recommendation-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}

.recommendation-item:last-child {
  border-bottom: none;
}

.rec-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rec-name {
  font-weight: 600;
  font-size: 14px;
}

.rec-comment {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.6;
}

/* ================================================
   TAB PANEL (unified nav + content)
   ================================================ */

.tab-panel {
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tab-nav-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.tab-nav {
  display: flex;
  gap: 0;
  padding: 8px 8px 0;
  min-width: max-content;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: -1px;
  background: transparent;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
}

.tab-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.tab-btn.active {
  background: white;
  color: var(--blue);
  font-weight: 600;
  border-bottom-color: var(--blue);
}

/* Score dot on each tab */
.tab-score {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tab-score.rating-excellent {
  background: var(--rating-excellent-text);
}

.tab-score.rating-rtg {
  background: var(--rating-rtg-text);
}

.tab-score.rating-ni {
  background: var(--rating-ni-text);
}

.tab-score.rating-it {
  background: var(--rating-it-text);
}

/* ================================================
   TAB CONTENT
   ================================================ */

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  background: white;
}

/* Value definition card (accordion) */
.value-definition {
  background: white;
  border-radius: var(--radius-sm);
  padding: 0;
  border: 1px solid var(--gray-200);
}

.value-definition-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.value-definition-summary::-webkit-details-marker {
  display: none;
}

.value-def-chevron {
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform 0.2s;
}

.value-definition[open] .value-def-chevron {
  transform: rotate(180deg);
}

.value-definition-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--gray-100);
  margin-top: 0;
  padding-top: 16px;
}

.value-definition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.value-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

.value-average {
  display: flex;
  align-items: center;
  gap: 8px;
}

.value-score-number {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}

.value-why {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.65;
  margin-bottom: 12px;
  font-style: italic;
}

.value-why-label {
  font-style: normal;
  font-weight: 600;
  color: var(--gray-900);
}

.value-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.value-bullets li {
  font-size: 13px;
  color: var(--gray-700, #5f6368);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.value-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

/* ================================================
   RESPONSE GROUPS
   ================================================ */

.response-group {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.response-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.response-group-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
}

.response-group-avg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-600);
}

.response-list {
  display: flex;
  flex-direction: column;
}

/* ================================================
   RESPONSE CARDS
   ================================================ */

.response-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  align-items: flex-start;
}

.response-card:last-child {
  border-bottom: none;
}

.response-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Avatar colors by role */
.response-avatar.manager {
  background: #1a73e8;
}

.response-avatar.peer {
  background: #0f9d58;
}

.response-avatar.self {
  background: #f4511e;
}

.response-body {}

.response-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.response-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-badge.manager {
  background: #e8f0fe;
  color: #1a73e8;
}

.role-badge.peer {
  background: #e6f4ea;
  color: #0f9d58;
}

.role-badge.self {
  background: #fce8e6;
  color: #c5221f;
}

.response-comment {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.65;
}

.response-no-comment {
  font-size: 13px;
  color: var(--gray-400);
  font-style: italic;
}

/* ================================================
   GENERIC RESULTS (stats + column cards)
   ================================================ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-align: center;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 4px;
}

.column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.column-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.column-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.column-name {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.type-badge.numeric {
  background: #e8f0fe;
  color: #1a73e8;
}

.type-badge.text {
  background: #e6f4ea;
  color: #137333;
}

.column-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.column-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.column-stat-label {
  color: var(--gray-600);
}

.column-stat-value {
  font-weight: 500;
}

.sample-values {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
  word-break: break-word;
}

/* ================================================
   SUCCESS BANNER
   ================================================ */

.success-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #e6f4ea;
  border: 1px solid #ceead6;
  border-radius: var(--radius-sm);
  color: var(--green-dark);
  font-size: 14px;
}

.success-banner svg {
  flex-shrink: 0;
  color: var(--green);
}

.success-banner a {
  color: var(--blue);
  font-weight: 500;
}

/* ================================================
   REVIEWER ASSESSMENT CARD
   ================================================ */

.reviewer-assessment {
  background: #f0f4ff;
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid #d0e1fd;
  border-left: 4px solid var(--blue);
}

.reviewer-assessment-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 14px;
}

.reviewer-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  align-items: start;
}

.reviewer-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  padding-top: 7px;
  white-space: nowrap;
}

.reviewer-score-select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: white;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: auto;
  max-width: 260px;
}

.reviewer-score-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}

.reviewer-notes-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
  line-height: 1.55;
}

.reviewer-notes-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}

/* ================================================
   SUMMARY TAB
   ================================================ */

.summary-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  border: 1px solid var(--gray-200);
}

.summary-card-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.general-notes-textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  resize: vertical;
  background: var(--gray-50);
  line-height: 1.5;
}

.general-notes-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
  background: white;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.summary-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  padding: 0 16px 10px 0;
  border-bottom: 2px solid var(--gray-200);
}

.summary-table td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.summary-table tr:last-child td {
  border-bottom: none;
}

.summary-table-value {
  font-weight: 600;
  color: var(--gray-900);
}

.summary-table-num {
  color: var(--gray-600);
}

.summary-notes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-notes-item {}

.summary-notes-value {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.summary-notes-text {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.65;
}

.chart-container {
  height: 380px;
  position: relative;
}

/* Inline inputs inside the Summary table */
.summary-score-select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: white;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  max-width: 200px;
}

.summary-score-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}

.summary-notes-input {
  width: 100%;
  min-width: 160px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  background: white;
}

.summary-notes-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 640px) {
  .header {
    padding: 0 16px;
  }

  .user-details {
    display: none;
  }

  .main {
    padding: 16px 16px 40px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .input-group {
    flex-direction: column;
  }

  .summary-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .column-grid {
    grid-template-columns: 1fr;
  }
}