form {
  margin: 0;
}

a {
  text-decoration: none;
  color: #2563eb;
}
a:hover {
  text-decoration: underline;
  color: #dc2626;
}

.sub_n {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  text-decoration: none;
}
.sub {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  font-weight: normal;
}

.nagl_black {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
}

.nagl_blue {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}
.nagl_blue_s {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 16px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}
.nagl_blue_d {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 20px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}

.nagl_red {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
}
.nagl_red_s {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 16px;
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
}
.nagl_red_d {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 20px;
  color: #dc2626;
  text-decoration: none;
  font-weight: 700;
}

.nagl_zolty {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #f59e0b;
  text-decoration: none;
  font-weight: 600;
}

.nagl_green_s {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 16px;
  color: #059669;
  text-decoration: none;
  font-weight: 600;
}

.nagl_braz_s {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 16px;
  color: #92400e;
  text-decoration: none;
  font-weight: 600;
}

.links {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #dc2626;
  text-decoration: none;
  font-weight: normal;
}

.tekst_druk {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 15px;
  color: #374151;
  text-decoration: none;
  font-weight: 600;
}
.tekst {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  font-weight: normal;
  line-height: 1.6;
  text-align: justify;
}
.tekst_szary {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #9ca3af;
  text-decoration: none;
  text-align: justify;
}
.tekst_c_szary {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  text-align: justify;
}
.szary {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #9ca3af;
  text-decoration: none;
  font-weight: normal;
}
.c_szary {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  font-weight: normal;
}
.c_szary_maly {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
  font-weight: normal;
}
.c_maly {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 12px;
  color: #374151;
  text-decoration: none;
  font-weight: normal;
}

.b_maly {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 12px;
  color: #9ca3af;
  text-decoration: none;
  font-weight: normal;
  letter-spacing: 0.1em;
}
.b_maly2 {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 12px;
  color: #374151;
  text-decoration: none;
  font-weight: normal;
}
a.b_maly:hover {
  color: #6b7280;
}

a.sub_n:hover,
a.nagl_blue:hover,
a.nagl_red_s:hover,
a.nagl_blue_s:hover,
a.nagl_green_s:hover,
a.nagl_red:hover,
a.links:hover,
a.szary:hover {
  color: #f59e0b;
  text-decoration: underline;
}
a.nagl_black:hover {
  color: #dc2626;
  text-decoration: underline;
}
a.sub:hover {
  color: #f59e0b;
  text-decoration: underline;
}

blockquote {
  margin-bottom: 0px;
  margin-top: 0px;
  margin-right: 0px;
}
ul {
  list-style-type: disc;
  list-style-position: outside;
  font-size: 14px;
  margin-right: 0px;
  margin-left: 10px;
  margin-bottom: 0px;
  margin-top: 0px;
}

table {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  font-weight: normal;
  line-height: 1.6;
}
.komorka {
  background-color: #f5f5f0;
}

.form,
select {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  background-color: #fffef7;
  color: #333300;
  border: 1px #cccccc solid;
  transition: border-color 0.2s ease-in-out;
}
input,
textarea {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  background-color: #fffef7;
  color: #333300;
  border: 1px #cccccc solid;
  transition: border-color 0.2s ease-in-out;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.in_r {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  background-color: #fffef0;
  color: #333300;
  border: 1px #cccccc solid;
  text-align: right;
  width: 100%;
  min-width: 45px;
}

.m_w {
  width: 100%;
  min-width: 200px;
}

/* Radio buttons i checkboxy */
input[type='radio'],
input[type='checkbox'] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #cccccc;
  background-color: #fffef7;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  vertical-align: middle;
  margin-right: 6px;
}

input[type='radio'] {
  border-radius: 50%;
}

input[type='checkbox'] {
  border-radius: 3px;
}

input[type='radio']:checked {
  background-color: #93c5fd;
  border-color: #60a5fa;
  position: relative;
}

input[type='radio']:checked::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

