/* 
  BEKERFARB - System Serwisowy CSS Stylesheet
  Design System: Premium Dark Theme, Glassmorphism, Micro-animations
*/

:root {
  /* Kolory Bekerfarb */
  --color-primary: #d32f2f;
  /* Bekerfarb Red */
  --color-primary-hover: #b71c1c;
  --color-primary-light: rgba(211, 47, 47, 0.08);
  --color-primary-glow: rgba(211, 47, 47, 0.2);

  /* Jasny Motyw - Tło i Panele (Bardzo wysoki kontrast, elegancki wygląd) */
  --bg-app: #f1f5f9;
  /* Jasne tło (Slate 100) */
  --bg-sidebar: #ffffff;
  /* Biały pasek boczny */
  --bg-card: #ffffff;
  /* Białe karty */
  --bg-card-hover: #f8fafc;
  /* Bardzo jasny hover (Slate 50) */
  --bg-header: rgba(255, 255, 255, 0.85);
  /* Półprzezroczysty biały nagłówek */

  /* Teksty */
  --text-primary: #0f172a;
  /* Ciemnogranatowy tekst dla doskonałej widoczności (Slate 900) */
  --text-secondary: #475569;
  /* Ciemnoszary dla opisów drugorzędnych (Slate 600) */
  --text-muted: #64748b;
  /* Szary dla pomocniczych tekstów (Slate 500) */

  /* Statusy (Wyraźne kolory dla jasnego tła) */
  --status-new: #0284c7;
  /* Ciemniejszy błękit */
  --status-accepted: #7c3aed;
  /* Ciemniejszy fiolet */
  --status-diagnosis: #d97706;
  /* Ciemniejszy pomarańcz */
  --status-repair: #2563eb;
  /* Ciemniejszy niebieski */
  --status-ready: #059669;
  /* Ciemniejsza zieleń */
  --status-billed: #db2777;
  /* Ciemniejszy róż */
  --status-released: #475569;
  /* Szary */

  /* Ramki i Efekty */
  --border-color: #e2e8f0;
  /* Wyraźna ramka w jasnym motywie (Slate 200) */
  --border-focus: rgba(211, 47, 47, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* Czcionka */
  --font-family: 'Outfit', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Reset standardowych styli */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-sidebar);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
}

/* Layout Główny */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Pasek Boczny */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.logo-bold {
  color: var(--text-primary);
}

.logo-light {
  color: var(--color-primary);
}

.logo-sub {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 4px;
  font-weight: 600;
}

.sidebar-menu {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-fast);
}

.menu-item span.material-icons-round {
  font-size: 22px;
}

.menu-item:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.04);
}

.menu-item.active {
  color: var(--text-primary);
  background-color: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  box-shadow: inset 5px 0 10px rgba(211, 47, 47, 0.05);
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.15);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-indicator.online {
  background-color: var(--status-ready);
  box-shadow: 0 0 8px var(--status-ready);
}

/* Główny obszar */
.main-layout {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Nagłówek */
.app-header {
  height: 85px;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  backdrop-filter: blur(10px);
  z-index: 5;
}

.app-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.app-header p {
  font-size: 13px;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Przełącznik roli */
.role-selector-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.role-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-label span.material-icons-round {
  font-size: 16px;
  color: var(--color-primary);
}

.role-dropdown {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.role-dropdown option {
  background-color: var(--bg-sidebar);
  color: var(--text-primary);
}

/* Profil użytkownika */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

#user-role-badge {
  display: none;
}

/* Kontener główny treści */
.content-container {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
}

/* Loader */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Karty statystyk (Dashboard) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon span {
  font-size: 26px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  opacity: 0.7;
}

.stat-card.new .stat-icon {
  background: rgba(56, 189, 248, 0.1);
  color: var(--status-new);
}

.stat-card.new::after {
  background-color: var(--status-new);
}

.stat-card.waiting-delivery .stat-icon {
  background: rgba(56, 189, 248, 0.1);
  color: var(--status-new);
}

.stat-card.waiting-delivery::after {
  background-color: var(--status-new);
}

.stat-card.awaiting-acceptance .stat-icon {
  background: rgba(124, 58, 237, 0.1);
  color: var(--status-accepted);
}

.stat-card.awaiting-acceptance::after {
  background-color: var(--status-accepted);
}

.stat-card.to-price .stat-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--status-diagnosis);
}

