.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

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

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: rgba(248, 81, 73, 0.15);
  color: var(--danger);
  border-color: rgba(248, 81, 73, 0.3);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--accent);
  background: var(--accent-muted);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 0.5rem;
  min-width: 36px;
  min-height: 36px;
}

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

.form-group-inline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
}

.form-group-inline .form-label {
  margin-bottom: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.form-group-inline .form-input,
.form-group-inline .number-field {
  flex: 1;
  min-width: 0;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Text inputs / textareas (dropdowns use css/def-dropdown1.css → .def-dropdown1) */
.form-input,
.form-textarea {
  width: 100%;
  min-height: var(--def-dropdown1-height, 44px);
  height: var(--def-dropdown1-height, 44px);
  padding: var(--def-dropdown1-padding-y, 0.65rem) var(--def-dropdown1-padding-x, 0.85rem);
  background: var(--input-bg, var(--bg-secondary));
  border: 1px solid var(--def-dropdown1-border, var(--border));
  border-radius: var(--def-dropdown1-radius, var(--radius-sm));
  color: var(--def-dropdown1-color, var(--text-primary));
  font-size: var(--def-dropdown1-font-size, 0.9rem);
  line-height: 1.4;
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-textarea {
  height: auto;
  white-space: pre-wrap;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  text-align: center;
}

.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-field {
  position: relative;
  width: 100%;
}

.number-field .form-input[type="number"] {
  padding-left: calc(var(--number-step-width) + 0.85rem);
}

.number-field-steps {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 1px;
  right: auto;
  width: var(--number-step-width);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  border-top-left-radius: calc(var(--radius-sm) - 1px);
  border-bottom-left-radius: calc(var(--radius-sm) - 1px);
  overflow: hidden;
}

.number-step-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: var(--scrollbar-thumb);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.number-step-btn:hover:not(:disabled) {
  background: var(--scrollbar-thumb-hover);
  color: var(--text-primary);
}

.number-step-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.number-step-up {
  border-bottom: 1px solid var(--border-subtle);
}

.number-step-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* Full-width helper for dropdowns that should stretch with the form */
.def-dropdown1.w-full,
.def-dropdown1-editable.w-full,
select.w-full {
  width: 100%;
}

/* Fully remove browser password UI (Edge reveal + tooltips) */
.form-input[type="password"]::-ms-reveal,
.form-input[type="password"]::-ms-clear,
.password-mask::-ms-reveal,
.password-mask::-ms-clear {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.form-input[type="password"]::-webkit-credentials-auto-fill-button,
.form-input[type="password"]::-webkit-strong-password-auto-fill-button,
.password-mask::-webkit-credentials-auto-fill-button,
.password-mask::-webkit-strong-password-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute;
  right: 0;
  width: 0;
  height: 0;
}

.password-field {
  position: relative;
}

.password-field .form-input {
  padding-right: 2.75rem;
  padding-left: 0.85rem;
}

/* Mask characters without type=password so Edge never adds its eye/tooltip */
.password-mask {
  -webkit-text-security: disc;
  text-security: disc;
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.password-toggle:hover {
  color: var(--text-primary);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

/* ── Candidate PDF upload ── */
.pdf-upload {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pdf-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 132px;
  padding: 1.25rem 1rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at top, rgba(91, 138, 154, 0.12), transparent 55%),
    var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.pdf-upload-dropzone:hover:not(.is-full):not(.is-locked),
.pdf-upload-dropzone.is-dragover:not(.is-locked) {
  border-color: var(--accent);
  background:
    radial-gradient(circle at top, rgba(91, 138, 154, 0.2), transparent 55%),
    var(--bg-tertiary);
  box-shadow: inset 0 0 0 1px rgba(91, 138, 154, 0.25);
  color: var(--text-primary);
}

.pdf-upload-dropzone.is-dragover:not(.is-locked) {
  transform: translateY(-1px);
}

.pdf-upload-dropzone.is-full,
.pdf-upload-dropzone.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.pdf-upload-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent);
}

.pdf-upload-dropzone-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pdf-upload-dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.pdf-upload-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pdf-upload-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pdf-upload-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  transition: border-color var(--transition), background-color var(--transition);
}

.pdf-upload-item:hover {
  border-color: rgba(91, 138, 154, 0.45);
  background: var(--bg-tertiary);
}

.pdf-upload-item.is-duplicate {
  border-color: rgba(248, 81, 73, 0.55);
  background: rgba(248, 81, 73, 0.06);
}

.pdf-upload-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(248, 81, 73, 0.12);
  color: #ff8f88;
  flex-shrink: 0;
}

.pdf-upload-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: visible;
}

.pdf-upload-item-category,
.pdf-upload-item-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: visible;
}

.pdf-upload-item-body .form-group {
  margin-bottom: 0;
}

.pdf-upload-item-body .form-group .form-label,
.pdf-upload-item-name-wrap .form-label {
  margin-bottom: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pdf-upload-item-name {
  width: 100%;
  min-height: 34px;
  padding-block: 0.35rem;
  font-size: 0.86rem;
}

.pdf-upload-item-name.is-duplicate {
  border-color: rgba(248, 81, 73, 0.55);
  background: rgba(248, 81, 73, 0.06);
}

.pdf-upload-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pdf-upload-item-status {
  padding: 0.1rem 0.45rem;
  border-radius: var(--badge-radius);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.pdf-upload-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.pdf-upload-item-remove:hover {
  color: var(--danger);
  border-color: rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.1);
}

.search-bar {
  position: relative;
}

.search-bar input {
  padding-right: 2.5rem;
}

.search-bar .search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.filters-row .search-bar {
  flex: 1 1 12rem;
  min-width: 12rem;
}

.filters-row .search-bar input {
  width: 100%;
}

.filters-row .def-dropdown1,
.filters-row select {
  min-width: 160px;
  flex: 1;
  max-width: 220px;
}

.filters-row .filters-reset-btn {
  flex: 0 0 auto;
}

.filters-row .audit-log-excel-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  height: var(--def-dropdown1-height, 44px);
  min-height: var(--def-dropdown1-height, 44px);
}

.audit-log-excel-btn .audit-log-excel-icon {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border);
}

.account-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 960px;
}

.account-info-card {
  width: 100%;
}

.account-info-email {
  direction: ltr;
  text-align: right;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.account-card {
  height: 100%;
}

.signature-preview-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 0.75rem;
  padding: 0;
  aspect-ratio: 3 / 1;
  border: 1px solid var(--signature-surface-border);
  border-radius: var(--radius-sm);
  background: var(--signature-surface-bg);
  overflow: hidden;
}

.signature-preview,
.signature-empty {
  grid-area: 1 / 1;
}

.signature-preview-wrap.is-empty .signature-preview {
  display: none;
}

