/* === Grivalia Performance Planning — Styles === */

:root {
  --navy: #1a365d;
  --navy-light: #2a4a7f;
  --blue: #4299e1;
  --blue-light: #ebf4ff;
  --gold: #c4a35a;
  --green: #38a169;
  --green-light: #f0fff4;
  --red: #e53e3e;
  --red-light: #fff5f5;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-700);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header === */
header {
  background: var(--navy);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.version {
  font-size: 0.75rem;
  opacity: 0.6;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info {
  font-size: 0.85rem;
  opacity: 0.9;
}

.btn-logout {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.25);
}

.btn-toggle-view {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-toggle-view:hover {
  background: rgba(255,255,255,0.25);
}

.btn-print {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-print:hover {
  background: rgba(255,255,255,0.25);
}

.btn-refresh {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-refresh:hover:not(:disabled) {
  background: rgba(255,255,255,0.25);
}

.btn-refresh:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Login Form === */
.login-card {
  max-width: 420px;
  margin: 3rem auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.login-branding {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}

.grivalia-logo {
  width: 220px;
  height: auto;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--navy);
  font-size: 1.35rem;
}

.login-card .step-desc {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.35rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
}

.otp-input {
  font-family: 'Courier New', monospace;
  font-size: 1.8rem !important;
  text-align: center;
  letter-spacing: 0.5rem;
  padding: 0.9rem !important;
}

.btn-full {
  width: 100%;
  margin-top: 0.5rem;
}

.otp-sent-msg {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  text-align: center;
}

.otp-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--navy-light);
}

.btn-link:disabled {
  color: var(--gray-400);
  cursor: default;
  text-decoration: none;
}

.login-status {
  margin-top: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  text-align: center;
}

.login-status.error {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid var(--red);
}

.login-status.success {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green);
}

/* === Progress Bar === */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 1rem;
  gap: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.progress-step span {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.progress-step.active .step-circle {
  background: var(--navy);
  color: white;
}

.progress-step.active span {
  color: var(--navy);
  font-weight: 600;
}

.progress-step.completed .step-circle {
  background: var(--green);
  color: white;
}

.progress-step.completed span {
  color: var(--green);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  max-width: 120px;
  margin: 0 0.5rem;
  margin-bottom: 1.2rem;
}

/* === Steps === */
.step {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  display: none;
}

.step.active {
  display: block;
}

.step h2 {
  color: var(--navy);
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.step-desc {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* === Supervisor Search & Select === */
.search-wrapper {
  position: relative;
}

.search-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.search-wrapper input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
}

.search-wrapper select {
  width: 100%;
  padding: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: white;
}

.search-wrapper select option {
  padding: 0.5rem 0.75rem;
}

.search-wrapper select option:checked {
  background: var(--blue-light);
  color: var(--navy);
}

/* === Subordinates Grid === */
.subordinates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.sub-card {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sub-card:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.sub-card.selected {
  border-color: var(--navy);
  background: var(--blue-light);
}

.sub-card .sub-name {
  font-weight: 600;
  color: var(--gray-800);
}

.sub-card .sub-detail {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.15rem;
}

/* === Employee Card === */
.employee-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.employee-card h3 {
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-item label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.info-item span {
  font-weight: 500;
  color: var(--gray-700);
}

.selection-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.req-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
}

.req-badge.kpi { background: #fef3cd; color: #856404; }
.req-badge.leadership { background: #d4edda; color: #155724; }
.req-badge.behavioral { background: #cce5ff; color: #004085; }
.req-badge.functional { background: #e2d5f1; color: #4a2882; }

/* === Panels (Objective Selection) === */
.panel {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--gray-100);
  cursor: pointer;
  user-select: none;
}

.panel-header h3 {
  font-size: 0.95rem;
  color: var(--gray-700);
  margin: 0;
}

.counter {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  background: white;
  color: var(--blue);
}

.counter.complete {
  background: var(--green-light);
  color: var(--green);
}

.counter.over {
  background: var(--red-light);
  color: var(--red);
}

.toggle-icon {
  font-size: 0.7rem;
  color: var(--gray-400);
  transition: transform 0.2s;
}

.panel.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.panel.collapsed .panel-body {
  display: none;
}

.panel-body {
  max-height: 400px;
  overflow-y: auto;
}

.panel-search {
  padding: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.panel-search input {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.panel-search input:focus {
  outline: none;
  border-color: var(--blue);
}

#kpi-family-filter {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
  min-width: 160px;
  background: white;
  color: var(--gray-700);
}

#kpi-family-filter:focus {
  outline: none;
  border-color: var(--blue);
}

.kpi-family-badge {
  font-size: 0.65rem;
  background: var(--blue-light);
  color: var(--navy);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* === Objective Items === */
.obj-item {
  display: flex;
  align-items: flex-start;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
  cursor: pointer;
}

.obj-item:hover {
  background: var(--gray-50);
}

.obj-item.selected {
  background: var(--blue-light);
}

.obj-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.obj-item input[type="checkbox"] {
  margin-right: 0.75rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.obj-content {
  flex: 1;
  min-width: 0;
}

.obj-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.obj-target {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
  display: none;
  line-height: 1.4;
}

.obj-item.expanded .obj-target {
  display: block;
}

.obj-expand {
  font-size: 0.7rem;
  color: var(--blue);
  cursor: pointer;
  margin-left: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* === Custom KPI Form === */
#custom-kpi-area {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.btn-add-custom {
  background: none;
  border: 1px dashed var(--blue);
  color: var(--blue);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.15s;
}

.btn-add-custom:hover {
  background: var(--blue-light);
}

#custom-kpi-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#custom-kpi-form input,
#custom-kpi-form textarea {
  padding: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
}

#custom-kpi-form input:focus,
#custom-kpi-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.custom-kpi-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn-custom-add {
  background: var(--blue);
  color: white;
  border: none;
  padding: 0.35rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-custom-add:hover {
  background: #2b6cb0;
}

.btn-custom-cancel {
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  padding: 0.35rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
}

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

.custom-kpi-delete {
  font-size: 0.8rem;
  color: var(--gray-500);
  background: var(--gray-100);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.2rem;
  line-height: 1;
}

.custom-kpi-delete:hover {
  color: white;
  background: var(--red);
}

/* KPI Weight Input */
.kpi-weight-input {
  width: 60px;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  text-align: center;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0.5rem;
}
.kpi-weight-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.kpi-weight-input::-webkit-inner-spin-button,
.kpi-weight-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.kpi-weight-input { -moz-appearance: textfield; }

.kpi-weight-total {
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--gray-100);
}
.kpi-weight-total.valid { color: var(--green); background: #ecfdf5; }
.kpi-weight-total.invalid { color: var(--red); background: #fef2f2; }

.kpi-selected-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
}
.kpi-selected-toggle input { cursor: pointer; }

.kpi-target-edit {
  width: 100%;
  font-size: 0.8rem;
  color: var(--gray-700);
  line-height: 1.4;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  resize: vertical;
  font-family: inherit;
  background: var(--white);
}

.kpi-target-edit:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* === Review Table === */
.review-section {
  margin-bottom: 1.5rem;
}

.review-section h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--gray-200);
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.85rem;
}

/* Column widths set via <colgroup> in JS for consistency across sections */

.review-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: var(--gray-50);
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.review-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}

.review-table td.review-target {
  font-size: 0.8rem;
  color: var(--gray-500);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.weight-total {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-weight: 600;
}

.weight-total .ok { color: var(--green); }
.weight-total .error { color: var(--red); }

/* === Buttons === */
.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--navy-light);
}

.btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

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

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

.btn-export {
  background: var(--green);
  font-size: 1rem;
  padding: 0.75rem 2rem;
}

.btn-export:hover {
  background: #2f8a5a;
}

/* === Export Status === */
.export-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 500;
}

.export-status.success {
  background: var(--green-light);
  color: var(--green);
}

.export-status.error {
  background: var(--red-light);
  color: var(--red);
}

/* === Submit Warning === */
.submit-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: #856404;
  line-height: 1.5;
}

.submit-warning strong {
  display: inline;
}

/* === Footer === */
footer {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.8rem;
  margin-top: 2rem;
}

/* === Loading === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--gray-400);
  gap: 0.5rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === Warning Banner (unconfigured employee) === */
.config-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.config-warning strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* === Not configured subordinate card === */
.sub-card.not-configured {
  opacity: 0.65;
  border-style: dashed;
}

.sub-card .config-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  font-weight: 600;
}

.sub-card .config-tag.configured {
  background: var(--green-light);
  color: var(--green);
}

.sub-card .config-tag.not-configured {
  background: #fff3cd;
  color: #856404;
}

/* === Submitted tag on subordinate cards === */
.sub-card.submitted {
  border-left: 3px solid var(--green);
}

.sub-card .config-tag.submitted-tag {
  background: var(--green-light);
  color: var(--green);
}

.sub-card .config-tag.draft-tag {
  background: #e8f0fe;
  color: #1a73e8;
}

/* === Draft Notice === */
.draft-notice {
  background: #e8f0fe;
  color: #1a73e8;
  border: 1px solid #d2e3fc;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.draft-notice .btn-link {
  color: #1a73e8;
  font-size: 0.8rem;
  margin-left: 1rem;
}

/* === Admin Dashboard === */
.admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.summary-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.summary-pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 0.35rem;
}

.summary-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: 0.25rem;
}