.stat-card.to-price::after {
  background-color: var(--status-diagnosis);
}

.stat-card.active .stat-icon {
  background: rgba(59, 130, 246, 0.1);
  color: var(--status-repair);
}

.stat-card.active::after {
  background-color: var(--status-repair);
}

.stat-card.ready .stat-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-ready);
}

.stat-card.ready::after {
  background-color: var(--status-ready);
}

.stat-card.unpaid .stat-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--status-diagnosis);
}

.stat-card.unpaid::after {
  background-color: var(--status-diagnosis);
}

.stat-card.released .stat-icon {
  background: rgba(71, 85, 105, 0.1);
  color: var(--status-released);
}

.stat-card.released::after {
  background-color: var(--status-released);
}

.stat-card.total .stat-icon {
  background: rgba(211, 47, 47, 0.1);
  color: var(--color-primary);
}

.stat-card.total::after {
  background-color: var(--color-primary);
}

/* Filtry i sekcja nagłówkowa tabeli */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px 12px 48px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.search-box span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-filter {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px var(--color-primary-glow);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Lista / Tabela Zleceń */
.table-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.orders-table th {
  background-color: rgba(0, 0, 0, 0.15);
  padding: 16px 24px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.orders-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

.orders-table tr:last-child td {
  border-bottom: none;
}

.orders-table tr {
  transition: var(--transition-fast);
  cursor: pointer;
}

.orders-table tr:hover {
  background-color: var(--bg-card-hover);
}

.order-id {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.device-info {
  display: flex;
  flex-direction: column;
}

.device-model {
  font-weight: 600;
}

.device-sn {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.customer-info {
  display: flex;
  flex-direction: column;
}

.customer-name {
  font-weight: 500;
}

.customer-status {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Odznaki Statusów (Badges) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge.status-new {
  background: rgba(56, 189, 248, 0.1);
  color: var(--status-new);
}

.badge.status-new::before {
  background-color: var(--status-new);
}

.badge.status-accepted {
  background: rgba(168, 85, 247, 0.1);
  color: var(--status-accepted);
}

.badge.status-accepted::before {
  background-color: var(--status-accepted);
}

.badge.status-diagnosis {
  background: rgba(245, 158, 11, 0.1);
  color: var(--status-diagnosis);
}

.badge.status-diagnosis::before {
  background-color: var(--status-diagnosis);
}

.badge.status-repair {
  background: rgba(59, 130, 246, 0.1);
  color: var(--status-repair);
}

.badge.status-repair::before {
  background-color: var(--status-repair);
}

.badge.status-ready {
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-ready);
}

.badge.status-ready::before {
  background-color: var(--status-ready);
}

.badge.status-billed {
  background: rgba(236, 72, 153, 0.1);
  color: var(--status-billed);
}

.badge.status-billed::before {
  background-color: var(--status-billed);
}

.badge.status-released {
  background: rgba(100, 116, 139, 0.1);
  color: var(--status-released);
}

.badge.status-released::before {
  background-color: var(--status-released);
}

.btn-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-only {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-icon-only:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Formularze i Karty Detali */
.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.form-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card h2 span.material-icons-round {
  color: var(--color-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Weryfikacja statusu gwarancji (GUS / system) */
.verification-badge-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* Checkbox grupy */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding: 12px;
  background-color: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Przebieg naprawy - Timeline */
.timeline-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.timeline-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  z-index: 2;
}

.timeline-item.active .timeline-dot {
  background-color: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary-glow);
}

.timeline-item.done .timeline-dot {
  background-color: var(--status-ready);
}

.timeline-item.pending .timeline-dot {
  background-color: var(--text-muted);
}

.timeline-content {
  display: flex;
  flex-direction: column;
}

.timeline-title {
  font-size: 13px;
  font-weight: 700;
}

.timeline-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Ewidencja pracy na Karcie Pracy */
.table-editor {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  margin-bottom: 24px;
}

.table-editor th {
  text-align: left;
  padding: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
}

.table-editor td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-color);
}

.table-editor input {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  width: 100%;
  outline: none;
}

.table-editor input:focus {
  border-color: var(--color-primary);
}

/* Wymiar finansowy podsumowania */
.pricing-summary {
  background-color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
  border: 1px solid var(--border-color);
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-row.total {
  border-top: 2px solid var(--border-color);
  margin-top: 12px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Sekcja Dokumentacji Zdjęciowej */
.photo-uploader {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.photo-container {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-container .delete-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.upload-placeholder {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.upload-placeholder:hover {
  border-color: var(--color-primary);
  color: var(--text-primary);
}

.upload-placeholder span {
  font-size: 28px;
  margin-bottom: 4px;
}

.upload-placeholder p {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Podpisy Cyfrowe (Tablet E-Signature) */
.signature-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.signature-pad {
  border: 1px dashed #cbd5e1;
  background-color: #f8fafc;
  border-radius: var(--radius-md);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  cursor: crosshair;
}

.signature-pad.has-sig {
  color: var(--text-primary);
  font-family: 'Dancing Script', cursive, sans-serif;
  font-size: 26px;
  font-style: italic;
  font-weight: 600;
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-small {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-small:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Powiadomienia TOAST (Popupy) */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  animation: slideIn 0.35s forwards;
  min-width: 300px;
}

.toast.success {
  border-left-color: var(--status-ready);
}

.toast.info {
  border-left-color: var(--status-new);
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

/* Karta zlecenia - Nagłówek u góry widoku detali */
.details-header-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-title-block h2 {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-meta {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.order-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-meta span.material-icons-round {
  font-size: 16px;
}

/* Wycena dla klienta (Kosztorys z e-akceptacją) */
.approval-panel {
  background-color: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
}

.approval-panel.approved {
  background-color: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.approval-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.approval-status-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.approval-status-title.pending {
  color: var(--status-diagnosis);
}

.approval-status-title.approved {
  color: var(--status-ready);
}

.approval-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.approval-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

/* Kartoteka klientów i statystyki */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.customer-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.customer-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.customer-card-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.customer-card-row span.label {
  color: var(--text-muted);
}

.device-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.device-tag {
  background-color: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Wydruk (Print) - Nadpisanie styli */
/* ========================================================
   WYDRUK DOKUMENTÓW (NATIVE PRINTING OVERRIDES & STYLES)
   ======================================================== */

#print-area {
  display: none;
}

@media print {

  /* Ukryj cały główny interfejs aplikacji */
  .app-container,
  .toast-container {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    overflow: visible !important;
    height: auto !important;
  }

  #print-area {
    display: block !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 10px;
    width: 100%;
    font-size: 13px;
  }

  /* Bekerfarb Nagłówek Dokumentu */
  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #d32f2f;
    padding-bottom: 15px;
    margin-bottom: 25px;
  }

  .print-logo-container {
    display: flex;
    flex-direction: column;
  }

  .print-logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
  }

  .print-logo-text span.red {
    color: #d32f2f;
  }

  .print-logo-sub {
    font-size: 10px;
    color: #555555;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
  }

  .print-doc-title {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: right;
    color: #333333;
    max-width: 60%;
  }

  /* Sekcje Dokumentu */
  .print-section {
    margin-bottom: 20px;
  }

  .print-section h3 {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 4px;
    margin-bottom: 10px;
    color: #000000;
  }

  /* Grid pól */
  .print-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin-bottom: 8px;
  }

  .print-grid.full {
    grid-template-columns: 1fr;
  }

  .print-field {
    display: flex;
    font-size: 13px;
    line-height: 1.4;
  }

  .print-field .label {
    font-weight: 700;
    color: #333333;
    margin-right: 6px;
    flex-shrink: 0;
  }

  .print-field .value {
    color: #000000;
    border-bottom: 1px dotted #888888;
    flex-grow: 1;
    min-height: 18px;
  }

  /* Pola tekstowe / uwag */
  .print-textarea {
    border: 1px solid #aaaaaa;
    padding: 10px;
    min-height: 80px;
    font-size: 12px;
    line-height: 1.5;
    background: #fafafa;
    border-radius: 4px;
  }

  /* Checkboxy */
  .print-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    background: #f8fafc;
    border: 1px solid #dddddd;
    padding: 10px;
    border-radius: 4px;
  }

  .print-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
  }

  .print-checkbox span.box {
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
  }

  /* Tabela części / prac */
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
  }

  .print-table th {
    background-color: #f0f0f0;
    border: 1px solid #cccccc;
    padding: 8px 10px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    text-align: left;
  }

  .print-table td {
    border: 1px solid #cccccc;
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Stopka finansowa */
  .print-pricing {
    border: 1px solid #000000;
    background: #fdfdfd;
    padding: 15px;
    margin-top: 15px;
    width: 320px;
    margin-left: auto;
  }

  .print-pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
  }

  .print-pricing-row.total {
    border-top: 1.5px solid #000000;
    margin-top: 6px;
    padding-top: 6px;
    font-weight: 800;
    font-size: 15px;
  }

  /* Panel podpisów */
  .print-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 45px;
    page-break-inside: avoid;
  }

  .print-sig-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .print-sig-line {
    width: 80%;
    border-bottom: 1px dotted #000000;
    height: 40px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-style: italic;
  }

  .print-sig-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #555555;
    font-weight: 700;
  }

  /* Informacja o kontakcie w stopce strony */
  .print-footer-info {
    margin-top: 50px;
    border-top: 1px solid #dddddd;
    padding-top: 10px;
    text-align: center;
    font-size: 10px;
    color: #666666;
    display: flex;
    justify-content: center;
    gap: 20px;
  }
}

/* --- LOGIN SCREEN STYLES --- */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.99) 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.login-header {
  margin-bottom: 24px;
}

.login-header .logo {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
}

.login-header .logo-bold {
  color: var(--color-primary);
}

.login-header .logo-light {
  color: var(--text-primary);
}

.login-header .logo-sub {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 20px;
}

.input-with-icon input {
  padding-left: 44px !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

.input-with-icon input:focus {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--color-primary) !important;
}

.login-btn {
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.login-error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- WORK LOG TIMER STYLES --- */
.timer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.timer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
}

.timer-display-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-time-val {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 1px;
}

.timer-status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.timer-status-stopped {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.timer-status-running {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  animation: pulse-border 1.5s infinite ease-in-out;
}

@keyframes pulse-border {
  0% {
    opacity: 0.8;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 0.8;
  }
}

.timer-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-timer-start {
  background: #22c55e;
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-timer-start:hover {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-timer-stop {
  background: #ef4444;
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-timer-stop:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-timer-adjust {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-timer-adjust:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Modale dla czasu pracy i audytu */
.worklog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 23, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.worklog-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.worklog-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.worklog-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.worklog-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.worklog-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.worklog-history-table th {
  text-align: left;
  padding: 10px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
}

.worklog-history-table td {
  padding: 12px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: top;
}

.worklog-history-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.worklog-audit-change-badge {
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  font-weight: 600;
}

/* Oś czasu przepływu zlecenia (Workflow Timeline Stepper) */
.workflow-stepper {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 32px;
  gap: 12px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}

.stepper-step {
  flex: 1;
  min-width: 135px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: var(--transition-normal);
}

.stepper-step:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.stepper-step.active {
  background: rgba(2, 132, 199, 0.08);
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.2);
}

.stepper-step .step-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  position: absolute;
  top: 8px;
  right: 8px;
  transition: var(--transition-normal);
}

.stepper-step.active .step-badge {
  background: var(--color-primary);
  color: white;
}

.stepper-step.has-items .step-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stepper-step.active.has-items .step-badge {
  background: var(--color-primary);
  color: white;
}

.stepper-step .step-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--text-secondary);
  transition: var(--transition-normal);
}

.stepper-step:hover .step-icon,
.stepper-step.active .step-icon {
  background: var(--color-primary);
  color: white;
}

.stepper-step .step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.stepper-step.active .step-label {
  color: var(--text-main);
  font-weight: 700;
}

/* ==========================================
   WIDOK: PLANER SERWISOWY
   ========================================== */
.planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}

@media (max-width: 1400px) {
  .planner-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.planner-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.planner-week-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Widok Tygodniowy - Macierz */
.planner-grid-wrapper {
  overflow-x: auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.planner-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.planner-table th,
.planner-table td {
  border: 1px solid var(--border-color);
  padding: 10px;
  vertical-align: top;
}

.planner-table th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.planner-table td.tech-cell {
  background: rgba(255, 255, 255, 0.02);
  width: 140px;
  font-weight: 700;
  font-size: 12px;
  vertical-align: middle;
  text-align: center;
}

.planner-tech-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.planner-tech-hours {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
}

.planner-tech-hours.overload {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  font-weight: 700;
}

/* Kafelki zleceń */
.planner-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}

.planner-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.planner-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.planner-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 6px;
}

.planner-card-id {
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.planner-card-id:hover {
  text-decoration: underline;
}

.planner-card-client {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-card-device {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-card-fault {
  color: var(--text-muted);
  font-style: italic;
  font-size: 11px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.planner-card-selects {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.planner-card-selects select,
.planner-card-selects input,
.planner-card-date-input,
.planner-card-time-select {
  font-size: 11px;
  padding: 6px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.planner-card-selects select:focus,
.planner-card-selects input:focus,
.planner-card-date-input:focus,
.planner-card-time-select:focus {
  border-color: var(--color-primary);
}

.planner-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  gap: 6px;
}

.planner-card-priority {
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
}

.planner-card-actions {
  display: flex;
  gap: 2px;
}

.planner-card-actions button {
  padding: 2px 4px;
  font-size: 10px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Kolejka boczna */
.planner-queue-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.planner-queue-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.planner-queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 750px;
  overflow-y: auto;
  padding-right: 4px;
}

.planner-queue-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.planner-queue-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 6px;
}

.planner-queue-item-client {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-queue-item-device {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 4px;
}

.planner-queue-item-fault {
  color: var(--text-muted);
  font-style: italic;
  font-size: 11px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.planner-queue-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.planner-queue-item-actions select {
  font-size: 11px;
  padding: 6px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  flex: 1;
  outline: none;
}

.planner-queue-item-actions button {
  padding: 6px 10px;
  font-size: 11px;
  height: 28px;
  white-space: nowrap;
}

/* Responsywność dla stron publicznych (Zgłoszenie i Akceptacja kosztorysu) */
@media (max-width: 600px) {
  .public-report-card {
    padding: 16px !important;
    margin: 10px auto !important;
    width: 95% !important;
  }
  .public-report-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .public-report-row > div {
    grid-column: span 1 !important;
  }
  .public-form-container {
    margin: 10px auto !important;
    width: 95% !important;
  }
  .client-approval-row {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    padding: 15px !important;
  }
  .client-approval-buttons {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}