.signature-preview-wrap:not(.is-empty) .signature-empty {
  display: none;
}

.signature-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.signature-empty {
  margin: 0;
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.signature-meta {
  margin-bottom: 0.75rem;
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.signature-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.signature-editor-stage {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
}

.signature-editor-canvas {
  width: 100%;
  max-width: 600px;
  height: auto;
  touch-action: none;
  cursor: grab;
  border-radius: var(--radius-sm);
}

.signature-editor-canvas:active {
  cursor: grabbing;
}

.signature-editor-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.signature-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.signature-control-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.signature-control-value {
  font-size: 0.8rem;
  color: var(--text-muted);
  direction: ltr;
}

.signature-range {
  width: 100%;
  accent-color: var(--accent);
}

.signature-editor-actions {
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .signature-editor-controls {
    grid-template-columns: 1fr;
  }
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* ── Unified list cards (candidates, criteria groups, evaluator tasks) ── */
.list-card {
  --list-card-min-height: 16.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: var(--list-card-min-height);
  height: 100%;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 18%),
    linear-gradient(165deg, #1a2230 0%, var(--bg-secondary) 52%, #141a24 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 28px rgba(0, 0, 0, 0.28);
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.list-card-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.15rem 1rem;
  min-height: 0;
}

.list-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.list-card-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--accent-hover);
}

.list-card-icon--criteria {
  color: #e7bc58;
}

.list-card-icon--gold {
  color: #f0c84a;
  filter: drop-shadow(0 0 8px rgba(240, 200, 74, 0.35));
}

.list-card-icon--silver {
  color: #c8d0dc;
  filter: drop-shadow(0 0 8px rgba(200, 208, 220, 0.28));
}

.list-card-icon--bronze {
  color: #d28b5a;
  filter: drop-shadow(0 0 8px rgba(210, 139, 90, 0.28));
}

.list-card-icon--pending {
  color: var(--text-secondary);
}

.list-card-head-text {
  flex: 1;
  min-width: 0;
}

.list-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  word-break: break-word;
  color: var(--text-primary);
}

.list-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: auto;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.list-card-detail-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.65rem;
}

.list-card-detail-icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--accent-hover);
  background: rgba(91, 138, 154, 0.12);
  border: 1px solid rgba(91, 138, 154, 0.18);
}

.list-card-detail-icon--college {
  width: 1.85rem;
  height: 1.85rem;
}

.list-card-detail-text {
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.list-card-detail-row--warning .list-card-detail-icon {
  color: var(--warning);
  background: rgba(210, 153, 34, 0.12);
  border-color: rgba(210, 153, 34, 0.24);
}

.list-card-detail-row--warning .list-card-detail-text {
  color: var(--warning);
}

.list-card-detail-row--success .list-card-detail-icon {
  color: var(--success);
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.24);
}

.list-card-detail-row--success .list-card-detail-text {
  color: var(--success);
}

.list-card-detail-row--danger .list-card-detail-icon {
  color: var(--danger);
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.24);
}

.list-card-detail-row--danger .list-card-detail-text {
  color: var(--danger);
}

.list-card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.22) 100%);
  min-height: calc(var(--def-normalbtn1-height) + 1.85rem);
}


.card-stagger > .list-card {
  height: 100%;
}

.list-card:hover {
  border-color: rgba(109, 160, 176, 0.32);
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 18px 36px rgba(0, 0, 0, 0.38);
}

@media (max-width: 520px) {
  .list-card-head {
    flex-wrap: wrap;
  }

  .list-card-head-text {
    width: 100%;
  }
}

.evaluator-role-btn {
  width: 5.5rem;
  min-width: 5.5rem;
  box-sizing: border-box;
}

.evaluator-lock-btn {
  width: var(--def-normalbtn1-height);
  min-width: var(--def-normalbtn1-height);
  padding-inline: 0;
  box-sizing: border-box;
}

.evaluator-lock-btn.is-locked {
  color: var(--warning);
  border-color: rgba(210, 153, 34, 0.3);
  background: rgba(210, 153, 34, 0.15);
}

.evaluator-lock-btn.is-locked:hover:not(:disabled) {
  color: var(--warning);
  border-color: var(--warning);
}

.evaluator-recall-btn {
  width: var(--def-normalbtn1-height);
  min-width: var(--def-normalbtn1-height);
  padding-inline: 0;
  box-sizing: border-box;
  color: var(--warning);
  border-color: rgba(210, 153, 34, 0.3);
  background: rgba(210, 153, 34, 0.1);
}

.evaluator-recall-btn:hover:not(:disabled) {
  color: var(--warning);
  border-color: var(--warning);
  background: rgba(210, 153, 34, 0.15);
}

.evaluator-role-badge {
  justify-content: center;
  align-items: center;
  min-width: 6.25rem;
  width: 6.75rem;
  padding-inline: 0.5rem;
  box-sizing: border-box;
}

.evaluator-role-badge-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  direction: ltr;
  width: 100%;
}

.evaluator-role-badge-star {
  color: var(--warning);
}

.evaluator-role-badge-person {
  color: var(--text-secondary);
}

.evaluator-president-col {
  width: 4.5rem;
  min-width: 4.5rem;
}

.evaluator-president-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  direction: ltr;
}

.evaluator-president-star {
  color: var(--warning);
}

.evaluators-table th:first-child,
.evaluators-table td:first-child {
  width: 3rem;
  min-width: 3rem;
}

.evaluators-table th:nth-child(3),
.evaluators-table td:nth-child(3) {
  min-width: 16rem;
  width: 28%;
}

.evaluators-table td:last-child .flex {
  justify-content: center;
}

.table-sort-header {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.table-sort-btn:hover {
  color: var(--accent-hover);
  background: rgba(91, 138, 154, 0.12);
}

.table-sort-btn.is-active {
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.audit-log-table-wrap {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 12rem);
  overflow: hidden;
}

.audit-log-table-header {
  flex-shrink: 0;
  direction: rtl;
  /* Match body scrollbar gutter so columns stay aligned */
  padding-inline-start: var(--scrollbar-size);
  background: #212C34;
  box-sizing: border-box;
}

.audit-log-table-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  direction: ltr;
  scrollbar-gutter: stable;
}

.audit-log-table-body > * {
  direction: rtl;
}

.audit-log-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.audit-log-col-date { width: 18%; }
.audit-log-col-user { width: 24%; }
.audit-log-col-action { width: 14%; }
.audit-log-col-desc { width: 44%; }

.audit-log-table-header .data-table th {
  border-bottom: 1px solid var(--border-subtle);
}