.summary-progress-bar {
  height: 24px;
  background: var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
}

.summary-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 12px;
  transition: width 0.5s ease;
  min-width: 0;
}

/* Admin supervisor table */
.admin-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  background: var(--navy);
  color: white;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}

.admin-table tr:hover td {
  background: var(--gray-50);
}

.admin-table .loading-cell {
  text-align: center;
  padding: 2rem;
  color: var(--gray-500);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.status-complete {
  background: var(--green-light);
  color: var(--green);
}

.status-badge.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.status-exported {
  background: var(--blue-light);
  color: var(--navy);
}

.status-badge.status-blocked {
  background: var(--red-light);
  color: var(--red);
}

/* Warning summary card (Not Configured) */
.summary-card.card-warning {
  border-top: 3px solid var(--gray-300);
}

.summary-card.card-warning-active {
  border-top: 3px solid var(--red);
}

.summary-card.card-warning-active .summary-value {
  color: var(--red);
}

.not-configured-count {
  color: var(--red);
  font-weight: 700;
}

/* Expandable detail rows */
.detail-toggle {
  cursor: pointer;
}

.detail-toggle:hover td {
  background: var(--blue-light) !important;
}

.detail-toggle.detail-expanded td {
  background: var(--gray-50);
  border-bottom-color: transparent;
}

.detail-row td {
  padding: 0 !important;
  background: var(--gray-50);
}

.not-configured-list {
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
}

.not-configured-list strong {
  display: block;
  color: var(--red);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.not-configured-list ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.25rem 1rem;
}

.not-configured-list li {
  padding: 0.2rem 0;
  color: var(--gray-700);
}

.not-configured-list .detail-code {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-left: 0.25rem;
}

/* Pending Allocation summary card */
.summary-card.card-pending {
  border-top: 3px solid var(--gray-300);
}

.summary-card.card-pending-active {
  border-top: 3px solid #d69e2e;
}

.summary-card.card-pending-active .summary-value {
  color: #d69e2e;
}

.pending-count {
  color: #d69e2e;
  font-weight: 700;
}

/* Pending allocation detail list (amber theme) */
.pending-list {
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
}

.pending-list strong {
  display: block;
  color: #d69e2e;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.pending-list ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.25rem 1rem;
}

.pending-list li {
  padding: 0.2rem 0;
  color: var(--gray-700);
}

.pending-list .detail-code {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-left: 0.25rem;
}

/* Exported employees detail list (gray theme) with unlock buttons */
.exported-list {
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
}

.exported-list strong {
  display: block;
  color: var(--gray-500);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.exported-list ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 0.25rem 1rem;
}

.exported-list li {
  padding: 0.2rem 0;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exported-list .detail-code {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-left: 0.25rem;
}

/* Unlock button */
.btn-unlock {
  background: none;
  border: 1px solid var(--blue);
  color: var(--blue);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
  transition: all 0.15s ease;
}

.btn-unlock:hover:not(:disabled) {
  background: var(--blue);
  color: white;
}

.btn-unlock:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Combined detail row section separators */
.pending-list + .exported-list,
.pending-list + .not-configured-list,
.exported-list + .not-configured-list {
  border-top: 1px solid var(--gray-200);
}

/* Company group header rows */
.company-group-header td {
  background: var(--navy) !important;
  color: white;
  padding: 0.5rem 0.75rem !important;
  border-bottom: none !important;
}

.company-group-name {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.company-group-stats {
  float: right;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}

/* === Exported / Locked States === */

/* Manager — Exported badge on subordinate cards */
.sub-card .config-tag.exported-tag {
  background: var(--gray-200);
  color: var(--gray-600);
}

.sub-card.exported {
  border-left: 3px solid var(--gray-400);
  opacity: 0.75;
}

.sub-card.exported:hover {
  opacity: 0.9;
}

/* Manager — Lock banner on Step 3 for exported employees */
.lock-banner {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.lock-banner strong {
  color: var(--gray-700);
}

/* Manager — Locked objective items (read-only) */
.obj-item.locked {
  opacity: 0.6;
  pointer-events: none;
  cursor: default;
}

/* Admin — Exported summary card */
.summary-card.card-exported {
  border-top: 3px solid var(--gray-400);
}

.summary-card.card-exported .summary-value {
  color: var(--gray-600);
}

/* === Responsive === */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .step { padding: 1.25rem; }
  .info-grid { grid-template-columns: 1fr; }
  .subordinates-grid { grid-template-columns: 1fr; }
  .progress-line { max-width: 60px; }
  .progress-step span { font-size: 0.65rem; }
  .admin-summary { grid-template-columns: 1fr; }
}

/* === Print === */
@media print {
  /* Hide UI chrome */
  header, footer, .progress-bar,
  .step-actions, .next-employee-section,
  .submit-warning, .export-status,
  .panel-search, .btn-add-custom, #custom-kpi-form,
  .draft-notice { display: none !important; }

  /* Reset layout */
  body { background: #fff; margin: 0; padding: 0; font-size: 11pt; }
  .container { max-width: 100%; padding: 0; }
  .step { border: none; box-shadow: none; padding: 0; margin: 0; }

  /* Print title */
  .print-header { display: block !important; margin-bottom: 1rem; }
  .print-header h2 { font-size: 14pt; margin: 0 0 0.25rem; }
  .print-header p { font-size: 10pt; color: #666; margin: 0; }

  /* Employee card on review */
  .employee-card { border: 1px solid #ccc; box-shadow: none; padding: 0.75rem; }

  /* Review tables */
  .review-section { page-break-inside: avoid; }
  .review-table { font-size: 10pt; }
  .review-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Objectives panels (step 3 print) */
  .panel { border: 1px solid #ccc; box-shadow: none; page-break-inside: avoid; }
  .panel-header { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .panel-body { display: block !important; max-height: none !important; }
  .obj-item { border-bottom: 1px solid #eee; }
  .obj-item:not(.selected) { display: none; }
  .obj-checkbox { display: none; }

  /* Config tags */
  .config-tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
