/* =========================================================
   Style strony: technician-detail (dane uzytkownika - technik zewnetrzny)
   Bazuje na arkuszu profilu; tu tylko elementy wlasne karty technika.
========================================================= */

/* pasek akcji pod tytulem: po lewej nawigacja i wysylki, po prawej Usun / Edytuj */
.tech-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tech-toolbar-left, .tech-toolbar-right { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background-color .18s ease, color .18s ease; }
.tech-btn i { font-size: 12px; }
.tech-btn:hover, .tech-btn:focus { text-decoration: none; }
.tech-btn-blue { background: #dce7fb; color: #2f56a6; }
.tech-btn-blue:hover { background: #c8d9f8; color: #244688; }
.tech-btn-orange { background: #fde3c4; color: #9a5a0c; }
.tech-btn-orange:hover { background: #f9d5a6; color: #7d4906; }
.tech-btn-gray { background: #eef1f5; color: #33475b; border: 1px solid #dfe5ee; }
.tech-btn-gray:hover { background: #e3e8ef; color: #0f2745; }
.tech-btn-red { background: #fbdada; color: #a52022; }
.tech-btn-red:hover { background: #f7c6c6; color: #8a1a1c; }
.tech-btn-green { background: #d3f2e1; color: #1b6b45; }
.tech-btn-green:hover { background: #bde9d0; color: #155637; }
.tech-status { margin: -4px 2px 14px; font-size: 13px; color: #1b6b45; }

/* dane uzytkownika - wiersze etykieta / wartosc */
.tech-help { margin-bottom: 14px; }
.tech-detail { display: flex; flex-direction: column; }
.tech-detail-row { display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid #eef2f7; }
.tech-detail-row:last-child { border-bottom: 0; }
.tech-detail-label { font-size: 13px; color: #6b7c8f; }
.tech-detail-value { font-size: 14px; font-weight: 600; color: #0f2745; overflow-wrap: anywhere; }
.tech-place-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; background: #fde3c4; color: #9a5a0c; font-size: 13px; font-weight: 700; text-decoration: none; }
.tech-place-chip:hover { background: #f9d5a6; color: #7d4906; text-decoration: none; }
.tech-empty { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 10px 14px; border-radius: 10px; background: #fdeff1; color: #a52022; font-size: 13px; font-weight: 600; }

/* okna */
.tech-modal-icon-blue { background: #dce7fb !important; color: #2f56a6 !important; }
/* przyciski potwierdzenia w oknach: pastelowe, bez czerwonej poswiaty z .btn-logout */
.tech-confirm-green { background: #d3f2e1 !important; color: #1b6b45 !important; border-color: #d3f2e1 !important; box-shadow: none !important; }
.tech-confirm-green:hover { background: #bde9d0 !important; color: #155637 !important; }
.tech-confirm-red { background: #fbdada !important; color: #a52022 !important; border-color: #fbdada !important; box-shadow: none !important; }
.tech-confirm-red:hover { background: #f7c6c6 !important; color: #8a1a1c !important; }
.tech-modal-icon-red { background: #fbdada !important; color: #a52022 !important; }
.premium-logout-modal .modal-cancel-btn { box-shadow: none !important; }
html[data-bs-theme="dark"] .tech-confirm-green { background: #1a3d2c !important; color: #9fe0bf !important; border-color: #1a3d2c !important; }
html[data-bs-theme="dark"] .tech-confirm-red { background: #4a2224 !important; color: #f2a9aa !important; border-color: #4a2224 !important; }
html[data-bs-theme="dark"] .tech-modal-icon-blue { background: #223454 !important; color: #a9c3f2 !important; }
html[data-bs-theme="dark"] .tech-modal-icon-red { background: #4a2224 !important; color: #f2a9aa !important; }
#techEditModal .modal-content { border: 0; border-radius: 16px; overflow: hidden; }
#techEditModal .modal-header { justify-content: flex-start; align-items: flex-start; gap: 14px; padding: 16px 22px; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.tech-modal-icon { width: 44px; height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #eef4fb; border: 2px solid #3a64a8; color: #2f5597; font-size: 19px; }
#techEditModal .modal-title { margin: 0; font-size: 16px; font-weight: 700; color: #111827; }
.tech-modal-sub { margin: 2px 0 0; font-size: 12.5px; color: #6b7c8f; }
.tech-edit-body { padding: 16px 22px; background: #f6f8fc; }
.tech-edit-card { background: #fff; border: 1px solid #eef2f7; border-radius: 12px; padding: 6px 16px; }
.tech-edit-field { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef1f5; }
.tech-edit-field:last-child { border-bottom: 0; }
.tech-edit-field label { margin: 0; font-size: 13px; color: #6b7c8f; }
.tech-edit-field .form-control { height: 36px; font-size: 13px; }
.tech-req { color: #a52022; }
.tech-edit-error { margin: 10px 0 0; font-size: 13px; color: #a52022; }
.tech-edit-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px; background: #fff; border-top: 1px solid #eef2f7; }
.tech-save-btn { height: 40px; padding: 0 18px; }

@media (max-width: 575.98px) {
    .tech-toolbar-left, .tech-toolbar-right { width: 100%; }
    .tech-detail-row, .tech-edit-field { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ciemny motyw */
html[data-bs-theme="dark"] .tech-btn-blue { background: #223454; color: #a9c3f2; }
html[data-bs-theme="dark"] .tech-btn-orange { background: #4a3416; color: #f6c98d; }
html[data-bs-theme="dark"] .tech-btn-gray { background: #2b3544; color: #c3cdda; border-color: #3a4a66; }
html[data-bs-theme="dark"] .tech-btn-red { background: #4a2224; color: #f2a9aa; }
html[data-bs-theme="dark"] .tech-btn-green { background: #1a3d2c; color: #9fe0bf; }
html[data-bs-theme="dark"] .tech-detail-row { border-bottom-color: #1b2f42; }
html[data-bs-theme="dark"] .tech-detail-label { color: #9fb0c9; }
html[data-bs-theme="dark"] .tech-detail-value { color: #e6edf7; }
html[data-bs-theme="dark"] .tech-place-chip { background: #4a3416; color: #f6c98d; }
html[data-bs-theme="dark"] .tech-empty { background: #2a1a1c; color: #f2a9aa; }
html[data-bs-theme="dark"] #techEditModal .modal-header { background: #172236; border-bottom-color: #24405a; }
html[data-bs-theme="dark"] #techEditModal .modal-title { color: #e6edf7; }
html[data-bs-theme="dark"] .tech-edit-body { background: #0b1626; }
html[data-bs-theme="dark"] .tech-edit-card, html[data-bs-theme="dark"] .tech-edit-footer { background: #10202f; border-color: #24405a; }

/* lokalizacja w danych uzytkownika to przycisk otwierajacy okno z danymi lokalizacji */
button.tech-place-chip { border: 0; cursor: pointer; }
#techPlaceModal .modal-content { border: 0; border-radius: 16px; overflow: hidden; }
#techPlaceModal .modal-header { justify-content: flex-start; align-items: flex-start; gap: 14px; padding: 16px 22px; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
#techPlaceModal .modal-title { margin: 0; font-size: 16px; font-weight: 700; color: #111827; }
.tech-place-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 3fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1f5; font-size: 13.5px; }
.tech-place-row:last-child { border-bottom: 0; }
.tech-place-row span { color: #6b7c8f; }
.tech-place-row strong { color: #0f2745; font-weight: 600; overflow-wrap: anywhere; }
#techPlaceModal .tech-edit-footer { justify-content: flex-end; }
html[data-bs-theme="dark"] #techPlaceModal .modal-header { background: #172236; border-bottom-color: #24405a; }
html[data-bs-theme="dark"] #techPlaceModal .modal-title, html[data-bs-theme="dark"] .tech-place-row strong { color: #e6edf7; }
html[data-bs-theme="dark"] .tech-place-row { border-bottom-color: #1b2f42; }
html[data-bs-theme="dark"] .tech-place-row span { color: #9fb0c9; }

/* lista tematow "Instrukcji" w naglowku karty: karta ucina wystajaca tresc (zaokraglone rogi),
   wiec na czas otwarcia listy karta ja pokazuje i lezy nad kartami ponizej */
.company-box:has(.billing-help-menu.show) { overflow: visible; position: relative; z-index: 20; }
.company-box:has(.billing-help-menu.show) > .company-header { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.company-box .billing-help-menu { z-index: 30; }

/* karty parami w dwoch kolumnach: Uprawnienia | Ustawienia RBH oraz Oddzialy | Regiony serwisowe */
.tech-two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.tech-two-cols > .company-box { margin-bottom: 0; }
@media (max-width: 991.98px) { .tech-two-cols { grid-template-columns: minmax(0, 1fr); } }

/* karty w parze tej samej wielkosci: rowna wysokosc kart i naglowkow (przycisk "Dodaj RBH" jest wyzszy od "Instrukcji") */
.tech-two-cols > .company-box { display: flex; flex-direction: column; }
.tech-two-cols > .company-box > .company-header { min-height: 64px; align-items: center; }
.tech-two-cols > .company-box > .company-content { flex: 1 1 auto; }

/* okno edycji: pola tylko do odczytu (login, e-mail) na szarym tle, lokalizacja z "Zmien" */
#techEditModal .form-control[readonly] { background: #f1f4f8; color: #6b7c8f; }
.tech-place-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.tech-place-current { font-size: 13.5px; font-weight: 600; color: #0f2745; }
.tech-mini-btn { height: 30px; padding: 0 12px; font-size: 12.5px; }
#techEditModal .tech-edit-field .form-select { height: 36px; font-size: 13px; }
html[data-bs-theme="dark"] #techEditModal .form-control[readonly] { background: #172236; color: #9fb0c9; }
html[data-bs-theme="dark"] .tech-place-current { color: #e6edf7; }

/* listy wyboru w oknie edycji (Rola, Lokalizacja po "Zmien") - strzalka "V" po prawej */
#techEditModal .form-select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7c8f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 12px 12px !important;
    cursor: pointer;
}
html[data-bs-theme="dark"] #techEditModal .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239fb0c9' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* uprawnienia jako prostokatne kafelki (jak w profilu): nadane niebieskie z "ptaszkiem", pozostale szare */
.tech-perm-label { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: #6b7c8f; }
html[data-bs-theme="dark"] .tech-perm-label { color: #9fb0c9; }

/* tytul okna PUSH: "Wyslij PUSH -> imie i nazwisko uzytkownika" */
#pushModal .push-title-arrow { font-size: .85em; margin: 0 4px; color: #9a5a0c; }
#pushModal .push-modal-sub strong { color: #2f56a6; font-weight: 700; }
html[data-bs-theme="dark"] #pushModal .push-title-arrow { color: #f6c98d; }
html[data-bs-theme="dark"] #pushModal .push-modal-sub strong { color: #a9c3f2; }
