/* Global zoom scales the desktop UI down slightly. On mobile (≤992px, the
   AdminLTE breakpoint for the off-canvas sidebar) `zoom` desynchronises
   vw/vh, position:fixed and AdminLTE's responsive math — which broke the
   login layout and the hamburger/sidebar overlay. Restrict zoom to desktop. */
@media (min-width: 993px) {
  body { zoom: 0.9; }
}

.small-box {
    min-height: 12vh;
}

.inicials{
    padding-bottom: 0px !important;
    margin: 0px !important;
}
.inicials p{
    padding-bottom: 0px !important;
    margin: 0px !important;
}

.employe-card {
    max-height: 26vh !important;
}

.time_spend{
    color:white;
}
/*  dropzone styles */
.dropzone .dz-error {
    border: 2px dashed red;
    background: #ffe6e6;
}

.dropzone .dz-error-message {
    color: red;
    font-size: 13px;
    text-align: center;
}

/* ---------------------- Dropzone wrapper -------------------------------------------- */

/* Make the whole dropzone card cleaner */
#dropzone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    background: none;
    padding: 20px;
    transition: border-color 0.3s ease;
  }
  
  /* Highlight on hover */
  #dropzone.dz-drag-hover {
    border-color: #007bff;
    background: #eef6ff;
  }
  
  /* Centered message */
  #dropzone .dz-message {
    font-size: 16px;
    color: #777;
    margin: 1em 0;
  }
  
  /* Previews smaller & aligned inline */
  #dropzone .dz-preview {
    display: inline-block;
    width: 100px;
    margin: 10px;
    vertical-align: top;
  }
  
  #dropzone .dz-preview img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* File info (name + size) below preview */
  #dropzone .dz-details {
    font-size: 12px;
    text-align: center;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Remove icon */
  #dropzone .dz-remove {
    display: block;
    text-align: center;
    color: #dc3545;
    font-size: 12px;
    text-decoration: none;
    margin-top: 4px;
  }
  
  #dropzone .dz-remove:hover {
    text-decoration: underline;
  }

  .dz-image{
    width: 100px !important;
    height: 100px !important;
  }
  

/* ----------------------------------------------- end of dropzone styles  ------------------------------ */

[data-letters]:before {
    content: attr(data-letters);
    display: inline-block;
    font-size: 1em;
    width: 3em;
    height: 3em;
    line-height: 3em;
    text-align: center;
    border-radius: 50%;
    background: #17a2b8;
    vertical-align: middle;
    margin-right: 1em;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.active-button {
    font-weight: 600;
}

.active-button [data-letters]:before {
    border: solid 2px #007bff;
    background: #007bff;
}

.ticketPreview {
    cursor: pointer;
}

.ticketStatsCard {
    cursor: pointer;
}

#ticketHistoryTimeline {
    height: 85vh;
    overflow-y: auto;
  }

/* #ticketTable_wrapper {
    height: 75vh;
    overflow-y: auto;
  }
  
 #ticketListCard {
    height: 70vh;
  } */

.modal-backdrop{
  width: 100% !important;
  height: 100% !important;
}


/* === GALERIA ZAŁĄCZNIKÓW ============================================== */
.attachment-item            { position: relative; overflow: hidden; }
.attachment-item img        { width: 100%; height: auto; display: block; border-radius: .25rem; }

/* przycisk kasowania */
.attachment-delete-btn      {
  position: absolute;      top: 4px; right: 4px;
  width: 22px; height: 22px;
  padding: 0; border-radius: 50%;
  font-size: 12px; line-height: 22px;
  opacity: 0; transition: opacity .15s;
  pointer-events: auto;    /* ważne – przyjmuje kliknięcia */
}
.attachment-item:hover .attachment-delete-btn { opacity: .9; }  /* pojawia się dopiero na hover */

/* opcjonalnie – delikatny zoom na hover */
.attachment-item:hover img { transform: scale(1.04); transition: transform .2s; }

.asignEmploye{
  cursor: pointer;
}
.name-tag {
    font-weight: 500;
    font-size: 0.85rem;
    color: #333;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.name-tag.placeholder {
    color: #aaa;
    font-size: 1.5vh;
}

.name-tag.placeholder.addEmployeToTicket {
    background-color: #e0f0ff;
    color: #007bff;
    font-weight: 600;
    cursor: pointer;
    border: 1px dashed #007bff;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.name-tag.placeholder.addEmployeToTicket:hover {
    background-color: #d0e8ff;
}
/* 1) Etykiety: znormalizuj wysokość i szerokość */
.form-group.inline > label {
    font-weight: 500;      /* zamiast domyślnego 700      */
    line-height: 1.5;      /* == .btn  */
    width: 110px;          /* stała szerokość kolumny      */
    margin-bottom: 0;      /* zero odstępu pod etykietą    */
}

