.foreign-entry-surface {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 28rem),
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 26rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 46%, #f8fafc 100%);
}

.foreign-entry-glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
}

.foreign-entry-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.08);
}

.foreign-entry-table-wrap {
  scrollbar-color: #94a3b8 transparent;
}

.foreign-entry-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.foreign-entry-input,
.foreign-entry-select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.foreign-entry-input:focus,
.foreign-entry-select:focus {
  border-color: rgba(99, 102, 241, 0.65) !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.foreign-entry-input[readonly] {
  background-color: #f8fafc;
}

.foreign-entry-checkbox {
  accent-color: #4f46e5;
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.foreign-entry-category-option {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4.25rem;
  padding: 0.95rem 1rem !important;
  border-radius: 1.1rem !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.foreign-entry-category-option:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.38) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.foreign-entry-category-option .foreign-entry-category-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #334155;
  min-width: 0;
}

.foreign-entry-category-option .foreign-entry-checkbox {
  width: 1.2rem !important;
  height: 1.2rem !important;
  margin-top: 0;
}

.foreign-entry-delete-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 3rem !important;
  height: 3rem !important;
  border-radius: 0.75rem !important;
  border: 1px solid #be123c !important;
  background: #e11d48 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(190, 24, 93, 0.2) !important;
}

.foreign-entry-delete-button:hover {
  background: #be123c !important;
}

.foreign-entry-delete-button svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
  stroke: currentColor !important;
}

.riderCard {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(226, 232, 240, 0.9);
}

.riderCard > div:first-child {
  background: rgba(248, 250, 252, 0.86);
  border-color: rgba(226, 232, 240, 0.9);
}

.riderCard .foreign-entry-subpanel {
  background: rgba(248, 250, 252, 0.82);
  border-color: rgba(226, 232, 240, 0.9);
}

.riderCard .foreign-entry-category-option {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(203, 213, 225, 0.95);
}

.riderCard .foreign-entry-note {
  background: rgba(224, 231, 255, 0.72);
  color: #312e81;
}

html.dark body,
html.dark .foreign-entry-surface {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.2), transparent 24rem),
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.22), transparent 22rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%) !important;
}

html.dark .foreign-entry-glass {
  background: rgba(15, 23, 42, 0.72);
}

html.dark .foreign-entry-panel {
  background: rgba(15, 23, 42, 0.82) !important;
  border-color: rgba(71, 85, 105, 0.8) !important;
  box-shadow: 0 32px 90px rgba(2, 6, 23, 0.44) !important;
}

html.dark .foreign-entry-table,
html.dark .foreign-entry-tbody,
html.dark .foreign-entry-row,
html.dark .foreign-entry-cell {
  background-color: transparent !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html.dark .foreign-entry-input,
html.dark .foreign-entry-select {
  background-color: rgba(15, 23, 42, 0.9) !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc !important;
}

html.dark .foreign-entry-input[readonly] {
  background-color: rgba(15, 23, 42, 0.72) !important;
}

html.dark .foreign-entry-input::placeholder {
  color: #94a3b8;
}

html.dark .foreign-entry-input::-webkit-datetime-edit,
html.dark .foreign-entry-input::-webkit-datetime-edit-text,
html.dark .foreign-entry-input::-webkit-datetime-edit-month-field,
html.dark .foreign-entry-input::-webkit-datetime-edit-day-field,
html.dark .foreign-entry-input::-webkit-datetime-edit-year-field,
html.dark .foreign-entry-input::-webkit-inner-spin-button,
html.dark .foreign-entry-input::-webkit-calendar-picker-indicator {
  color: #f8fafc !important;
}

html.dark .foreign-entry-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

html.dark .foreign-entry-select option {
  background-color: #0f172a;
  color: #f8fafc;
}

html.dark .foreign-entry-checkbox {
  background-color: #0f172a !important;
  border: 1px solid #64748b !important;
  border-radius: 0.25rem;
  box-shadow: none !important;
}

html.dark .foreign-entry-checkbox:checked {
  background-color: #6366f1 !important;
  border-color: #6366f1 !important;
}

html.dark .riderCard {
  background: rgba(15, 23, 42, 0.68) !important;
  border-color: rgba(71, 85, 105, 0.85) !important;
}

html.dark .riderCard > div:first-child {
  background: rgba(15, 23, 42, 0.88) !important;
  border-color: rgba(71, 85, 105, 0.85) !important;
}

html.dark .riderCard .foreign-entry-subpanel {
  background: rgba(15, 23, 42, 0.74) !important;
  border-color: rgba(71, 85, 105, 0.85) !important;
}

html.dark .riderCard .foreign-entry-category-option {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(71, 85, 105, 0.92) !important;
  color: #f8fafc !important;
}

html.dark .foreign-entry-category-option .foreign-entry-category-title {
  color: #f8fafc;
}

html.dark .foreign-entry-category-option .foreign-entry-category-meta {
  color: #94a3b8;
}

html.dark .riderCard .foreign-entry-note {
  background: rgba(49, 46, 129, 0.28) !important;
  color: #c7d2fe !important;
}