input[type='checkbox']:checked {
  background-color: #93c5fd;
  border-color: #60a5fa;
  position: relative;
}

input[type='checkbox']:checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

input[type='radio']:focus,
input[type='checkbox']:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type='radio']:hover,
input[type='checkbox']:hover {
  border-color: #9ca3af;
}

.radio {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
}

input.submit,
input.button,
.butt {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #374151;
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  border: 1px #d1d5db solid;
  border-radius: 4px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  min-width: 140px;
  height: 30px;
  white-space: nowrap;
}

input.submit:hover,
input.button:hover,
.butt:hover {
  background: linear-gradient(to bottom, #e9ecef, #dee2e6);
  border-color: #9ca3af;
}

.butt_neutral {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #6b7280;
  background: transparent;
  border: 1px #d1d5db solid;
  border-radius: 4px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  min-width: 140px;
  height: 30px;
  white-space: nowrap;
}

.butt_neutral:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.butt_red {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #b91c1c;
  background: linear-gradient(to bottom, #fef2f2, #fee2e2);
  border: 1px #f9a8a8 solid;
  border-radius: 4px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(185, 28, 28, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  min-width: 140px;
  height: 30px;
  white-space: nowrap;
}

.butt_red:hover {
  background: linear-gradient(to bottom, #fee2e2, #fecaca);
  border-color: #f87171;
}

/* Linki z klasami przycisków */
a.butt,
a.butt_red,
a.butt_neutral {
  text-decoration: none !important;
  color: inherit;
}

a.butt:hover,
a.butt_red:hover,
a.butt_neutral:hover {
  text-decoration: none !important;
  color: inherit;
}

.border {
  border: 1px #cccccc solid;
}

BODY {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  background-color: #fffef5;
  color: #374151;
  line-height: 1.6;
}

/* input type number no arrows */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.summary {
  cursor: pointer;
  font-weight: 600;
  color: #dc2626;
  font-size: 16px;
}

/* container */
.container {
  height: 100vh;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  box-sizing: border-box;
}

.content {
  width: auto;
  max-width: 100%;
  min-width: 100%;
}

@media (min-width: 1024px) {
  .content {
    min-width: 1024px;
  }
}

/* Dodatkowe style dla lepszej dostępności */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Delikatne ramki dla tabel formularzowych */
.form-table {
  border: 1px solid #e5e7eb;
  border-collapse: collapse;
}

.form-table td {
  border: 1px solid #f3f4f6;
}

/* Elastyczny kontener główny */
.main-container {
  transition: max-width 0.3s ease;
}

/* Responsywność formularza logowania */
@media (max-width: 900px) {
  /* Na małych ekranach panele po prawej stronie chowamy */
  .login-panels {
    display: none !important;
  }

  /* Upewniamy się, że kontener formularza nie powoduje poziomego przewijania */
  .login-container > div {
    flex-direction: column !important;
    align-items: center !important;
  }
}

@media (max-width: 400px) {
  /* Na bardzo małych ekranach zapobiegamy uciekaniu formularza w lewo */
  .login-container {
    justify-content: flex-start !important;
    padding: 10px !important;
  }

  .login-container > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  .login-container > div > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-height: 700px) {
  /* Przy niskim oknie zmniejszamy odstępy */
  .login-container {
    padding: 10px 0 !important;
  }
}

@media (max-height: 500px) {
  /* Przy bardzo niskim oknie dalej zmniejszamy odstępy */
  .login-container {
    padding: 5px 0 !important;
  }
}

/* Style dla input file - custom file upload button */
.file-input-wrapper {
  position: relative;
  display: inline-block;
}

.file-input-wrapper input[type='file'] {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.file-input-label {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  color: #374151;
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  border: 1px #d1d5db solid;
  border-radius: 4px;
  /* padding: 4px 8px; */
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  min-width: 100px;
  height: 30px;
  white-space: nowrap;
  text-decoration: none;
}

.file-input-label:hover {
  background: linear-gradient(to bottom, #e9ecef, #dee2e6);
  border-color: #9ca3af;
  text-decoration: none;
}

.file-input-label:focus-within {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.file-selected {
  margin-left: 8px;
  font-size: 12px;
  color: #059669;
  font-weight: 500;
}

/* Slim Select styles for dictionary fields */
.ss-main {
  border: 1px #cccccc solid !important;
  border-radius: 0 !important; /* Usuń zaokrąglenia - jak zwykłe inputy */
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif !important;
  font-size: 14px !important;
  background-color: #fffef7 !important;
  color: #333300 !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease-in-out !important;
  padding: 0 !important; /* Usuń domyślny padding */
  min-height: 23px !important;
}

/* Style dla głównego tekstu w Slim Select - upodobnienie do zwykłego selecta */
.ss-single {
  padding: 2px 6px !important; /* Minimalny padding jak w zwykłym select */
  line-height: 1.2 !important;
  font-size: 14px !important;
  color: #333300 !important;
}

.ss-single-selected {
  padding: 2px 6px !important;
  line-height: 1.2 !important;
  font-size: 14px !important;
  color: #333300 !important;
}

.ss-main:focus {
  border-color: #059669 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* Style dla elementów błędnych - czerwona ramka i wykrzyknik */
.dict-error .ss-main {
  border-color: #dc2626 !important;
  background-color: #fff3cd !important;
}

.dict-error .ss-main .ss-single,
.dict-error .ss-main .ss-single-selected,
.dict-error .ss-main .ss-placeholder,
.dict-error .ss-main .ss-values .ss-single {
  color: #dc2626 !important;
  font-weight: bold !important;
}

/* Specjalnie dla wykrzyknika w opcjach */
.ss-option[data-id*='popraw'] {
  color: #dc2626 !important;
  font-weight: bold !important;
}

/* Wykrzyknik w wybranej opcji */
option[style*='#fff3cd'] {
  color: #dc2626 !important;
}

/* Wykrzyknik w ss-single (główny wyświetlany tekst) */
.ss-single.has-error {
  color: #dc2626 !important;
  font-weight: bold !important;
}

/* Dropdown lista opcji */
.ss-content {
  border: 1px #cccccc solid !important;
  border-radius: 0 !important; /* Usuń zaokrąglenia - jak zwykłe inputy */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
  background-color: #fffef7 !important;
  min-width: max-content !important; /* Co najmniej szerokość najszerszej opcji */
  max-width: 1024px !important; /* Maksymalna szerokość dropdown */
}

.ss-option {
  padding: 8px 12px !important;
  font-size: 14px !important;
  color: #333300 !important;
  background-color: #fffef7 !important;
}

.ss-option:hover {
  background-color: #f3f4f6 !important;
}

.ss-option.ss-highlighted {
  background-color: #059669 !important;
  color: white !important;
}

/* Zaznaczona opcja - wyróżnienie */
.ss-option.ss-selected {
  background-color: #e0f2e7 !important; /* Jasny zielony tło */
  color: #065f46 !important; /* Ciemny zielony tekst */
  font-weight: bold !important;
}

/* Style dla wyszukiwania */
.ss-search input {
  border: 1px #cccccc solid !important;
  border-radius: 0 !important; /* Usuń zaokrąglenia - jak zwykłe inputy */
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
    sans-serif !important;
  font-size: 14px !important;
  background-color: #fffef7 !important;
  color: #333300 !important;
  padding: 6px 8px !important;
}

.ss-search input:focus {
  border-color: #059669 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* Style dla tooltipów weryfikacji */
.custom-tooltip {
  position: relative;
  display: inline-block;
}

.custom-tooltip .tooltip-text {
  visibility: hidden;
  background-color: #ffffff;
  color: #374151;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -65px;
  font-size: 12px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
}

.custom-tooltip .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

.custom-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Nowa funkcjonalność: Style dla read-only wartości [nn,nn,nn.d] */
/* .readonly-value i .readonly-empty są stylowane przez kontener nadrzędny */