/* 2) Przyciski: mniejszy padding, wyrównanie do środka */
.form-group.inline .btn-group .btn {
    padding: .25rem .5rem; /* ciaśniej w pionie            */
    font-size: .875rem;    /* ~14 px – jak etykieta        */
}

.badge-lg {
    font-size: 90%;          /* domyślnie .badge to ~75 % */
    padding: .45em .7em;     /* szersze marginesy */
    line-height: 1.1;
    border-radius: .35rem;   /* nieco bardziej „pill” */
}
#ticketTable td{
  padding: 0.40rem !important;
}

    /* --- Ticket history — clean look over AdminLTE timeline --- */
#ticketHistoryTimeline .timeline > div { margin-bottom: 16px; }

.timeline-item {
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.timeline-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  transform: translateY(-1px);
  transition: all .15s ease;
}

.timeline-item .time {
  font-size: .85rem;
  color: #6c757d;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 0 !important;
}

.rma-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: #f4f6f9;
  font-weight: 600;
  letter-spacing: .2px;
}

.status-badge {
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: .5rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-open    { background:#e6f4ff; color:#095aba; }
.status-pending { background:#fff4e6; color:#a66400; }
.status-progress{ background:#f0f7ff; color:#0b70d0; }
.status-closed  { background:#e9f7ef; color:#1b7a32; }
.status-cancel  { background:#fdecea; color:#a61b1b; }

.timeline-body p {
  margin-bottom: .35rem;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === DataTables: mobile scaling / Buttons overflow fixes === */
.dataTables_wrapper .dt-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
  margin-bottom: .5rem;
}

.dataTables_wrapper .dt-buttons .dt-button,
.dataTables_wrapper .dt-buttons .btn {
  margin: 0;
}

/* === DataTables export/colvis buttons — widoczne w obu motywach ===
   Bez tego przyciski Excel/PDF/Druk/Kolumny renderowane jako .btn-outline-*
   są przezroczyste i "znikają" na ciemnym tle (białe na jasnym). */
.dataTables_wrapper .dt-buttons .dt-button,
.dataTables_wrapper .dt-buttons .btn.dt-button {
  display: inline-flex !important;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: #fff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.dataTables_wrapper .dt-buttons .dt-button i {
  opacity: .9;
}
.dataTables_wrapper .dt-buttons .dt-button:hover {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, .25);
  color: #0f172a;
}
/* Kolorystyczne akcenty per typ przycisku (klasy nadaje customer.js / ticket.js itd.) */
.dataTables_wrapper .dt-buttons .btn-outline-success { color: #157347; border-color: rgba(21,115,71,.4); }
.dataTables_wrapper .dt-buttons .btn-outline-success:hover { background: rgba(21,115,71,.1); color: #0f5132; }
.dataTables_wrapper .dt-buttons .btn-outline-danger { color: #b02a37; border-color: rgba(176,42,55,.4); }
.dataTables_wrapper .dt-buttons .btn-outline-danger:hover { background: rgba(176,42,55,.1); color: #842029; }
.dataTables_wrapper .dt-buttons .btn-outline-secondary { color: #495057; border-color: rgba(73,80,87,.4); }
.dataTables_wrapper .dt-buttons .btn-outline-secondary:hover { background: rgba(73,80,87,.1); color: #343a40; }
.dataTables_wrapper .dt-buttons .btn-outline-info { color: #087990; border-color: rgba(8,121,144,.4); }
.dataTables_wrapper .dt-buttons .btn-outline-info:hover { background: rgba(8,121,144,.1); color: #055160; }

/* Dark mode: rozjaśnij tekst i ramki, ciemne tło */
.dark-mode .dataTables_wrapper .dt-buttons .dt-button,
.dark-mode .dataTables_wrapper .dt-buttons .btn.dt-button {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .18);
  color: #cbd5e1;
  box-shadow: none;
}
.dark-mode .dataTables_wrapper .dt-buttons .dt-button:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .32);
  color: #f1f5f9;
}
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-success { color: #4ade80; border-color: rgba(74,222,128,.4); }
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-success:hover { background: rgba(74,222,128,.16); color: #86efac; }
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-danger { color: #ff8b95; border-color: rgba(220,53,69,.4); }
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-danger:hover { background: rgba(220,53,69,.16); color: #ffb3ba; }
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-secondary { color: #adb5bd; border-color: rgba(173,181,189,.35); }
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-secondary:hover { background: rgba(173,181,189,.14); color: #dee2e6; }
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-info { color: #67e8f9; border-color: rgba(103,232,249,.35); }
.dark-mode .dataTables_wrapper .dt-buttons .btn-outline-info:hover { background: rgba(103,232,249,.14); color: #a5f3fc; }

@media (max-width: 576px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dt-buttons {
    width: 100%;
  }

  .dataTables_wrapper .dt-buttons {
    justify-content: flex-start;
  }

  .dataTables_wrapper .dataTables_filter label {
    width: 100%;
    margin: 0;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* Buttons collection (ColVis, export collections) */
  div.dt-button-collection {
    left: auto !important;
    right: .5rem !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}


/* ============================================================================
   KLIENCI — nowoczesny, gęsty widok listy (view/customers/customers.php)
   ========================================================================== */

/* Toolbar, wyszukiwarka i przyciski eksportu są teraz standardowe (jak w
   tabeli zgłoszeń) — sterowane przez opcję `dom` w scripts/customer.js oraz
   globalne style .dataTables_wrapper wyżej w tym pliku. Tu zostają wyłącznie
   style zawartości komórek. */

#costomer_table td { vertical-align: middle; }

/* ── Kolumna Klient ──────────────────────────────────────────────────────── */
.cust-client { display: flex; align-items: center; gap: 11px; }
.cust-avatar {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .82rem;
  letter-spacing: .02em;
  box-shadow: 0 4px 10px -4px rgba(15, 23, 42, .45);
}
.cust-client-body { display: flex; flex-direction: column; min-width: 0; }
.cust-name {
  font-weight: 700; color: #0f172a; line-height: 1.2;
  text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 260px;
}
.cust-name:hover { color: #3b8bba; text-decoration: none; }
.cust-login {
  font-size: .72rem; color: #94a3b8; margin-top: 1px;
  display: inline-flex; align-items: center; gap: 3px;
}
.cust-login i { font-size: .62rem; opacity: .8; }

/* ── Kolumny Telefon / Email (pigułki) ───────────────────────────────────── */
.cust-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 260px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .05);
  color: #475569;
  font-size: .78rem;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.cust-chip i { font-size: .7rem; opacity: .75; }
.cust-chip span, .cust-chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-chip:hover { background: rgba(59, 139, 186, .14); color: #2c6e94; }

/* ── Kolumna Lokalizacja ─────────────────────────────────────────────────── */
.cust-loc { display: flex; flex-direction: column; }
.cust-loc-main {
  display: inline-flex; align-items: center; gap: 6px;
  color: #334155; font-weight: 600; font-size: .82rem;
}
.cust-loc-main i { color: #ef4444; font-size: .72rem; }
.cust-loc-sub { font-size: .74rem; color: #94a3b8; margin-top: 1px; }

/* ── Kolumna Ocena ───────────────────────────────────────────────────────── */
.cust-rating {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-weight: 700; font-size: .78rem;
}
.cust-rating i { font-size: .7rem; }
.cust-rating-max { font-weight: 500; opacity: .6; font-size: .68rem; }
.cust-rating-good { background: rgba(16, 185, 129, .14); color: #0f766e; }
.cust-rating-mid  { background: rgba(245, 158, 11, .16); color: #b45309; }
.cust-rating-low  { background: rgba(239, 68, 68, .14); color: #b91c1c; }
.cust-rating-none { color: #cbd5e1; font-weight: 500; }

/* ── Kolumny Zgłoszenia / Zamówienia ─────────────────────────────────────── */
.cust-count {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px;
  font-weight: 700; font-size: .78rem;
}
.cust-count i { font-size: .7rem; opacity: .85; }
.cust-count-has  { background: rgba(59, 139, 186, .13); color: #2c6e94; }
.cust-count-zero { background: rgba(15, 23, 42, .05); color: #b6c0cc; font-weight: 600; }

/* ── Kolumna Akcje ───────────────────────────────────────────────────────── */
.cust-actions { display: inline-flex; gap: 5px; justify-content: flex-end; }
.cust-act {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: .82rem;
  cursor: pointer;
  transition: transform .1s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.cust-act:hover { transform: translateY(-1px); text-decoration: none; }
.cust-act-primary { background: rgba(59, 139, 186, .12); color: #2c6e94; }
.cust-act-primary:hover { background: #3b8bba; color: #fff; }
.cust-act-info { background: rgba(14, 165, 233, .1); color: #0284c7; }
.cust-act-info:hover { background: #0ea5e9; color: #fff; }
.cust-act-danger { background: rgba(239, 68, 68, .1); color: #dc2626; }
.cust-act-danger:hover { background: #ef4444; color: #fff; }

/* ── Dark mode (tylko zawartość komórek; obudowę tabeli obsługuje AdminLTE) ── */
.dark-mode .cust-name { color: #f1f5f9; }
.dark-mode .cust-name:hover { color: #5fb0d6; }
.dark-mode .cust-login { color: #64748b; }
.dark-mode .cust-chip { background: rgba(255, 255, 255, .06); color: #cbd5e1; }
.dark-mode .cust-chip:hover { background: rgba(95, 176, 214, .2); color: #a8d8ec; }
.dark-mode .cust-count-has  { background: rgba(95, 176, 214, .2); color: #a8d8ec; }
.dark-mode .cust-count-zero { background: rgba(255, 255, 255, .06); color: #64748b; }
.dark-mode .cust-loc-main { color: #cbd5e1; }
.dark-mode .cust-loc-sub { color: #64748b; }
.dark-mode .cust-rating-good { background: rgba(16, 185, 129, .2); color: #6ee7b7; }
.dark-mode .cust-rating-mid  { background: rgba(245, 158, 11, .22); color: #fcd34d; }
.dark-mode .cust-rating-low  { background: rgba(239, 68, 68, .22); color: #fca5a5; }
.dark-mode .cust-rating-none { color: #475569; }
.dark-mode .cust-act-primary { background: rgba(95, 176, 214, .18); color: #a8d8ec; }
.dark-mode .cust-act-primary:hover { background: #3b8bba; color: #fff; }
.dark-mode .cust-act-info { background: rgba(56, 189, 248, .16); color: #7dd3fc; }
.dark-mode .cust-act-info:hover { background: #0ea5e9; color: #fff; }
.dark-mode .cust-act-danger { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.dark-mode .cust-act-danger:hover { background: #ef4444; color: #fff; }

/* ── Responsywność ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cust-name { max-width: 160px; }
  .cust-chip { max-width: 190px; }
}


/* ============================================================================
   Wspólne style formularzy w stylu "Szczegóły zgłoszenia" (klasy stb-*).
   Pierwotnie żyły tylko w view/tickets/single_ticket.php, więc komponent
   single_customer_info.php działał tam poprawnie, ale na stronie profilu
   klienta (view/customers/profile.php) był bez stylów. Przeniesione tutaj,
   bo servicemanago.css ładuje każda strona (view/components/header.php).
   Style specyficzne dla ticketu (stb-title-input, stb-tag, stb-extras) zostają
   w single_ticket.php.
   ========================================================================== */
:root { --stb-fg-rgb: 33, 37, 41; }
.dark-mode { --stb-fg-rgb: 248, 249, 250; }

.stb-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.stb-meta-cell { display: flex; flex-direction: column; gap: 4px; }
.stb-meta-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: rgba(var(--stb-fg-rgb, 0, 0, 0), .45);
}
.stb-input, .stb-select {
  width: 100%;
  border: 1px solid rgba(var(--stb-fg-rgb, 0, 0, 0), .12);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: .88rem;
  font-weight: 600;
  background: transparent;
  color: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.stb-input:focus, .stb-select:focus {
  border-color: rgba(13, 110, 253, .4);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .08);
}
.stb-input[readonly], .stb-input[disabled], .stb-textarea[disabled] {
  background: rgba(var(--stb-fg-rgb, 0, 0, 0), .04);
  opacity: .75;
  cursor: default;
}
.stb-select { appearance: auto; cursor: pointer; }

.stb-desc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: rgba(var(--stb-fg-rgb, 0, 0, 0), .4);
}
.stb-desc-header i { font-size: .7rem; }
.stb-textarea {
  width: 100%;
  border: 1px solid rgba(var(--stb-fg-rgb, 0, 0, 0), .12);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .9rem;
  line-height: 1.5;
  background: transparent;
  color: inherit;
  resize: vertical;
  min-height: 60px;
  outline: none;
  transition: border-color .15s ease;
}
.stb-textarea:focus { border-color: rgba(13, 110, 253, .4); }

.dark-mode .stb-input, .dark-mode .stb-select, .dark-mode .stb-textarea {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
  color: #f8f9fa;
}
.dark-mode .stb-select option, .dark-mode .stb-select optgroup {
  background: #343a40;
  color: #f8f9fa;
}
.dark-mode .stb-input[readonly], .dark-mode .stb-input[disabled], .dark-mode .stb-textarea[disabled] {
  background: rgba(255, 255, 255, .04);
}