.audit-log-table-body .data-table tr:last-child td {
  border-bottom: none;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  background: #212C34;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

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

.data-table > tbody > tr:hover > td {
  background: rgba(91, 138, 154, 0.05);
}

.data-table.evaluators-table th {
  text-align: center;
}

.data-table.evaluators-table td {
  text-align: center;
}

.data-table.evaluators-table th:nth-child(3),
.data-table.evaluators-table td:nth-child(3) {
  text-align: right;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 960px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.modal:has(.exclusion-scope-dialog) {
  overflow-x: hidden;
}

.modal:has(.exclusion-scope-dialog) .modal-body {
  overflow-x: hidden;
}

.modal:has(.exclusion-scope-dialog) .modal-footer {
  flex-direction: column;
  align-items: stretch;
}

.modal:has(.exclusion-scope-dialog) .exclusion-scope-btn {
  width: 100%;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.exclusion-scope-dialog {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.exclusion-scope-message {
  margin: 0;
  line-height: 1.5;
}

.exclusion-scope-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.exclusion-scope-meta-label {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-footer);
}

.exclusion-scope-meta-value {
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
}

.exclusion-scope-candidates {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.exclusion-scope-candidates li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
  word-break: break-word;
}

.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: var(--notification-padding-block) var(--notification-padding-inline);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}

.toast-success { background: rgba(63, 185, 80, 0.9); color: white; }
.toast-error { background: rgba(248, 81, 73, 0.9); color: white; }
.toast-info { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-x: hidden;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand img {
  width: auto;
  max-width: 88%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

.sidebar-brand-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-secondary);
  text-align: center;
}

.sidebar-user {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-user-greeting {
  font-size: 1.05rem;
  font-weight: 700;
  color: #4056E3;
  margin-bottom: 0.35rem;
}

.sidebar-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  direction: ltr;
}

.sidebar-nav > * {
  direction: rtl;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  margin-bottom: 0.25rem;
}

.nav-item:hover {
  background: var(--accent-muted);
  color: var(--accent);
}

.nav-item.active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item-label {
  flex: 1;
  min-width: 0;
}

.nav-item-text {
  min-width: 0;
}

.nav-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  margin-inline-start: auto;
  border-radius: 5px;
  background: var(--accent);
  color: var(--bg-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.nav-item.active .nav-item-badge {
  background: #6da0b0;
}

.mobile-nav-item .nav-item-badge {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  font-size: 0.62rem;
  margin-inline-start: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.sidebar-footer .sidebar-footer-item {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-footer .sidebar-footer-item:last-child {
  margin-bottom: 0;
}

/* Settings pack actions: equalize only these 4 buttons to استيراد تقييمات المقيّمين */
.settings-pack-actions .settings-pack-btn {
  box-sizing: border-box;
  width: 13.75rem;
  min-width: 13.75rem;
  max-width: 100%;
  height: var(--def-addbtn1-height);
  min-height: var(--def-addbtn1-height);
  font-size: var(--def-addbtn1-font-size);
  padding: 0 0.3rem;
  justify-content: center;
  white-space: nowrap;
}

@media (min-width: 769px) {
  .app-layout.sidebar-collapsed .sidebar {
    transform: translateX(100%);
    pointer-events: none;
  }

  .app-layout.sidebar-collapsed .main-content {
    margin-right: 0;
  }
}

.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.main-header {
  height: var(--header-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  z-index: 50;
}

.page-title-wrap {
  min-width: 0;
  flex: 1;
}

.page-title-structured {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0;
}

.page-title-part {
  font-size: inherit;
  font-weight: inherit;
}

.page-title-name {
  font-size: inherit;
  font-weight: inherit;
  color: var(--accent);
}

.page-title-separator {
  color: var(--text-muted);
  font-weight: 400;
}

.page-header-back {
  flex-shrink: 0;
}

.page-header-back-link {
  text-decoration: none;
}

.page-toolbar {
  flex-shrink: 0;
  padding: 0.4rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
}

.page-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  direction: ltr;
  width: 100%;
}

.page-toolbar-spacer {
  flex: 1;
  min-width: 0;
}

.page-toolbar-row .page-back-link {
  direction: rtl;
}

.evaluation-split-toggle {
  direction: rtl;
}

.evaluation-split-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.evaluation-split-reset {
  width: var(--def-normalbtn1-height);
  min-width: var(--def-normalbtn1-height);
  padding-inline: 0;
  box-sizing: border-box;
}

.evaluation-split-reset[hidden] {
  display: none;
}

.page-toolbar[hidden] {
  display: none;
}

.page-footer {
  flex-shrink: 0;
  padding: 0.65rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  z-index: 50;
}

.page-footer[hidden] {
  display: none;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.page-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 1.5rem;
  padding-inline-end: 1rem;
  direction: ltr;
}

.page-content:has(.candidates-list),
.page-content:has(.evaluator-task-list) {
  display: flex;
  flex-direction: column;
}

.candidates-list.is-empty,
.evaluator-task-list.is-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.page-content > * {
  direction: rtl;
}

.page-content,
.sidebar-nav,
.modal,
.table-wrap,
.audit-log-table-body,
.candidate-file-summary-list {
  scrollbar-width: auto;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.page-content::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.audit-log-table-body::-webkit-scrollbar,
.candidate-file-summary-list::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

.page-content::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.audit-log-table-body::-webkit-scrollbar-track,
.candidate-file-summary-list::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.sidebar-nav::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.modal::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.page-content::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.audit-log-table-body::-webkit-scrollbar-thumb,
.candidate-file-summary-list::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.page-content::-webkit-scrollbar-thumb {
  border-color: var(--bg-primary);
}

.sidebar-nav::-webkit-scrollbar-thumb {
  border-color: var(--bg-secondary);
}

.modal::-webkit-scrollbar-thumb {
  border-color: var(--bg-secondary);
}

.table-wrap::-webkit-scrollbar-thumb {
  border-color: var(--bg-primary);
}

.audit-log-table-body::-webkit-scrollbar-thumb {
  border-color: var(--bg-primary);
}

.candidate-file-summary-list::-webkit-scrollbar-track {
  background: #1C2333;
}

.candidate-file-summary-list::-webkit-scrollbar-thumb {
  border-color: #1C2333;
}

.page-content::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
.audit-log-table-body::-webkit-scrollbar-thumb:hover,
.candidate-file-summary-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

.page-content::-webkit-scrollbar-corner,
.sidebar-nav::-webkit-scrollbar-corner,
.modal::-webkit-scrollbar-corner,
.table-wrap::-webkit-scrollbar-corner,
.audit-log-table-body::-webkit-scrollbar-corner {
  background: var(--bg-primary);
}

body:has(.app-layout) {
  overflow: hidden;
}

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  padding: 0.5rem;
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
}

.mobile-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.5rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  border-radius: var(--radius-sm);
  min-width: 56px;
}

.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

.mobile-header {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .mobile-nav { display: block; }
  .mobile-header { display: flex; }
  .main-header { display: none; }
  .page-toolbar { padding: 0.4rem 1rem; }
  .page-footer { padding: 0.65rem 1rem; padding-bottom: calc(0.65rem + 70px); }
  .page-content { padding: 1rem; padding-inline-end: 0.75rem; padding-bottom: calc(1rem + 70px); }
  .page-content:has(.pdf-preview-page) { padding-top: 0.25rem; }
  .page-content:has(.criteria-group-editor) { padding-top: 0; }
  .criteria-group-editor { padding-top: 1rem; }
  .criterion-option-row { grid-template-columns: 1fr; }
  .criterion-rubric-controls { grid-template-columns: 1fr; }
}

.score-display {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.score-display-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.score-display-value {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: 1;
}

.score-display-sm {
  font-size: 1rem;
}

.evaluation-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.evaluation-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.evaluation-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.evaluation-section-header .card-title {
  color: var(--accent-hover);
}

.evaluation-section-criteria {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.evaluation-section-criteria .criterion-item {
  margin-bottom: 0;
}

.evaluation-section-criteria .evaluation-criterion-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.75rem;
  align-items: stretch;
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
}

.evaluation-criterion-info,
.evaluation-criterion-options {
  box-sizing: border-box;
  min-width: 0;
  min-height: 100%;
  padding: 1rem;
  background: #1C2333;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.evaluation-criterion-info {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.evaluation-criterion-title {
  font-size: 0.95rem;
  line-height: 1.45;
}

.evaluation-criterion-description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.evaluation-criterion-description.is-clamped {
  cursor: help;
  text-decoration: underline dotted var(--border);
  text-underline-offset: 0.2em;
}

.evaluation-criterion-description.is-clamped:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.evaluation-criterion-options {
  grid-column: 2;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.25rem;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  padding: 0.75rem;
}

.evaluation-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  flex: 1 0 0;
  min-width: 4.5rem;
  max-width: 100%;
  min-height: 100%;
  text-align: right;
  padding: 0.65rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), color var(--transition);
  font-size: 0.875rem;
}

.evaluation-option-btn:hover:not(:disabled) {
  border-color: var(--accent);
}

.evaluation-option-btn.selected {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}

.evaluation-option-btn.selected .evaluation-option-title {
  font-weight: 600;
}

.evaluation-option-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.evaluation-option-title {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  cursor: help;
  text-decoration: underline dotted var(--border);
  text-underline-offset: 0.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-option-title:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.evaluation-option-weight {
  font-size: 0.8125rem;
}

.evaluation-option-tooltip,
.app-tooltip {
  position: fixed;
  z-index: 1300;
  max-width: min(20rem, calc(100vw - 1.5rem));
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.app-tooltip--wide {
  max-width: min(32rem, calc(100vw - 1.5rem));
}

.evaluation-option-tooltip-text,
.app-tooltip-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .evaluation-section-criteria .evaluation-criterion-item {
    grid-template-columns: 1fr;
  }

  .evaluation-criterion-info,
  .evaluation-criterion-options {
    grid-column: 1;
  }
}

.weight-total {
  padding: var(--notification-padding-block) var(--notification-padding-inline);
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 1rem;
}

.weight-total.valid {
  background: rgba(63, 185, 80, 0.1);
  color: var(--success);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.weight-total.invalid {
  background: rgba(248, 81, 73, 0.1);
  color: var(--danger);
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.criteria-editor-actions,
.candidate-editor-actions,
.evaluation-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}

.criteria-editor-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: end;
}

.criteria-editor-top .form-group {
  margin-bottom: 0;
}

.criteria-editor-io {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding-bottom: 0.05rem;
}

.criteria-editor-io .def-normalbtn1 {
  height: var(--def-dropdown1-height, 44px);
  min-height: var(--def-dropdown1-height, 44px);
}

@media (max-width: 768px) {
  .criteria-editor-top {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .criteria-editor-io {
    justify-content: flex-start;
  }
}

.evaluation-editor-actions .evaluation-footer-score {
  margin-inline-start: auto;
  flex-shrink: 0;
}

.criteria-editor-actions .def-addbtn1,
.criteria-editor-actions .def-normalbtn2,
.candidate-editor-actions .def-addbtn1,
.candidate-editor-actions .def-normalbtn2,
.evaluation-editor-actions .def-addbtn2,
.evaluation-editor-actions .def-normalbtn1,
.evaluation-editor-actions .def-view2 {
  flex-shrink: 0;
}

.page-content:has(.evaluation-split) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 0.5rem;
  padding-inline-end: 0;
}

.page-content:has(.evaluation-split) > * {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.evaluation-split {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.evaluation-split-body {
  display: flex;
  flex: 1;
  min-height: 0;
  direction: ltr;
  position: relative;
}

.evaluation-split-pane {
  min-width: 0;
  min-height: 0;
}

.evaluation-split-pane--pdf {
  display: flex;
  flex-direction: column;
  flex: 0 0 42%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
}

.evaluation-split:not(.is-open) .evaluation-split-pane--pdf,
.evaluation-split:not(.is-open) .evaluation-split-divider {
  display: none;
}

.evaluation-split.is-open .evaluation-split-pane--eval {
  flex: 1 1 auto;
}

.evaluation-split:not(.is-open) .evaluation-split-pane--eval {
  flex: 1 1 auto;
}

.evaluation-split-pdf-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  direction: rtl;
}

.evaluation-split-pdf-panel .pdf-preview-tabs {
  flex-shrink: 0;
  direction: rtl;
  justify-content: flex-start;
}

.evaluation-split-pdf-panel .pdf-viewer-wrap {
  flex: 1;
  min-height: 0;
  height: auto;
  border: none;
  border-radius: 0;
  direction: ltr;
}

.evaluation-split-pane--eval {
  display: flex;
  flex-direction: column;
  min-height: 0;
  direction: rtl;
}

.evaluation-split-eval-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 0.35rem;
  padding-right: 0;
  padding-left: 0;
  scrollbar-gutter: stable;
  direction: ltr;
}

.evaluation-split-eval-scroll > * {
  direction: rtl;
  padding-inline-start: 0.85rem;
  padding-inline-end: 0.15rem;
}

.evaluation-split.is-open .evaluation-split-eval-scroll {
  padding-top: 0.35rem;
}

.evaluation-split-divider {
  flex: 0 0 12px;
  margin: 0;
  cursor: col-resize;
  background: transparent;
  position: relative;
  touch-action: none;
  z-index: 3;
}

.evaluation-split-divider::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s ease;
  pointer-events: none;
}

.evaluation-split-ghost {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--accent);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
}

.evaluation-split-body.is-ghost-resizing .evaluation-split-ghost {
  opacity: 1;
  visibility: visible;
}

.evaluation-split-body.is-ghost-resizing .evaluation-split-divider {
  visibility: hidden;
}

.evaluation-split-body.is-ghost-resizing .evaluation-split-pane--pdf,
.evaluation-split-body.is-ghost-resizing .evaluation-split-pane--eval,
.evaluation-split-body.is-ghost-resizing .pdf-embedded-frame {
  pointer-events: none;
}

.evaluation-split-divider:hover::before,
.evaluation-split-divider.is-dragging::before,
.evaluation-split-divider:focus-visible::before {
  background: var(--accent);
}

body.evaluation-split-dragging {
  cursor: col-resize;
  user-select: none;
}

body.evaluation-split-dragging * {
  cursor: col-resize !important;
}

.candidate-editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.candidate-editor form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.page-content:has(.candidate-editor) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-content:has(.candidate-editor) > * {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.candidate-editor-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
  min-height: 0;
}

.candidate-editor-top-panel {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #212C34;
  flex-shrink: 0;
}

.candidate-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.candidate-editor-grid-bottom {
  flex: 1;
  min-height: 0;
  align-items: stretch;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.candidate-editor-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

.candidate-editor-hints-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  flex-shrink: 0;
}

.candidate-editor-hints-row .form-hint {
  margin: 0;
  color: var(--text-secondary);
}

.candidate-editor-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.candidate-editor-col-left {
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.candidate-editor-col-right {
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  gap: 1.25rem;
}

.candidate-editor-upload {
  flex-shrink: 0;
  margin-bottom: 0;
}

.candidate-editor-col-left > .form-group {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
}

.candidate-editor-grid-top .form-group:last-child,
.candidate-editor-grid-bottom .form-group:last-child {
  margin-bottom: 0;
}

.candidate-editor-top-panel .candidate-editor-grid-top {
  gap: 1rem;
}

.candidate-editor-top-panel .form-group {
  margin-bottom: 0;
}

.candidate-editor-files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.candidate-editor-files-head .form-label {
  margin-bottom: 0;
}

.candidate-file-summary-panel {
  padding: 1rem 0.45rem 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #1C2333;
  flex: 1;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.candidate-file-summary-panel .pdf-upload-meta {
  margin: 0;
  white-space: nowrap;
}

.candidate-file-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  direction: ltr;
  padding-inline-end: 0.5rem;
}

.candidate-file-summary-list > * {
  direction: rtl;
}

.candidate-file-summary-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.candidate-file-summary-row.is-dragging .candidate-file-summary-item {
  border-color: rgba(91, 138, 154, 0.55);
  background: var(--bg-tertiary);
  box-shadow: var(--shadow);
}

.candidate-file-summary-drag-handle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
  transition: color var(--transition), background-color var(--transition);
}

.candidate-file-summary-drag-handle:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.candidate-file-summary-drag-handle:active,
.candidate-file-summary-row.is-dragging .candidate-file-summary-drag-handle {
  cursor: grabbing;
  color: var(--accent);
}

.candidate-file-summary-drag-handle:disabled {
  opacity: 0.35;
  cursor: default;
}

body.candidate-file-summary-dragging {
  cursor: grabbing;
  user-select: none;
}

body.candidate-file-summary-dragging * {
  cursor: grabbing !important;
}

.candidate-file-summary-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.candidate-file-summary-item {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}

.candidate-file-summary-item:hover {
  border-color: rgba(91, 138, 154, 0.45);
  background: var(--bg-tertiary);
}

.candidate-file-summary-item.is-duplicate {
  border-color: rgba(248, 81, 73, 0.55);
  background: rgba(248, 81, 73, 0.06);
}

.candidate-file-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(248, 81, 73, 0.12);
  color: #ff8f88;
  flex-shrink: 0;
}

.candidate-file-summary-body {
  min-width: 0;
}

.candidate-file-summary-name {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}

.candidate-file-summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.candidate-file-summary-category {
  padding: 0.1rem 0.45rem;
  border-radius: var(--badge-radius);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.candidate-file-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.candidate-file-summary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.candidate-file-summary-btn:hover {
  color: var(--accent);
  border-color: rgba(91, 138, 154, 0.35);
  background: var(--accent-muted);
}

.candidate-file-summary-btn-danger:hover {
  color: var(--danger);
  border-color: rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.1);
}

.candidate-file-editor-block {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.candidate-file-editor-heading {
  margin: 0;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.candidate-file-editor-section {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
  padding: 0.5rem 1.25rem 0.45rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.candidate-file-editor-count {
  margin: 0 0 0.35rem;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
  text-align: center;
}

.candidate-file-editor-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.candidate-file-editor-slot {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.candidate-file-editor-slot > * {
  flex: 1;
  min-height: 100%;
  width: 100%;
}

.candidate-file-editor-slot .pdf-upload-item {
  align-self: stretch;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 0.5rem;
  row-gap: 0.35rem;
  padding: 0.55rem 0.65rem;
}

.candidate-file-editor-slot .pdf-upload-item-icon {
  grid-column: 1;
  grid-row: 2 / 5;
  align-self: stretch;
  width: 40px;
  min-height: 0;
  height: auto;
}

.candidate-file-editor-slot .pdf-upload-item-body {
  display: contents;
}

.candidate-file-editor-slot .pdf-upload-item-category-label {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.candidate-file-editor-slot .pdf-upload-item-category-row {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.candidate-file-editor-slot .pdf-upload-item-category-row .def-dropdown1-editable-wrap,
.candidate-file-editor-slot .pdf-upload-item-category-row .def-dropdown1-editable {
  flex: 1;
  min-width: 0;
}

.candidate-file-editor-slot .pdf-upload-item-name-mode-radios {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.candidate-file-editor-slot .pdf-upload-item-name-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
}

.candidate-file-editor-slot .pdf-upload-item-name-mode-option input {
  flex-shrink: 0;
  accent-color: var(--accent);
}

.candidate-file-editor-slot .pdf-upload-item-name-mode-option:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.candidate-file-editor-slot .pdf-upload-item-name-label {
  grid-column: 2;
  grid-row: 3;
  margin-top: 0.4rem;
  margin-bottom: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.candidate-file-editor-slot .pdf-upload-item-name {
  grid-column: 2;
  grid-row: 4;
}

.candidate-file-editor-slot .pdf-upload-item-name:read-only {
  color: var(--text-muted);
  cursor: default;
}

.candidate-file-editor-nav {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding-top: 0.35rem;
  direction: ltr;
}

.candidate-file-editor-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background-color var(--transition),
    color var(--transition);
}

.candidate-file-editor-nav-btn:hover:not(:disabled) {
  border-color: rgba(91, 138, 154, 0.45);
  background: var(--accent-muted);
  color: var(--accent);
}

.candidate-file-editor-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.candidate-file-editor-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-upload-item.is-editing {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(91, 138, 154, 0.25);
}

.candidate-editor-files .pdf-upload-meta {
  margin: 0;
  white-space: nowrap;
}

.candidate-editor-files .pdf-upload-list {
  max-height: min(520px, calc(100vh - 320px));
  overflow-y: auto;
  overflow-x: visible;
  padding-inline-end: 0.15rem;
}

.pdf-upload-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 900px) {
  .candidate-editor-grid,
  .candidate-editor-hints-row {
    grid-template-columns: 1fr;
  }

  .candidate-editor-divider {
    margin-block: 0.25rem;
  }
}

.criteria-editor-actions .criteria-editor-validation {
  margin-top: 0;
  flex: 1;
  min-width: 12rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.criteria-section-card {
  padding: 0;
  overflow: hidden;
}

.criteria-section-card:not(.is-collapsed) {
  overflow: visible;
}

.criteria-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  min-height: 2.35rem;
  box-sizing: border-box;
  background: var(--big-header);
  border-bottom: 1px solid var(--border-subtle);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.criteria-section-card:not(.is-collapsed) .criteria-section-header-row {
  position: sticky;
  top: 0;
  z-index: 6;
}

.page-content:has(.criteria-group-editor) {
  padding-top: 0;
}

.criteria-group-editor {
  padding-top: 1.5rem;
}

.criteria-section-header-row .criteria-section-delete {
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
  gap: 0.35rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.criteria-section-header-row .criteria-section-delete svg {
  width: 14px;
  height: 14px;
}

.criteria-section-header-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}

.criteria-section-count {
  font-size: 0.95rem;
  color: var(--accent);
  white-space: nowrap;
}

.criteria-section-count-value {
  color: var(--text-primary);
  font-weight: 700;
}

.criteria-section-match {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  flex-shrink: 0;
}

.criteria-section-match[hidden] {
  display: none;
}

.criteria-section-match svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 3;
}

.criteria-section-card.is-collapsed .criteria-section-header-row {
  border-bottom: none;
  border-radius: var(--radius);
}

.criteria-section-header {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: right;
  font-family: var(--font);
  color: inherit;
}

.criteria-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  transition: color var(--transition);
}

.criteria-section-chevron {
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.criteria-section-card.is-collapsed .criteria-section-chevron {
  transform: rotate(-90deg);
}

.criteria-section-body {
  padding: 1rem 1.25rem 1.25rem;
}

.criteria-section-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  margin-inline: -1.25rem;
  margin-bottom: -1.25rem;
  padding: 0.75rem 1.25rem;
  flex-wrap: wrap;
  background: var(--bg-footer);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.criteria-section-footer .def-normalbtn1 {
  flex-shrink: 0;
}

.criteria-section-footer .section-total {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: var(--def-normalbtn1-height, 32px);
  min-height: var(--def-normalbtn1-height, 32px);
  padding: 0 var(--def-normalbtn1-padding-x, 0.75rem);
  margin-top: 0;
  flex: 1;
  min-width: 12rem;
  font-size: var(--def-normalbtn1-font-size, 0.8rem);
  font-weight: var(--def-normalbtn1-font-weight, 600);
  line-height: 1;
}

.criteria-section-card.is-collapsed .criteria-section-body {
  display: none;
}

.locked-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--notification-padding-block) var(--notification-padding-inline);
  background: rgba(210, 153, 34, 0.1);
  border: 1px solid rgba(210, 153, 34, 0.3);
  border-radius: var(--radius-sm);
  color: var(--warning);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.criterion-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #1C2333;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.criterion-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  align-items: stretch;
  margin-bottom: 0;
}

.criterion-index-panel {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #161B22;
  border: 1px solid var(--def-dropdown1-border, var(--border));
  border-radius: var(--def-dropdown1-radius, var(--radius-sm));
  padding-inline: 0.65rem;
  min-width: 4.5rem;
}

.criterion-index-panel svg {
  color: var(--warning);
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.criterion-fields .criterion-index {
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.25;
}

.criterion-fields .criterion-title {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}

.criterion-fields .criterion-delete,
.criterion-fields .criterion-delete-spacer {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  flex-shrink: 0;
}

.criterion-fields .criterion-delete {
  padding: 0.32rem 0.55rem;
}

.criterion-fields .criterion-delete svg {
  width: 14px;
  height: 14px;
}

.criterion-fields .criterion-delete-spacer {
  display: inline-block;
  width: 2.15rem;
  height: 1.85rem;
}

.criterion-fields .criterion-description {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  --criterion-description-height: calc(2lh + var(--def-dropdown1-padding-y, 0.65rem) * 2 + 2px);
  --criterion-description-max-height: calc(6lh + var(--def-dropdown1-padding-y, 0.65rem) * 2 + 2px);
  min-height: var(--criterion-description-height);
  max-height: var(--criterion-description-max-height);
  height: var(--criterion-description-height);
  resize: vertical;
  overflow-y: auto;
  white-space: pre-wrap;
}

.criterion-option-row {
  grid-template-columns: auto 1fr 3fr minmax(4.75rem, 5.5rem);
  align-items: center;
}

.criterion-option-index {
  flex-shrink: 0;
  min-width: 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.criterion-rubric-panel {
  background: #212C34;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding-block: 0.2rem;
  padding-inline: 0.75rem;
}

.criterion-rubric-controls {
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
}

.criterion-rubric-controls .form-group {
  margin-bottom: 0;
}

.criterion-rubric-controls .form-group-inline .form-label {
  white-space: normal;
  line-height: 1.25;
}

.criterion-rubric-controls .form-group-inline .form-input,
.criterion-rubric-controls .form-group-inline .number-field {
  flex: 0 0 5.5rem;
  width: 5.5rem;
  max-width: 5.5rem;
}

.criterion-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0;
}

.criterion-options-hint {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.4rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.875rem;
}

.option-btn:hover {
  border-color: var(--accent);
}

.option-btn.selected {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-stack {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-stack .login-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 34rem;
  min-height: 34rem;
  max-height: 34rem;
  box-sizing: border-box;
}

.login-stack .login-logo {
  margin-bottom: 0;
  flex-shrink: 0;
}

.login-stack .login-card > form,
.login-stack .login-card > .login-import-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Keep fields + submit as one block at the bottom (aligns with دخول المسؤول) */
.login-stack .login-card > form > .form-group:first-of-type {
  margin-top: auto;
}

.login-stack .login-card > form > #login-submit {
  margin-top: 0.65rem;
}

/* Match height of login form (logo margin + 2 fields + submit) */
.login-import-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.login-import-mid {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.login-import-actions {
  width: 100%;
  margin-top: auto;
}

.login-utility-dock {
  position: fixed;
  z-index: 40;
  top: 0.85rem;
  right: 1rem;
  bottom: auto;
  max-width: min(92vw, 34rem);
  pointer-events: none;
}

.login-utility-line {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}

.login-utility-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.15rem 0.2rem;
  line-height: 1.3;
  opacity: 0.9;
  transform: scale(1);
  transform-origin: center;
  transition:
    color var(--transition),
    opacity var(--transition),
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-utility-link:hover {
  color: var(--accent);
  opacity: 1;
  transform: scale(1.05);
}

.login-utility-link.is-imported {
  color: #7aa8b6;
  font-weight: 600;
  opacity: 1;
}

.login-utility-link--danger:hover {
  color: var(--danger);
}

.login-utility-sep {
  color: var(--text-muted);
  opacity: 0.45;
  font-size: 0.72rem;
  user-select: none;
}

.login-ops-float {
  position: fixed;
  z-index: 41;
  top: 3.25rem;
  right: 1rem;
  bottom: auto;
  width: min(92vw, 420px);
  max-height: min(70vh, 520px);
  overflow: auto;
}

.login-ops-float .card {
  margin-bottom: 0;
  box-shadow: var(--shadow);
}

.login-clear-storage {
  margin-top: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.login-clear-storage-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.85;
  transition: color var(--transition), opacity var(--transition);
}

#login-clear-storage.login-clear-storage-btn {
  text-decoration: none;
  text-underline-offset: unset;
}

.login-clear-storage-btn:hover {
  color: var(--primary, #2f6f62);
  opacity: 1;
}

#login-clear-storage.login-clear-storage-btn:hover {
  color: var(--danger);
}

@media (max-width: 640px) {
  .login-utility-dock {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
  }

  .login-utility-line {
    justify-content: center;
    border-radius: 12px;
  }

  .login-ops-float {
    top: 3rem;
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
  }
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo img {
  width: min(180px, 70%);
  height: auto;
  margin-bottom: 1rem;
  object-fit: contain;
}

.login-logo h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.page-content:has(.pdf-preview-page) {
  padding-top: 0.35rem;
}

.pdf-viewer-wrap {
  position: relative;
  width: 100%;
  height: calc(100vh - 9rem);
  min-height: 74vh;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-primary);
}

.pdf-viewer-wrap .pdf-embedded-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-primary);
}

.pdf-preview-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-gutter: stable;
}

.pdf-preview-tab {
  flex: 0 1 auto;
  max-width: 10rem;
  padding: 0.45rem 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-preview-tab:hover {
  color: var(--accent);
}

.pdf-preview-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.tab {
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover { color: var(--accent); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width var(--transition);
}

.progress-bar-fill--aggregate {
  background: var(--warning);
  box-shadow: 0 0 0 1px rgba(210, 153, 34, 0.35);
}

.results-summary-position-row .progress-bar-fill--complete,
.results-summary-candidate-row .progress-bar-fill--complete {
  background: var(--success);
}

.results-summary-progress-cell .progress-bar-fill {
  width: var(--progress, 0%);
  transition: none;
}

.results-summary-progress-cell:hover .progress-bar-fill {
  animation: results-summary-progress-fill 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes results-summary-progress-fill {
  from { width: 0; }
  to { width: var(--progress, 0%); }
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.page-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10000;
  background: rgba(110, 231, 160, 0.12);
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-loading-bar.hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loading-bar-fill {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(270deg, #4ade80, #86efac);
  border-radius: 2px 0 0 2px;
  transition: none;
}

.page-loading-bar.complete .page-loading-bar-fill {
  transition: width 0.28s ease-out;
}

.results-tab-panel[hidden] {
  display: none;
}

.results-evaluator-complete-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.results-evaluator-complete-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.results-evaluator-complete-row {
  align-items: center;
}

.results-evaluator-complete-row .def-dropdown1,
.results-evaluator-complete-row select {
  flex: 1 1 14rem;
  min-width: 12rem;
  max-width: none;
}

.results-evaluator-complete-download-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  height: var(--def-dropdown1-height, 44px);
  min-height: var(--def-dropdown1-height, 44px);
  color: var(--text-secondary, #9ba3af);
}

.results-evaluator-complete-download-btn:hover:not(:disabled) {
  color: var(--text-secondary, #9ba3af);
}

.results-evaluator-complete-download-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.results-evaluator-complete-zip-icon {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.results-pos-select-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.results-pos-select-row .def-dropdown1,
.results-pos-select-row select {
  flex: 1;
  width: auto;
  min-width: 0;
}

.results-pos-select-row .results-pos-reset-btn {
  flex: 0 0 auto;
}

.results-ranked-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.results-ranked-header .card-title {
  margin-bottom: 0;
}

.results-ranked-download-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.results-ranked-download-actions[hidden] {
  display: none !important;
}

.results-ranked-download-btn,
.results-ranked-word-btn {
  flex: 0 0 auto;
  color: var(--text-secondary, #9ba3af);
}

.results-ranked-download-btn:hover,
.results-ranked-word-btn:hover {
  color: var(--text-secondary, #9ba3af);
}

.results-ranked-download-btn {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.results-ranked-download-btn .results-ranked-pdf-icon {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.results-ranked-word-btn {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.results-ranked-word-btn .results-ranked-word-icon {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.results-ranked-download-btn[hidden] {
  display: none !important;
}

.results-ranked-grid {
  width: 100%;
}

.results-ranked-empty {
  width: 100%;
}

.results-summary-toggle-cell,
.results-summary-reports-cell {
  text-align: center;
}

.results-summary-position-report-btn {
  border-color: var(--warning);
  color: var(--warning);
  background: rgba(210, 153, 34, 0.08);
}

.results-summary-position-report-btn .results-summary-position-zip-icon {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.results-summary-position-report-btn:hover:not(:disabled) {
  border-color: var(--warning);
  color: var(--warning);
  background: rgba(210, 153, 34, 0.15);
}

.results-summary-position-row {
  font-weight: 600;
  cursor: pointer;
}

.results-summary-position-row:hover td {
  background: rgba(91, 138, 154, 0.05);
}

.results-summary-position-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.results-summary-position-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  color: var(--text-primary);
  font-weight: 600;
}

.results-summary-position-chevron {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform var(--transition);
}

.results-summary-position-label.is-expanded .results-summary-position-chevron {
  transform: rotate(180deg);
}

.results-summary-position-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-summary-col-count {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.results-summary-candidate-row td {
  background: var(--bg-tabbodyrow);
}

.results-summary-table tr.results-summary-candidate-row:hover td {
  background: var(--bg-tabbodyrow);
}

.results-summary-table {
  table-layout: fixed;
  width: 100%;
}

.results-summary-table th.results-summary-col-candidate,
.results-summary-table .results-summary-col-count,
.results-summary-table .results-summary-col-candidate {
  width: 16rem;
  min-width: 16rem;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-summary-col-candidate {
  padding-inline-start: 1.75rem;
  font-weight: 500;
}

.results-tracking-wrap {
  overflow-x: auto;
}

.results-tracking-table th,
.results-tracking-table td {
  white-space: nowrap;
  vertical-align: top;
}

.results-tracking-col-evaluator {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 9rem;
  max-width: 14rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: -1px 0 0 var(--border-subtle);
}

.results-tracking-table thead .results-tracking-col-evaluator {
  z-index: 3;
  background: #212C34;
}

.results-tracking-table tbody td.results-tracking-col-evaluator {
  background: var(--bg-primary);
}

.results-tracking-table tbody tr.results-tracking-main-row:hover > td {
  background: rgba(91, 138, 154, 0.05);
}

.results-tracking-table tbody tr.results-tracking-main-row:hover > td.results-tracking-col-evaluator {
  background: rgba(91, 138, 154, 0.05);
}

.results-tracking-sections {
  white-space: normal;
  min-width: 180px;
  max-width: 280px;
}

.results-tracking-sections-text {
  white-space: pre-line;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.results-tracking-score {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.results-tracking-score--total {
  color: var(--accent);
}

.results-tracking-average-cell {
  vertical-align: top;
}

.results-tracking-average-cell-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 1.25rem;
}

.results-tracking-comment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: help;
  flex-shrink: 0;
}

.results-tracking-comment-btn:hover {
  color: var(--accent);
}

.results-tracking-row--excluded .results-tracking-col-evaluator,
.results-tracking-row--excluded .results-tracking-col-candidate,
.results-tracking-row--excluded .results-tracking-col-position,
.results-tracking-row--excluded .results-tracking-col-college,
.results-tracking-row--excluded .results-tracking-col-branch,
.results-tracking-row--excluded .results-tracking-col-average {
  opacity: 0.5;
  color: var(--text-muted);
}

.results-tracking-row--excluded .results-tracking-candidate-label {
  color: var(--text-muted);
}

.results-tracking-row--excluded .results-tracking-candidate-chevron {
  opacity: 0.85;
}

.results-exclude-btn,
.results-tracking-report-btn {
  width: var(--def-normalbtn1-height);
  min-width: var(--def-normalbtn1-height);
  padding: 0;
}

.def-deletebtn1.results-exclude-btn {
  width: var(--def-deletebtn1-height);
  min-width: var(--def-deletebtn1-height);
}

.results-tracking-table th.results-tracking-col-center,
.results-tracking-table td.results-tracking-col-center,
.results-tracking-table th.results-tracking-col-exclude,
.results-tracking-table td.results-tracking-col-exclude,
.results-tracking-table th.results-tracking-col-report,
.results-tracking-table td.results-tracking-col-report {
  text-align: center;
}

.results-tracking-table th.results-tracking-col-exclude,
.results-tracking-table td.results-tracking-col-exclude,
.results-tracking-table th.results-tracking-col-report,
.results-tracking-table td.results-tracking-col-report {
  width: 1%;
  white-space: nowrap;
}

.results-tracking-col-candidate {
  min-width: 9rem;
  max-width: 16rem;
}

.results-tracking-main-row {
  cursor: pointer;
}

.results-tracking-main-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.results-tracking-candidate-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  color: var(--text-primary);
  font-weight: 600;
}

.results-tracking-candidate-chevron {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform var(--transition);
}

.results-tracking-candidate-label.is-expanded .results-tracking-candidate-chevron {
  transform: rotate(180deg);
}

.results-tracking-candidate-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-tracking-row-details .results-tracking-details-cell {
  padding: 0;
  white-space: normal;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table.results-tracking-table > tbody > tr.results-tracking-row-details:hover > td {
  background: var(--bg-primary);
}

.results-tracking-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.results-tracking-details-table th,
.results-tracking-details-table td {
  padding-inline: 1rem;
  text-align: center;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle);
}

.results-tracking-details-table th {
  padding-block: 0.25rem;
  background: var(--bg-tabbodyrow);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.results-tracking-details-table tbody td {
  padding-block: 0.65rem;
  background: var(--bg-tabbodyrow);
  color: var(--text-primary);
}

.results-tracking-details-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table.results-tracking-table .results-tracking-details-table thead th,
.data-table.results-tracking-table .results-tracking-details-table thead tr:hover > th,
.data-table.results-tracking-table > tbody > tr.results-tracking-row-details:hover .results-tracking-details-table thead th {
  background: var(--bg-tabbodyrow);
}

.data-table.results-tracking-table .results-tracking-details-table tbody td,
.data-table.results-tracking-table .results-tracking-details-table tbody tr:hover > td,
.data-table.results-tracking-table > tbody > tr.results-tracking-row-details:hover .results-tracking-details-table tbody td {
  background: var(--bg-tabbodyrow);
}

.results-tracking-details-section-header {
  white-space: normal;
  min-width: 5.5rem;
  max-width: 11rem;
  line-height: 1.35;
}

.results-tracking-details-section-score {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.results-tracking-details-table tbody .results-tracking-details-section-score,
.results-tracking-details-table tbody .results-tracking-score--total {
  color: var(--accent);
}

.results-tracking-row--excluded + .results-tracking-row-details .results-tracking-details-section-score {
  color: var(--text-muted);
}

.results-tracking-row--excluded + .results-tracking-row-details .results-tracking-details-table tbody td {
  color: var(--text-muted);
}

/* ── Offline gate / pack UI ── */
.offline-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at 30% 20%, rgba(30, 90, 78, 0.35), transparent 55%),
    linear-gradient(160deg, #0f1f1c 0%, #16352e 45%, #0c1815 100%);
}

.offline-gate-card {
  width: min(420px, 100%);
  padding: 2rem 1.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #1a2e2a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.offline-gate-logo {
  height: 64px;
  width: auto;
  margin-bottom: 0.75rem;
}

.offline-gate-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.offline-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.25rem 0 0.75rem;
}

.offline-gate-hint {
  font-size: 0.85rem;
  margin: 0;
}

.offline-pack-bar {
  align-items: center;
}

.offline-export-modes label {
  cursor: pointer;
}

.login-offline-badge {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2f6f62;
}

.login-import-hint {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0;
  color: var(--text-primary);
  font-weight: 500;
}

.login-import-hint-detail {
  font-weight: 400;
  color: var(--text-secondary);
}

.login-offline-notice {
  position: relative;
  width: 100%;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.login-offline-label {
  margin: 0;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: help;
  transition: color var(--transition);
}

.login-offline-notice:hover .login-offline-label,
.login-offline-notice:focus-within .login-offline-label {
  color: #ff7b72;
}

.login-offline-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 50%;
  width: min(160%, 36rem);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.55s;
}

.login-offline-notice:hover .login-offline-panel,
.login-offline-notice:focus-within .login-offline-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.login-offline-panel-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.65;
  text-align: center;
}

.login-import-skip {
  width: 100%;
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
