
/* Loading / Spinner */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  color: #999;
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid #333;
  border-top-color: var(--tg-theme-link-color, #2481cc);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Score cards */
.score-cards {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
}
.score-card {
  flex: 1;
  min-width: 0;
  background: #1e2c3a;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.score-card-emoji { font-size: 20px; margin-bottom: 4px; }
.score-card-title { font-size: 12px; color: #999; margin-bottom: 2px; }
.score-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.score-card-badge.good { background: rgba(34,197,94,0.15); color: #22c55e; }
.score-card-badge.warning { background: rgba(234,179,8,0.15); color: #eab308; }
.score-card-badge.bad { background: rgba(239,68,68,0.15); color: #ef4444; }
.score-card-detail { font-size: 11px; color: #777; margin-top: 4px; }

/* Accordion */
.accordion-list { padding: 10px 0 0; }
.accordion {
  background: #1e2c3a;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
  overflow: hidden;
}
.accordion-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
}
.accordion-header:active { background: rgba(128,128,128,0.08); }
.accordion-emoji { font-size: 20px; flex-shrink: 0; }
.accordion-title { flex: 1; font-size: 15px; font-weight: 500; }
.accordion-subtitle { font-size: 12px; font-weight: 400; color: #eab308; margin-top: 2px; }
.accordion-chevron {
  width: 20px; height: 20px; color: #666;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.accordion.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  display: none;
  padding: 0 16px 16px;
}
.accordion.open .accordion-body { display: block; }

/* Form fields */
.field-group { margin-bottom: 14px; }
.field-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
  display: block;
}
.field-input {
  width: 100%;
  background: #263545;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #e4e6eb;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.field-input:focus { border-color: var(--tg-theme-link-color, #2481cc); }
.field-input::placeholder { color: #555; }
textarea.field-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}
select.field-input { appearance: none; cursor: pointer; }
input[type="date"].field-input { appearance: none; -webkit-appearance: none; min-width: 0; max-width: 100%; }

/* Contact verification */
.contact-unconfirmed .field-input { border-color: rgba(250, 204, 21, 0.45); }
.contact-confirmed .field-input { border-color: rgba(74, 222, 128, 0.35); }
.contact-verify-row { display: flex; gap: 8px; align-items: stretch; }
.contact-verify-row .field-input { flex: 1; min-width: 0; }
.btn-verify-contact {
  flex-shrink: 0;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 8px;
  color: #facc15;
  font-size: 12px;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
  transition: opacity 0.15s;
}
.btn-verify-contact:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-verify-contact svg { flex-shrink: 0; }
.contact-warn-badge { color: #facc15; font-size: 12px; margin-left: 4px; font-style: normal; }
.contact-ok-badge { color: rgba(74, 222, 128, 0.8); font-size: 12px; margin-left: 4px; }
.otp-verify-row { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.otp-code-input {
  width: 80px;
  text-align: center;
  letter-spacing: 6px;
  font-size: 18px;
  font-weight: 600;
  background: #263545;
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 8px;
  padding: 8px 4px;
  color: #e4e6eb;
  outline: none;
  font-family: inherit;
}
.unconfirmed-accordion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 204, 21, 0.18);
  color: #facc15;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
}
.accordion-badge-red {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}
.accordion-badge-warn {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
}

/* Tags input */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: #263545;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  min-height: 42px;
  cursor: text;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(36,129,204,0.2);
  color: #7bb8e8;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
}
.tag-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 16px;
  line-height: 1;
}
.tag-remove:hover { opacity: 1; }
.tags-input {
  border: none;
  background: none;
  color: #e4e6eb;
  font-size: 13px;
  outline: none;
  flex: 1;
  min-width: 80px;
}

/* Repeatable rows (sea service, certificates) */
.repeatable-row {
  background: #263545;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}
.repeatable-row .field-group { margin-bottom: 10px; }
.repeatable-row .field-group:last-child { margin-bottom: 0; }
.row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
}
.repeatable-row.collapsed .row-header { margin-bottom: 0; }
.repeatable-row.collapsed .row-body { display: none; }
.row-body { margin-top: 10px; }
.row-chevron {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3c7;
  flex-shrink: 0;
  transition: transform 0.2s;
  margin-right: 6px;
}
.repeatable-row.collapsed .row-chevron { transform: rotate(-90deg); }
.row-title { font-size: 13px; font-weight: 600; color: #e4e6eb; }
.row-title-sub { font-size: 11px; font-weight: 400; color: #9ca3c7; margin-top: 2px; }
.row-title-wrap { display: flex; flex-direction: column; flex: 1; min-width: 0; }
/* Кнопка удаления в заголовке строки — только на веб-странице (embedded) */
.row-delete-btn { display: none; }
.embedded-constructor .row-delete-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0; margin-left: 6px;
  border: none; background: transparent; cursor: pointer;
  color: #9ca3c7; border-radius: 6px; opacity: 0; transition: opacity 0.15s;
}
.embedded-constructor .row-header:hover .row-delete-btn,
.embedded-constructor .row-delete-btn:focus { opacity: 1; }
.embedded-constructor .row-delete-btn:hover { background: rgba(239,68,68,0.12); color: #ef4444; }
.embedded-constructor .row-delete-btn svg { width: 16px; height: 16px; }
.cert-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}
.cert-group { margin-bottom: 2px; }
.cert-group-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6b7280;
  padding: 10px 0 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.cert-group:first-child .cert-group-header { padding-top: 0; }
.cert-group-chevron {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: #6b7280;
}
.cert-group.collapsed .cert-group-chevron { transform: rotate(-90deg); }
.cert-group.collapsed .cert-group-items { display: none; }
.cert-group-items { padding-left: 20px; }
.cert-group-label { color: #6b7280; }
.cert-group-count {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3c7;
  margin-left: auto;
}
.cert-group-summary { margin-left: auto; }
/* Alert dot for groups/accordions with expiring/expired documents */
.cert-alert-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  margin-left: 6px;
  flex-shrink: 0;
  line-height: 1;
}
.cert-alert-dot-warn { background: rgba(234,179,8,0.2); color: #eab308; }
.cert-alert-dot-exp  { background: rgba(239,68,68,0.2); color: #ef4444; }
.cert-group-header.needs-clarification,
.cert-group-header.needs-clarification .cert-group-label,
.cert-group-header.needs-clarification .cert-group-chevron { color: #818cf8; }
.cert-badge-ok  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.cert-badge-unknown { background: rgba(99,102,241,0.15); color: #818cf8; }
.cert-badge-warn { background: rgba(234,179,8,0.15); color: #eab308; }
.cert-badge-exp { background: rgba(239,68,68,0.15);  color: #ef4444; }
/* Cert row status backgrounds — layered tint on dark base */
.cert-row-expired { background: linear-gradient(rgba(239,68,68,0.13), rgba(239,68,68,0.13)), #263545 !important; border-color: rgba(239,68,68,0.25) !important; }
.cert-row-warning { background: linear-gradient(rgba(234,179,8,0.13), rgba(234,179,8,0.13)), #263545 !important; border-color: rgba(234,179,8,0.25) !important; }
.cert-row-ok { background: linear-gradient(rgba(34,197,94,0.13), rgba(34,197,94,0.13)), #263545 !important; border-color: rgba(34,197,94,0.25) !important; }
/* Field-level highlighting for filled fields within status rows */
.cert-row-ok .field-input.field-filled,
.cert-row-ok .select-field-btn:not(.placeholder) {
  background: linear-gradient(rgba(34,197,94,0.18), rgba(34,197,94,0.18)), #263545;
  border-color: rgba(34,197,94,0.3);
}
.cert-row-warning .field-input.field-filled,
.cert-row-warning .select-field-btn:not(.placeholder) {
  background: linear-gradient(rgba(234,179,8,0.18), rgba(234,179,8,0.18)), #263545;
  border-color: rgba(234,179,8,0.3);
}
.cert-row-expired .field-input.field-filled,
.cert-row-expired .select-field-btn:not(.placeholder) {
  background: linear-gradient(rgba(239,68,68,0.18), rgba(239,68,68,0.18)), #263545;
  border-color: rgba(239,68,68,0.3);
}
/* Swipe to delete */
.swipe-container {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 8px;
}
.swipe-container .repeatable-row { margin-bottom: 0; border-radius: 10px; }
.swipe-content {
  position: relative;
  z-index: 1;
  background: #1e2c3a;
  border-radius: 10px;
}
.swipe-action {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  z-index: 0;
  border-radius: 0 10px 10px 0;
}
.swipe-action svg { width: 22px; height: 22px; color: #fff; }
.btn-remove-row {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.btn-remove-row:active { background: rgba(239,68,68,0.1); }
.row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.row-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.row-full { grid-column: 1 / -1; }
.btn-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  background: rgba(36,129,204,0.08);
  border: 1px dashed rgba(36,129,204,0.3);
  border-radius: 10px;
  color: var(--tg-theme-link-color, #2481cc);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 8px;
}
.btn-add-row:active { background: rgba(36,129,204,0.15); }

.btn-action {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn-action:active { opacity: 0.8; }
.btn-primary {
  background: var(--tg-theme-button-color, #4f46e5);
  color: var(--tg-theme-button-text-color, #fff);
}
.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #e4e6eb;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a2540;
  color: #e4e6eb;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.visible { opacity: 1; }

/* Email modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 50;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #0f1629;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 360px;
  border: 1px solid rgba(255,255,255,0.1);
}
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn-action { flex: 1; }

/* Saving indicator */
.save-indicator {
  font-size: 12px;
  color: #22c55e;
  opacity: 0;
  transition: opacity 0.3s;
  margin-left: 8px;
}
.save-indicator.visible { opacity: 1; }

/* Select field (single / multi popup) */
.select-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.select-field-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e4e6eb;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  gap: 8px;
}
.select-field-btn.placeholder { color: #6b7280; }
.select-field-btn svg { flex-shrink: 0; opacity: 0.5; }
.select-field-btn.field-error { border-color: rgba(239,68,68,0.55); }
.cv-popup-lang-level-picker {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0 10px 20px;
}
.cv-popup-level-btn {
  padding: 5px 13px;
  border-radius: 14px;
  border: 1.5px solid rgba(59,130,246,0.45);
  background: rgba(59,130,246,0.10);
  color: #93c5fd;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.cv-popup-level-btn:active { transform: scale(0.96); }

/* Vessel & IMO autocomplete */
.vessel-autocomplete, .imo-autocomplete, .company-autocomplete { position: relative; }
.vessel-ac-input-wrap { position: relative; }
.vessel-ac-input-wrap .field-input { padding-right: 36px; }
.vessel-ac-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.35;
  pointer-events: none;
}
.vessel-ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #1e2740;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.vessel-ac-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vessel-ac-item:last-child { border-bottom: none; }
.vessel-ac-item:active { background: rgba(255,255,255,0.07); }
.vessel-ac-name { font-size: 14px; color: #e4e6eb; font-weight: 500; }
.vessel-ac-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* Universal CV popup overlay */
.cv-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.cv-popup-overlay.active { display: flex; }
.cv-popup {
  width: 100%;
  max-width: 480px;
  background: #1e2c3a;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  animation: cvPopupSlideUp 0.25s ease-out;
}
@keyframes cvPopupSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cv-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cv-popup-title {
  font-size: 17px;
  font-weight: 600;
  color: #f1f5f9;
}
.cv-popup-close {
  background: none;
  border: none;
  color: #9ca3c7;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.cv-popup-hint {
  padding: 6px 20px 0;
  font-size: 12px;
  color: #9ca3c7;
  flex-shrink: 0;
}
.cv-popup-search-wrap {
  padding: 10px 16px 4px;
  flex-shrink: 0;
}
.cv-popup-search {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 8px 12px;
  color: #e4e6eb;
  font-size: 14px;
  outline: none;
}
.cv-popup-search::placeholder { color: #6b7280; }
.cv-popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px 24px;
  overflow-y: auto;
}
.cv-popup-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(148,163,184,0.3);
  background: transparent;
  color: #c9cfe0;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}
.cv-popup-tag:active { transform: scale(0.96); }
.cv-popup-tag.selected {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.cv-popup-tag.clear-tag {
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}
.cv-popup-group-label {
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  padding: 8px 0 2px;
}
.cv-popup-group-label:first-child { padding-top: 0; }
.cv-popup-tag.has-children {
  background: linear-gradient(135deg, rgba(59,130,246,0.10) 0%, rgba(99,102,241,0.08) 100%);
  border-color: rgba(99,102,241,0.25);
}
.cv-popup-tag.has-children::after {
  content: '›';
  margin-left: 6px;
  font-size: 16px;
  opacity: 0.5;
}
.cv-popup-back {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 0 10px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
  border: none;
  background: none;
}
.cv-popup-back:active { opacity: 0.6; }
.cv-popup-back svg { flex-shrink: 0; }
.cv-popup-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cv-popup-save {
  width: 100%;
  padding: 12px;
  background: #3b82f6;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Light theme ===== */
body.light-theme .score-card {
  background: #eceff4;
  border-color: rgba(0,0,0,0.08);
}
body.light-theme .score-card-title { color: #6b7280; }
body.light-theme .score-card-detail { color: #6b7280; }
body.light-theme .score-card-badge.good { background: rgba(22,163,74,0.1); color: #15803d; }
body.light-theme .score-card-badge.warning { background: rgba(202,138,4,0.1); color: #a16207; }
body.light-theme .score-card-badge.bad { background: rgba(220,38,38,0.1); color: #dc2626; }

body.light-theme .accordion {
  background: #eceff4;
  border-color: rgba(0,0,0,0.08);
}
body.light-theme .accordion-title { color: #374151; }
body.light-theme .accordion-subtitle { color: #a16207; }
body.light-theme .accordion-chevron { color: #9ca3af; }
body.light-theme .accordion-header:active { background: rgba(0,0,0,0.03); }

body.light-theme .field-label { color: #6b7280; }
body.light-theme .field-input {
  background: #f3f4f6;
  border-color: rgba(0,0,0,0.10);
  color: #374151;
}
body.light-theme .field-input::placeholder { color: #9ca3af; }
body.light-theme .contact-unconfirmed .field-input { border-color: rgba(202, 138, 4, 0.5); }
body.light-theme .contact-confirmed .field-input { border-color: rgba(22, 163, 74, 0.4); }
body.light-theme .btn-verify-contact {
  background: rgba(202, 138, 4, 0.1);
  border-color: rgba(202, 138, 4, 0.35);
  color: #b45309;
}
body.light-theme .otp-code-input {
  background: #f3f4f6;
  color: #374151;
  border-color: rgba(202, 138, 4, 0.4);
}
body.light-theme .contact-warn-badge { color: #b45309; }
body.light-theme .contact-ok-badge { color: #16a34a; }
body.light-theme .unconfirmed-accordion-badge {
  background: rgba(202, 138, 4, 0.15);
  color: #b45309;
}
body.light-theme .accordion-badge-red {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}
body.light-theme .accordion-badge-warn {
  background: rgba(202, 138, 4, 0.15);
  color: #b45309;
}

body.light-theme .tags-container {
  background: #f3f4f6;
  border-color: rgba(0,0,0,0.10);
}
body.light-theme .tag {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
}
body.light-theme .tags-input { color: #374151; }

body.light-theme .repeatable-row {
  background: #f3f4f6;
  border-color: rgba(0,0,0,0.06);
}
body.light-theme .row-title { color: #374151; }
body.light-theme .row-title-sub { color: #6b7280; }
body.light-theme .row-chevron { color: #9ca3af; }

body.light-theme .cert-badge-ok { background: rgba(22,163,74,0.1); color: #15803d; }
body.light-theme .cert-badge-unknown { background: rgba(99,102,241,0.1); color: #6366f1; }
body.light-theme .cert-badge-warn { background: rgba(202,138,4,0.1); color: #a16207; }
body.light-theme .cert-badge-exp { background: rgba(220,38,38,0.1); color: #dc2626; }
body.light-theme .cert-row-expired { background: rgba(239,68,68,0.06) !important; border-color: rgba(239,68,68,0.18) !important; }
body.light-theme .cert-row-warning { background: rgba(234,179,8,0.06) !important; border-color: rgba(234,179,8,0.18) !important; }
body.light-theme .cert-row-ok { background: rgba(34,197,94,0.06) !important; border-color: rgba(34,197,94,0.18) !important; }
body.light-theme .cert-row-ok .field-input.field-filled,
body.light-theme .cert-row-ok .select-field-btn:not(.placeholder) {
  background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.2);
}
body.light-theme .cert-row-warning .field-input.field-filled,
body.light-theme .cert-row-warning .select-field-btn:not(.placeholder) {
  background: rgba(234,179,8,0.08); border-color: rgba(234,179,8,0.2);
}
body.light-theme .cert-row-expired .field-input.field-filled,
body.light-theme .cert-row-expired .select-field-btn:not(.placeholder) {
  background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2);
}
body.light-theme .cert-group-count { color: #6b7280; }
body.light-theme .cert-alert-dot-warn { background: rgba(202,138,4,0.12); color: #a16207; }
body.light-theme .cert-alert-dot-exp  { background: rgba(220,38,38,0.12); color: #dc2626; }

body.light-theme .swipe-content { background: #eceff4; }

body.light-theme .select-field-btn {
  background: #f3f4f6;
  border-color: rgba(0,0,0,0.10);
  color: #374151;
}
body.light-theme .select-field-btn.placeholder { color: #9ca3af; }
body.light-theme .select-field-btn.field-error { border-color: rgba(220,38,38,0.5); }
body.light-theme .cv-popup-level-btn { background: rgba(59,130,246,0.07); border-color: rgba(59,130,246,0.35); color: #1d4ed8; }

body.light-theme .btn-add-row {
  background: rgba(59,130,246,0.05);
  border-color: rgba(59,130,246,0.25);
}

body.light-theme .btn-secondary {
  background: rgba(0,0,0,0.05);
  color: #374151;
}

body.light-theme .vessel-ac-dropdown {
  background: #eceff4;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
body.light-theme .vessel-ac-item { border-bottom-color: rgba(0,0,0,0.06); }
body.light-theme .vessel-ac-item:active { background: rgba(0,0,0,0.04); }
body.light-theme .vessel-ac-name { color: #374151; }

body.light-theme .cv-popup {
  background: #eceff4;
}
body.light-theme .cv-popup-header { border-bottom-color: rgba(0,0,0,0.08); }
body.light-theme .cv-popup-title { color: #374151; }
body.light-theme .cv-popup-close { color: #9ca3af; }
body.light-theme .cv-popup-hint { color: #6b7280; }
body.light-theme .cv-popup-search {
  background: #f3f4f6;
  border-color: rgba(0,0,0,0.10);
  color: #374151;
}
body.light-theme .cv-popup-search::placeholder { color: #9ca3af; }
body.light-theme .cv-popup-tag {
  border-color: rgba(0,0,0,0.15);
  color: #374151;
}
body.light-theme .cv-popup-tag.has-children {
  background: rgba(59,130,246,0.06);
  border-color: rgba(99,102,241,0.2);
}
body.light-theme .cv-popup-footer { border-top-color: rgba(0,0,0,0.08); }

body.light-theme .modal-box {
  background: #eceff4;
  border-color: rgba(0,0,0,0.10);
}
body.light-theme .modal-title { color: #374151; }

body.light-theme .toast {
  background: #1a1a1a;
  color: #ffffff;
}

body.light-theme .loading { color: #6b7280; }
body.light-theme .spinner { border-color: #d1d5db; border-top-color: #3b82f6; }
