@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap");

:root {
  --primary-color: #64b5f6;
  --primary-light: #9be7ff;
  --primary-dark: #2286c3;
  --secondary-color: #e3f2fd;
  --text-primary: #37474f;
  --text-secondary: #546e7a;
  --background: #f5f7fa;
  --card-bg: #ffffff;
  --border-color: #eceff1;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08);
  --accent-color: #81c784;
  --error-color: #ef5350;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background);
  margin: 0;
  padding-left: 60px;
  padding-top: 18vh;
  font-family: "Poppins", sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  position: absolute;
  top: 0;
  left: 60px;
  width: calc(100% - 60px);
  height: 18vh;
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--primary-color)
  );
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-medium);
  z-index: 1000;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* User info in header */
.user-info {
  position: absolute;
  top: 15px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1001;
}

.user-info i {
  font-size: 1rem;
}

.username {
  font-weight: 500;
}

.user-role {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.role-admin {
  background-color: #2286c3;
}

.role-superadmin {
  background-color: #ff9800;
  color: #333;
}

#uploadFile {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  max-width: 600px;
  margin: 2rem auto;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

#uploadFile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

#uploadFile form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

#uploadFile label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

#uploadFile input[type="file"] {
  padding: 1.2rem;
  border: 1px dashed var(--primary-color);
  border-radius: 8px;
  background: var(--secondary-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

#uploadFile input[type="file"]:hover {
  border-color: var(--primary-dark);
  background: #d6eafc;
}

#uploadFile button {
  background: var(--primary-color);
  color: white;
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

#uploadFile button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

#dataTable {
  margin: 2.5rem auto;
  max-width: 92%;
  overflow-x: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: none;
  border: none;
  margin: 0 auto;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  background: var(--primary-color);
  color: white;
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-bottom: none;
  white-space: nowrap;
  position: relative;
  text-align: left;
}

.data-table th:first-child {
  border-top-left-radius: 8px;
}

.data-table th:last-child {
  border-top-right-radius: 8px;
}

.data-table tr:nth-child(even) {
  background-color: rgba(240, 247, 255, 0.5);
}

.data-table td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  white-space: nowrap;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.data-table tbody tr:hover {
  background: rgba(100, 181, 246, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-table tbody tr:hover td {
  color: var(--primary-dark);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.data-table tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

/* Currency and percentage values */
.data-table td:has(span.currency),
.data-table td.currency {
  text-align: right;
  font-family: "Consolas", monospace;
  font-weight: 500;
}

/* Status indicators - Tak/Nie */
.tak,
.nie {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  text-align: center;
  min-width: 60px;
}

.tak {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.nie {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* Agent highlight styling */
[class^="agent-highlight-"] {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.agent-highlight-1 {
  background-color: #4caf50; /* Green */
}

.agent-highlight-2 {
  background-color: #2196f3; /* Blue */
}

.agent-highlight-3 {
  background-color: #9c27b0; /* Purple */
}

.agent-highlight-4 {
  background-color: #ff5722; /* Deep Orange */
}

.agent-highlight-5 {
  background-color: #607d8b; /* Blue Grey */
}

/* Modal styling */
#commissionInvoiceModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: black;
}

/* Improved agent highlighting in table */
.selected-agent {
  color: #1976d2 !important;
  font-weight: 600;
  background-color: rgba(33, 150, 243, 0.15);
  border-radius: 4px;
  padding: 3px 6px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.2);
}

/* Sortable headers styling */
th.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 30px;
}

th.sortable::after {
  content: "↕";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

th.sortable:hover::after {
  color: white;
}

th.sortable.asc::after {
  content: "↑";
  color: white;
}

th.sortable.desc::after {
  content: "↓";
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #dataTable {
    max-width: 98%;
    padding: 0.5rem;
    margin: 1rem auto;
  }

  .data-table th,
  .data-table td {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }

  .data-table th {
    font-size: 0.75rem;
  }
}

.notification {
  position: fixed;
  bottom: 20px;
  right: -100%;
  padding: 0.9rem 1.2rem;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
  max-width: 320px;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  word-break: break-word;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.notification.show {
  right: 20px;
  opacity: 1;
  transform: translateY(0);
}

.notification.info {
  background: rgba(33, 150, 243, 0.9);
  border-left: 4px solid #1976d2;
}

.notification.error {
  background: rgba(244, 67, 54, 0.9);
  border-left: 4px solid #d32f2f;
}

.notification i {
  margin-right: 10px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .notification {
    max-width: 85%;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  header h1 {
    font-size: 1.6rem;
  }

  #uploadFile {
    margin: 1rem;
    padding: 1.5rem;
  }

  th,
  td {
    padding: 0.8rem;
    font-size: 0.85rem;
  }
}

/* Wizard styles */
body.wizard {
  font-family: "Poppins", sans-serif;
  background: var(--background);
  padding: 20px;
}

form#wizardForm {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  padding: 28px;
  max-width: 80%;
  margin: auto;
  border: 1px solid var(--border-color);
}

form#wizardForm h2 {
  margin-top: 0;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

form#wizardForm fieldset {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: #fafbfc;
}

form#wizardForm legend {
  font-weight: 600;
  padding: 0 8px;
  color: var(--primary-color);
}

form#wizardForm label {
  display: block;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

form#wizardForm input[type="text"],
form#wizardForm input[type="number"],
form#wizardForm select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: "Poppins", sans-serif;
}

form#wizardForm input[type="text"]:focus,
form#wizardForm input[type="number"]:focus,
form#wizardForm select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.15);
  outline: none;
}

.controls {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.btn {
  background: var(--primary-color);
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.sort-controls {
  display: flex;
  gap: 1rem;
  margin: 1.5rem auto;
  max-width: 92%;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.date-filter {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-width: 100px;
}

.filter-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.sort-controls select {
  padding: 6px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  transition: color 0.3s;
  font-weight: 500;
  font-size: 0.95rem;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0px center;
  background-size: 1em;
}

.sort-controls select:focus {
  outline: none;
  color: var(--primary-color);
}

.sort-controls button {
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-controls button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.sort-controls button i {
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .date-filter {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .filter-group {
    min-width: 120px;
  }
}

/* Agent form styles */
.agent-form-container {
  display: flex;
  flex-direction: column;
  width: 80%;
  max-width: 800px;
  margin: -80px auto;
  padding: 35px;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  gap: 1.8rem;
  height: auto;
  min-height: 60vh;
  border: 1px solid var(--border-color);
}

.agent-form-heading {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 30px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 12px;
}

.agent-list-heading {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 22px;
  margin-top: 25px;
}

.agent-error-message {
  background-color: #ffeeee;
  border-left: 4px solid var(--error-color);
  padding: 12px 18px;
  margin: 15px 0;
  border-radius: 6px;
  color: var(--error-color);
}

.agent-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.agent-form-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.agent-form-input {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
  font-family: "Poppins", sans-serif;
}

.agent-form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.15);
  outline: none;
}

.agent-submit-button {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  margin: 12px auto;
  width: 100%;
  max-width: 200px;
  font-family: "Poppins", sans-serif;
}

.agent-submit-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.agent-submit-button:active {
  transform: translateY(0);
}

.agent-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.agent-list-item {
  background-color: #f9fbfd;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-light);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-color);
}

.agent-list-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.agent-name {
  font-size: 17px;
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
  font-weight: 600;
}

.agent-cases-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.agent-case-link {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.agent-case-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.agent-no-cases {
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.8;
}

/* Responsywność */
@media (max-width: 768px) {
  .agent-form-container {
    width: 92%;
    padding: 25px;
  }

  .agent-form-input {
    font-size: 14px;
  }

  .agent-form-heading {
    font-size: 22px;
  }

  .agent-list-heading {
    font-size: 18px;
  }
}

.agent-selection {
  margin: 20px auto;
  max-width: 800px;
  text-align: center;
}

.agent-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.agent-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.agent-button:hover {
  background-color: var(--primary-dark);
}

.back-link {
  display: block;
  margin: 20px 0;
  text-align: center;
}
.cleannav {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 100vh;
  background-color: #000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.cleannav:hover {
  background-color: #000;
}

/* Add bottom decoration to nav */
.cleannav::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background-color: #333;
  border-radius: 3px;
}

.cleannav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 0;
  padding: 0;
  width: 100%;
}

.cleannav__item {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.cleannav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: sans-serif;
  color: white;
  position: relative;
  transition: all 0.2s ease-in-out;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  line-height: 40px;
  text-align: center;
}

/* Add tooltip styles */
.cleannav__link:before,
.cleannav__manage-btn:before {
  content: attr(data-tooltip);
  position: absolute;
  left: 60px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateX(-20px);
  pointer-events: none;
  font-weight: normal;
  z-index: 1002;
}

.cleannav__link:hover:before,
.cleannav__manage-btn:hover:before {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.cleannav__icon {
  font-size: 1.5rem;
  color: white;
  transition: transform 0.2s ease-in-out;
  display: inline-block;
  line-height: 40px;
}

.cleannav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background-color: white;
  transition: width 0.2s ease-in-out;
}

.cleannav__link:hover {
  color: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.1);
}

.cleannav__link:hover .cleannav__icon {
  transform: translateY(-2px);
  color: rgba(255, 255, 255, 0.8);
}

.cleannav__link:hover::after {
  width: 100%;
}

.cleannav__link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.cleannav__link.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background-color: white;
  border-radius: 0 3px 3px 0;
}

.cleannav__link.active .cleannav__icon {
  transform: scale(1.1);
}

.cleannav__manage-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: sans-serif;
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
  line-height: 40px;
  text-align: center;
}

.cleannav__manage-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.cleannav__manage-btn .cleannav__icon {
  color: white;
}

/* Dodaj style dla nazw agentów w tabeli */
.agent-name-highlight {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.agent-name-highlight:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Style dla podświetlenia danych wybranego agenta */
.selected-agent {
  color: #2196f3 !important; /* Jasny niebieski */
  font-weight: 600;
  background-color: rgba(33, 150, 243, 0.1); /* Delikatne niebieskie tło */
  border-radius: 3px;
  padding: 2px 5px;
  display: inline-block;
}

/* Styl dla nazwy agenta w nagłówku */
.selected-agent-name {
  color: #1976d2; /* Ciemniejszy niebieski */
  font-weight: 700;
  text-decoration: underline;
  background-color: rgba(33, 150, 243, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
}

.agent-info {
  margin-top: -10px;
  margin-bottom: 20px;
  font-style: italic;
  color: #555;
}

/* Adding styles for agent name links */
.agent-name-link {
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.agent-name-link:hover {
  color: #0056b3;
  transform: translateY(-2px);
  text-decoration: underline;
}

.agent-name-link .agent-name {
  padding: 2px 5px;
  border-radius: 3px;
}

.agent-name-link:hover .agent-name {
  background-color: rgba(0, 86, 179, 0.1);
}

/* Styles for static Jakub agent card */
.jakub-agent-card {
  background: linear-gradient(135deg, #43a047, #66bb6a);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(102, 187, 106, 0.3);
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 2px solid #43a047;
}

.jakub-agent-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.jakub-agent-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 187, 106, 0.4);
}

.jakub-agent-card:hover::before {
  opacity: 1;
}

.jakub-link {
  color: white !important;
  text-decoration: none;
  display: block;
  z-index: 2;
  position: relative;
}

.jakub-link:hover {
  color: white !important;
}

.jakub-link .agent-name {
  color: white;
  font-size: 22px;
  margin-bottom: 5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.jakub-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

.jakub-description {
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  font-size: 14px;
  margin-top: 10px;
}

/* Highlight for Kuba's data in table */
.kuba-highlight {
  background-color: rgba(102, 187, 106, 0.15) !important;
  color: #2e7d32 !important;
  font-weight: 600;
  border-left: 3px solid #43a047;
}

/* Style for Jakub agent button */
.jakub-agent-button {
  background: linear-gradient(135deg, #43a047, #66bb6a) !important;
  color: white !important;
  font-weight: 600;
  border: 2px solid #2e7d32;
  box-shadow: 0 4px 10px rgba(102, 187, 106, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 15px;
  font-size: 1.1em;
  min-width: 250px;
}

.jakub-agent-button::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.jakub-agent-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(102, 187, 106, 0.4);
  background: linear-gradient(135deg, #388e3c, #4caf50) !important;
}

.jakub-agent-button:hover::before {
  opacity: 1;
}

/* Agent highlight classes for different agents in Jakub's view */
.agent-highlight-1 {
  background-color: rgba(66, 133, 244, 0.15) !important;
  color: #2962ff !important;
  font-weight: 600;
  border-left: 3px solid #4285f4;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-2 {
  background-color: rgba(234, 67, 53, 0.15) !important;
  color: #d50000 !important;
  font-weight: 600;
  border-left: 3px solid #ea4335;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-3 {
  background-color: rgba(251, 188, 5, 0.15) !important;
  color: #ff6d00 !important;
  font-weight: 600;
  border-left: 3px solid #fbbc05;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-4 {
  background-color: rgba(52, 168, 83, 0.15) !important;
  color: #1b5e20 !important;
  font-weight: 600;
  border-left: 3px solid #34a853;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-5 {
  background-color: rgba(142, 36, 170, 0.15) !important;
  color: #6a1b9a !important;
  font-weight: 600;
  border-left: 3px solid #8e24aa;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-6 {
  background-color: rgba(240, 98, 146, 0.15) !important;
  color: #c2185b !important;
  font-weight: 600;
  border-left: 3px solid #f06292;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-7 {
  background-color: rgba(251, 140, 0, 0.15) !important;
  color: #e65100 !important;
  font-weight: 600;
  border-left: 3px solid #fb8c00;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-8 {
  background-color: rgba(0, 172, 193, 0.15) !important;
  color: #006064 !important;
  font-weight: 600;
  border-left: 3px solid #00acc1;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-9 {
  background-color: rgba(94, 53, 177, 0.15) !important;
  color: #4527a0 !important;
  font-weight: 600;
  border-left: 3px solid #5e35b1;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.agent-highlight-0 {
  background-color: rgba(67, 160, 71, 0.15) !important;
  color: #2e7d32 !important;
  font-weight: 600;
  border-left: 3px solid #43a047;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Column visibility toggle styles */
.column-visibility {
  position: relative;
}

.toggle-columns-btn {
  background-color: white;
  color: var(--text-primary);
  padding: 8px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.toggle-columns-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-columns-btn i {
  font-size: 0.9rem;
  color: var(--primary-color);
}

.column-selector {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  width: 320px;
  z-index: 100;
  max-height: 450px;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: fadeInDown 0.3s ease;
}

.column-selector.show {
  display: block;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.column-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  background-color: #fafafa;
  color: var(--text-primary);
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: #9e9e9e;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.column-selector-body {
  padding: 10px 0;
  max-height: 350px;
  overflow-y: auto;
}

.column-checkbox {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  transition: background-color 0.2s;
}

.column-checkbox:hover {
  background-color: rgba(100, 181, 246, 0.1);
}

.column-checkbox.hidden-column {
  opacity: 0.7;
  text-decoration: line-through;
  background-color: rgba(0, 0, 0, 0.03);
}

.column-checkbox input {
  margin-right: 10px;
}

.column-checkbox-label {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  transition: background-color 0.2s;
  cursor: pointer;
  user-select: none;
}

.column-checkbox-label:hover {
  background-color: rgba(33, 150, 243, 0.05);
}

.column-checkbox-label.essential {
  color: var(--primary-color);
  font-weight: 500;
  background-color: rgba(33, 150, 243, 0.03);
}

.column-selector-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  border-top: 1px solid #f0f0f0;
  background-color: #fafafa;
}

.btn-small {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 7px 12px;
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}

/* Hide/show table columns functionality */
table.data-table th.hidden-column,
table.data-table td.hidden-column,
.table th.hidden-column,
.table td.hidden-column,
th.hidden-column,
td.hidden-column {
  display: none !important;
  visibility: hidden !important;
}

/* Additional style to ensure column visibility */
.table th:not(.hidden-column),
.table td:not(.hidden-column) {
  display: table-cell;
  visibility: visible;
}

/* Wizard Steps Styling */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.wizard-steps::before {
  content: "";
  position: absolute;
  height: 2px;
  background-color: var(--border-color);
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 1;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  cursor: default;
}

.step-number {
  width: 40px;
  height: 40px;
  background-color: var(--background);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.step-title {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.wizard-step.active .step-number {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.2);
}

.wizard-step.active .step-title {
  color: var(--primary-color);
  font-weight: 600;
}

.wizard-step.completed .step-number {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.wizard-step.completed .step-title {
  color: var(--accent-color);
}

.wizard-step-content {
  display: none;
}

.wizard-step-content.active {
  display: block;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.wizard-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wizard-actions .btn-next {
  background-color: var(--primary-color);
  color: white;
}

.wizard-actions .btn-prev {
  background-color: var(--border-color);
  color: var(--text-secondary);
}

.wizard-actions .btn-next:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wizard-actions .btn-prev:hover {
  background-color: #dce6f1;
  transform: translateY(-2px);
}

.wizard-actions .btn-submit {
  background-color: var(--accent-color);
  color: white;
}

.wizard-actions .btn-submit:hover {
  background-color: #66bb6a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Landing Page Styles */
.landing-container {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.logo-container {
  margin-bottom: 30px;
}

.logo {
  font-size: 3.5rem;
  color: var(--primary-color);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.welcome-message {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--primary-dark);
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 50px;
  font-size: 1.2rem;
  animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-bottom: 60px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card {
  background-color: white;
  border-radius: 15px;
  padding: 25px;
  width: 280px;
  box-shadow: var(--shadow-light);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(100, 181, 246, 0.1) 0%,
    rgba(0, 0, 0, 0) 75%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  transition: transform 0.4s ease;
  position: relative;
  z-index: 2;
}

.feature-card:hover .feature-icon {
  transform: scale(1.2);
}

.feature-title {
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-dark);
  font-size: 1.3rem;
  position: relative;
  z-index: 2;
}

.feature-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  position: relative;
  z-index: 2;
}

.action-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  display: inline-block;
}

.feature-card:hover .action-button {
  opacity: 1;
  transform: translateY(0);
}

.action-button:hover {
  background-color: var(--primary-dark);
}

.additional-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

.section-card {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-left: 4px solid transparent;
}

.section-card:nth-child(1) {
  border-left-color: #4caf50;
}

.section-card:nth-child(2) {
  border-left-color: #ff9800;
}

.section-card:nth-child(3) {
  border-left-color: #e91e63;
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--text-primary);
  font-weight: 600;
}

.section-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.section-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.view-more {
  color: var(--primary-color);
  font-weight: 500;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.section-card:hover .view-more {
  color: var(--primary-dark);
  transform: translateX(5px);
}

.footer-note {
  margin-top: 60px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

@media (max-width: 768px) {
  .features {
    flex-direction: column;
    align-items: center;
  }

  .feature-card {
    width: 90%;
    max-width: 350px;
  }

  .welcome-message {
    font-size: 1.8rem;
  }

  .additional-sections {
    grid-template-columns: 1fr;
  }
}

/* Import Page Styles */
.import-description {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.file-tips {
  background-color: #f5f9ff;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid #e3f2fd;
  margin: 20px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.file-tips p {
  margin: 10px 0;
  color: var(--text-secondary);
}

.file-tips i {
  color: var(--primary-color);
  margin-right: 5px;
}

.column-list {
  margin: 15px 0 15px 30px;
  list-style-type: circle;
  columns: 2;
  column-gap: 30px;
}

.column-list li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.security-badge {
  display: inline-block;
  background-color: #4caf50;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 5px;
  font-weight: 600;
}

.import-result {
  max-width: 600px;
  margin: 20px auto;
}

.import-success,
.import-error {
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.import-success {
  background-color: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
}

.import-error {
  background-color: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
}

.import-success i,
.import-error i {
  font-size: 1.5rem;
  margin-top: 2px;
}

.import-success p,
.import-error p {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .column-list {
    columns: 1;
  }
}

/* Invoice Table Styles */
.table-container {
  overflow-x: auto;
  margin: 25px 0;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Poppins", sans-serif;
  margin: 0;
}

.table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table th {
  position: relative;
  padding: 15px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-primary);
  background-color: #f8f9fa;
  border-bottom: 2px solid #eaeaea;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.table th:first-child {
  border-top-left-radius: 12px;
}

.table th:last-child {
  border-top-right-radius: 12px;
}

.table th:hover {
  background-color: #f1f3f5;
  color: var(--primary-color);
}

.table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.table tbody tr:hover {
  background-color: rgba(100, 181, 246, 0.05);
}

.table td {
  padding: 12px 18px;
  color: var(--text-primary);
  font-size: 0.9rem;
  vertical-align: middle;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.035);
}

.table td:first-child {
  font-weight: 500;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* Status indicators */
.status-yes {
  display: inline-block;
  padding: 5px 10px;
  background-color: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
}

.status-no {
  display: inline-block;
  padding: 5px 10px;
  background-color: rgba(198, 40, 40, 0.1);
  color: #c62828;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
}

/* Column styling for specific data types */
.table td[class*="data-"],
.table td[class*="Data"] {
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 500;
  color: #0277bd;
}

.table td[class*="wartosc"],
.table td[class*="kwota"],
.table td[class*="Wartość"] {
  text-align: right;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  white-space: nowrap;
  color: #00695c;
}

/* Empty state styling */
.table-container p {
  padding: 30px;
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
}

/* Enhanced Column Selector Styling */
.column-visibility {
  position: relative;
}

.toggle-columns-btn {
  background-color: white;
  color: var(--text-primary);
  padding: 8px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.toggle-columns-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-columns-btn i {
  font-size: 0.9rem;
  color: var(--primary-color);
}

.column-selector {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  width: 320px;
  z-index: 100;
  max-height: 450px;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.column-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  background-color: #fafafa;
  color: var(--text-primary);
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: #9e9e9e;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.column-selector-body {
  padding: 10px 0;
  max-height: 350px;
  overflow-y: auto;
}

.column-checkbox {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  transition: background-color 0.2s;
}

.column-checkbox:hover {
  background-color: rgba(100, 181, 246, 0.1);
}

.column-checkbox.hidden-column {
  opacity: 0.7;
  text-decoration: line-through;
  background-color: rgba(0, 0, 0, 0.03);
}

.column-checkbox input {
  margin-right: 10px;
}

.column-checkbox-label {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  transition: background-color 0.2s;
  cursor: pointer;
  user-select: none;
}

.column-checkbox-label:hover {
  background-color: rgba(33, 150, 243, 0.05);
}

.column-checkbox-label.essential {
  color: var(--primary-color);
  font-weight: 500;
  background-color: rgba(33, 150, 243, 0.03);
}

.column-selector-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  border-top: 1px solid #f0f0f0;
  background-color: #fafafa;
}

.btn-small {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 7px 12px;
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}

/* Hide/show table columns */
.table .hidden-column {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .table th,
  .table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .table th {
    font-size: 0.75rem;
  }

  .status-yes,
  .status-no {
    padding: 4px 8px;
    font-size: 0.8rem;
  }

  .column-selector {
    width: 280px;
    max-height: 400px;
    right: -70px;
  }

  .column-selector::before {
    right: 80px;
  }

  .column-checkbox-label {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* Hide/show table columns */
.table th.hidden-column,
.table td.hidden-column,
th.hidden-column,
td.hidden-column {
  display: none !important;
  visibility: hidden !important;
}

/* Additional style to ensure column visibility */
.table th:not(.hidden-column),
.table td:not(.hidden-column) {
  display: table-cell;
  visibility: visible;
}
.database-panel {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

/* DB Login Panel Styles */
.db-login-panel {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border-left: 4px solid #007bff;
}

.db-login-panel h3 {
  color: #007bff;
  margin-top: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-login-info {
  margin-bottom: 15px;
  color: #6c757d;
  font-size: 0.9rem;
}

.db-login-form {
  padding: 10px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  color: #495057;
}

.form-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  align-items: center;
  margin-top: 15px;
  gap: 15px;
}

.btn-db-login {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 15px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-db-login:hover {
  background-color: #0069d9;
}

.connection-status {
  flex: 1;
  font-size: 0.9rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 5px;
}

.connection-status.connected {
  color: #28a745;
}

.connection-status.error {
  color: #dc3545;
}

.database-table {
  margin-bottom: 30px;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.database-table h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #495057;
}

.database-table-info {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.database-table-info div {
  background-color: #e9ecef;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.database-table-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.database-table-actions button {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-backup {
  background-color: #4caf50;
  color: white;
}

.btn-backup:hover {
  background-color: #43a047;
}

.btn-truncate {
  background-color: #ff9800;
  color: white;
}

.btn-truncate:hover {
  background-color: #f57c00;
}

.btn-drop {
  background-color: #f44336;
  color: white;
}

.btn-drop:hover {
  background-color: #e53935;
}

.column-list {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  overflow: hidden;
}

.column-list table {
  width: 100%;
  border-collapse: collapse;
}

.column-list th,
.column-list td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.column-list th {
  background-color: #e9ecef;
  font-weight: 600;
}

.column-list tr:last-child td {
  border-bottom: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal-title {
  margin-top: 0;
  color: #495057;
}

.close-modal {
  background-color: #6c757d;
  color: white;
}

.confirm-action {
  background-color: #dc3545;
  color: white;
}

.body_login {
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  font-family: "Poppins", sans-serif;
}

.login-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
}

.login-header {
  margin-bottom: 30px;
}

.login-header h1 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
}

.form-group.input-with-icon {
  position: relative;
}

.form-group.input-with-icon input {
  padding-left: 45px;
}

.form-group.input-with-icon i {
  position: absolute;
  left: 15px;
  top: 43px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.login-button {
  background: var(--primary-color);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}

.login-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
}

.login-button:active {
  transform: translateY(0);
}

.error-message {
  background-color: rgba(244, 67, 54, 0.1);
  color: #d32f2f;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  border-left: 4px solid #d32f2f;
  text-align: left;
}

.login-footer {
  margin-top: 30px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.login-footer p {
  margin-bottom: 5px;
}

.users-info {
  margin-top: 15px;
  background-color: rgba(33, 150, 243, 0.1);
  padding: 12px;
  border-radius: 8px;
  text-align: left;
  font-size: 0.85rem;
}

.users-info h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.user-row:last-child {
  border-bottom: none;
}

.user-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.role-admin {
  background-color: #4caf50;
  color: white;
}

.role-superadmin {
  background-color: #ff9800;
  color: white;
}

/* Style komunikatów błędów - ULEPSZONE */
.error-message {
  color: #dc3545;
  font-size: 0.9em;
  margin-top: 8px;
  padding: 6px 10px;
  background-color: rgba(220, 53, 69, 0.1);
  border-radius: 4px;
  position: relative;
  border-left: 3px solid #dc3545;
  transition: all 0.3s ease;
  display: block;
}

.error-message:empty {
  display: none;
}

.error-message::before {
  content: "\f071";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  padding-right: 8px;
  color: #dc3545;
}

/* Styl dla zbiorczego kontenera błędów */
.error-container {
  padding: 15px;
  margin: 15px 0;
  border-radius: 8px;
  background-color: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.2);
  max-width: 100%;
}

.error-container h3 {
  color: #dc3545;
  margin-top: 0;
  font-size: 1.1em;
  display: flex;
  align-items: center;
}

.error-container h3::before {
  content: "\f071";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  padding-right: 10px;
  font-size: 1.2em;
}

.error-container ul {
  margin: 10px 0;
  padding-left: 30px;
}

.error-container ul li {
  margin-bottom: 6px;
  position: relative;
}

.error-container ul li::marker {
  color: #dc3545;
}

/* Wyróżnienie pola z błędem - ULEPSZONE */
.input-error {
  border: 1px solid #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
  background-color: #fff8f8 !important;
}

/* Dodatkowe styles dla pól z błędem w focus */
.input-error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Animacja dla błędów */
@keyframes highlightError {
  0% {
    background-color: rgba(220, 53, 69, 0.15);
  }
  100% {
    background-color: rgba(220, 53, 69, 0.05);
  }
}

.highlight-error {
  animation: highlightError 2s ease-out;
}

/* Styl dla błędów w sekcji agentów i rat */
#error_agents {
  margin-top: 10px;
  margin-bottom: 15px;
  width: 100%;
}

/* Style for calculation results */
.calculation-result {
  display: inline-block;
  margin-left: 10px;
  padding: 5px 10px;
  background-color: #e3f2fd;
  border-radius: 4px;
  font-weight: 500;
  color: #1976d2;
}

.field-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.field-group label {
  width: 100%;
}

.field-label {
  display: block;
  margin-bottom: 5px;
}

.currency-input-wrapper {
  position: relative;
  display: inline-block;
  width: 50%; /* Zmiana szerokości na 50% */
}

/* Styl dla elementów split-item z równym podziałem po 50% */
.split-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #ddd;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 5px;
}

.split-item > span:first-child {
  width: 50%;
  text-align: left;
  padding-right: 10px;
  font-weight: normal;
}

.split-item > span:last-child {
  width: 50%;
  text-align: right;
  font-weight: 600;
  color: #0d47a1;
}

/* Nowy styl dla kontenera przy podsumowaniach */
.calculation-section .split-item {
  background-color: #f8f9fa;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 5px;
}

/* Dodatkowy styl dla installment-split z podziałem 50/50 */
.installment-split .split-item > span:first-child {
  width: 50%;
}

.installment-split .split-item > span:last-child {
  width: 50%;
  color: #0d47a1;
}

.calculation-section {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  border-left: 4px solid #1976d2;
}

.calculation-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: #1976d2;
}

.installment-split {
  margin-top: 10px;
  padding: 8px;
  background-color: #eef7ff;
  border-radius: 6px;
}

.split-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed #ccc;
}

.split-item:last-child {
  border-bottom: none;
}

/* New styles for currency inputs */
.currency-input {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 16px;
  color: #212529;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  position: relative;
}

.currency-input:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  background-color: #fff;
}

.currency-input::after {
  content: " zł";
  position: absolute;
  right: 10px;
  color: #6c757d;
}

/* Highlight current input value */
.currency-input-wrapper {
  position: relative;
  display: inline-block;
  width: 50%; /* Zmiana z 100% na 50% */
}

.currency-input-wrapper::after {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
}

.currency-display {
  position: absolute;
  top: -20px;
  right: 10px;
  background-color: #e3f2fd;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #0d47a1;
  display: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.currency-input:focus + .currency-display {
  display: block;
}

/* Styl dla informacji o pozostałej kwocie */
.remaining-amount {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
  color: #495057;
  font-size: 0.9em;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* Gdy jest ostrzeżenie - przekroczono wartość lub nie opłacono całości */
.remaining-amount.warning {
  border-left-color: #dc3545;
  background-color: #fff8f8;
  color: #dc3545;
}

/* Dodatkowa klasa dla stanu, gdy opłacono dokładną kwotę */
.remaining-amount.success {
  border-left-color: #28a745;
  background-color: #f0fff0;
  color: #28a745;
  font-weight: 500;
}

/* Wersja dla pól procentowych */
.percentage-input-wrapper::after {

  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
}

/* jsTree custom styling */
.jstree-default .jstree-icon.jstree-themeicon-custom {
  background-size: contain !important;
}

#agent-tree-container {
  min-height: 250px;
  max-height: 600px;
  overflow: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.02);
  margin-top: 25px;
  font-family: "Poppins", sans-serif;
}

/* Style for tree nodes */
.jstree-default .jstree-anchor {
  font-size: 15px;
  line-height: 28px;
  height: auto !important;
  padding: 6px 12px !important;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  margin: 2px 0;
}

/* Hover effect for nodes */
.jstree-default .jstree-hovered {
  background-color: #e9f7fe !important;
  box-shadow: inset 0 0 0 1px #e9f7fe, 0 3px 8px rgba(0, 123, 255, 0.1) !important;
  color: #007bff !important;
  transform: translateY(-2px);
  z-index: 10;
}

/* Selected node style */
.jstree-default .jstree-clicked {
  background: linear-gradient(to right, #007bff, #4dabf7) !important;
  color: white !important;
  box-shadow: 0 3px 10px rgba(0, 123, 255, 0.2) !important;
  border-radius: 6px;
  border: none !important;
}

/* Custom styling for different agent types */
.jstree-default .jstree-icon.fa-user-tie {
  color: #007bff !important;
  font-size: 16px;
}

.jstree-default .jstree-icon.fa-user {
  color: #6c757d !important;
  font-size: 15px;
}

.jstree-default .jstree-icon.fa-crown {
  color: #ffc107 !important;
  font-size: 16px;
  text-shadow: 0 0 3px rgba(255, 193, 7, 0.3);
}

/* Special styling for Kuba node */
.jstree-default .jstree-node.kuba-agent > .jstree-anchor {
  background: linear-gradient(to right, #fff3cd, #ffeeba) !important;
  color: #856404 !important;
  font-weight: bold;
  border: 1px solid #ffc107;
  box-shadow: 0 3px 10px rgba(255, 193, 7, 0.15);
  padding-left: 35px !important;
  border-radius: 8px;
}

.jstree-default .jstree-node.kuba-agent > .jstree-anchor::before {
  content: "👑";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.5) 30%,
    transparent 70%
  );
  padding: 3px;
  border-radius: 50%;
}

/* Better differentiate between supervisors and subordinates */
.jstree-default .jstree-anchor[data-jstree='{"type":"supervisor"}'] {
  font-weight: 600;
  background-color: #e7f5ff;
  border-left: 3px solid #007bff;
  color: #0062cc;
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.1);
}

.jstree-default .jstree-anchor[data-jstree='{"type":"subordinate"}'] {
  color: #495057;
  background-color: #f8f9fa;
  border-left: 3px solid #6c757d;
  box-shadow: 0 2px 5px rgba(108, 117, 125, 0.05);
}

/* Add hover effects to tree nodes */
.jstree-default .jstree-anchor:hover {
  background-color: #e9f7fe !important;
  color: #007bff !important;
  box-shadow: inset 0 0 0 1px #e9f7fe !important;
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* Improve connector styles */
.jstree-default .jstree-children {
  position: relative;
}

.jstree-default .jstree-children::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, #dee2e6, rgba(222, 226, 230, 0.5));
  z-index: 0;
  border-radius: 1px;
}

.jstree-default .jstree-node {
  position: relative;
  margin-left: 15px !important;
}

.jstree-default .jstree-container-ul > .jstree-node {
  margin-left: 0 !important;
}

.jstree-default .jstree-node::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  width: 12px;
  height: 2px;
  background-color: #dee2e6;
  z-index: 0;
  border-radius: 1px;
}

.jstree-default .jstree-last {
  position: relative;
}

.jstree-default .jstree-last::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  height: 12px;
  width: 1px;
  background-color: #dee2e6;
  z-index: 0;
}

/* Custom connector from parent to child */
.jstree-default .jstree-children:after {
  content: "";
  position: absolute;
  left: 7px;
  top: -2px;
  width: 5px;
  height: 5px;
  background-color: #fff;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  z-index: 1;
}

/* Enhanced jstree-children styling */
.jstree-default .jstree-children .jstree-children {
  margin-left: 5px;
}

.jstree-default .jstree-children .jstree-children:before {
  content: "";
  position: absolute;
  left: 7px;
  width: 2px;
  height: calc(100% - 10px);
  background-color: #dee2e6;
  z-index: 0;
}

/* Add arrow-style to wholerow plugin */
.jstree-default.jstree-wholerow .jstree-wholerow-clicked {
  background: #007bff !important;
}

.jstree-default.jstree-wholerow .jstree-wholerow-hovered {
  background: #e9f7fe !important;
}

/* Empty tree message styling */
.jstree-default .jstree-node[id="no-agents"] > .jstree-anchor {
  color: #6c757d;
  font-style: italic;
  background-color: #f8f9fa;
  border: 1px dashed #ced4da;
  text-align: center;
  padding: 10px 15px !important;
}

/* Emphasize parent-child relationships on hover */
.jstree-default .jstree-hovered + .jstree-children::before,
.jstree-default .jstree-hovered + .jstree-children .jstree-node::before {
  background-color: #007bff !important;
}

/* Tree container loading state */
#agent-tree-container.jstree-loading {
  background: url("/assets/images/loading.gif") center center no-repeat;
  opacity: 0.5;
}

/* Add a subtle animation to the tree loading */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.jstree-animate-in .jstree-node {
  animation: fadeIn 0.3s ease-in-out;
  animation-fill-mode: both;
}

.jstree-animate-in .jstree-node:nth-child(1) {
  animation-delay: 0.05s;
}
.jstree-animate-in .jstree-node:nth-child(2) {
  animation-delay: 0.1s;
}
.jstree-animate-in .jstree-node:nth-child(3) {
  animation-delay: 0.15s;
}
.jstree-animate-in .jstree-node:nth-child(4) {
  animation-delay: 0.2s;
}
.jstree-animate-in .jstree-node:nth-child(5) {
  animation-delay: 0.25s;
}

/* Add tooltips to nodes */
.jstree-node-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #agent-tree-container {
    max-height: 400px;
  }

  .jstree-default .jstree-anchor {
    font-size: 14px;
    padding: 4px 6px !important;
  }
}

/* Agent tree styling */
.agent-tree {
  margin: 30px 0;
  padding: 25px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
}

.agent-tree-title {
  font-size: 20px;
  color: #37474f;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
  position: relative;
  padding-bottom: 12px;
}

.agent-tree-title:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #007bff, #4dabf7);
  border-radius: 3px;
}

/* Hierarchy Container Styles */
.hierarchy-container {
  margin: 20px 0;
  font-family: Arial, sans-serif;
}

.hierarchy-branch {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.supervisor-box {
  margin-bottom: 15px;
}

/* Connection Line Styles */
.connection-line {
  width: 2px;
  height: 20px;
  background-color: #6c757d;
  margin: 5px 0;
}

.connection-t-line {
  position: relative;
  width: 15px;
  height: 2px;
  background-color: #6c757d;
  margin-right: 10px;
  display: inline-block;
  vertical-align: middle;
}

.connection-t-line:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 10px;
  background-color: #6c757d;
  transform: translateY(-100%);
}

.subordinates-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subordinate-item {
  display: flex;
  align-items: center;
  position: relative;
}

.subordinate-item:not(.last-item):after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 2px;
  height: 10px;
  background-color: #6c757d;
}

/* Agent Node Styles */
.agent-node {
  padding: 8px 15px;
  border-radius: 5px;
  display: inline-block;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agent-node.supervisor {
  background-color: #007bff;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.agent-node.subordinate {
  background-color: #6c757d;
  color: white;
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.agent-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Special Kuba Agent Style */
.kuba-agent {
  background-color: #ffc107 !important;
  color: #212529 !important;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3) !important;
  position: relative;
}

.kuba-agent:before {
  content: "👑";
  margin-right: 5px;
}

/* Dropdown Styles */
option.has-supervisor {
  color: #007bff;
  background-color: #e7f1ff;
  font-weight: bold;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hierarchy-container {
    padding-left: 20px;
  }

  .agent-node {
    font-size: 14px;
    padding: 6px 10px;
  }
}

/* User Management Styles */
.user-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.user-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
}

.card-header h2 i {
    margin-right: 10px;
    color: #4a86e8;
}

.card-body {
    padding: 20px;
}

.users-table-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px;
    overflow-x: auto;
}

.users-table-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
}

.users-table-container h2 i {
    margin-right: 10px;
    color: #4a86e8;
}

.user-role {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.role-user {
    background-color: #6c757d;
}

.role-admin {
    background-color: #28a745;
}

.role-superadmin {
    background-color: #dc3545;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    color: #fff;
    background-color: #4a86e8;
    border-color: #4a86e8;
}

.btn-primary:hover {
    background-color: #3a76d8;
    border-color: #3a76d8;
}

.btn-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.btn-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Page Title */
.page-title {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
}

.page-title i {
    margin-right: 15px;
    color: #4a86e8;
}

/* ===== RESPONSIVE STYLES ===== */
/* These styles ensure the website is fully responsive for mobile and tablet devices */

/* Base responsive adjustments */
@media (max-width: 1200px) {
  body {
    padding-left: 60px;
    padding-top: 15vh;
  }
  
  .agent-form-container,
  .wizard-steps,
  form#wizardForm {
    width: 90%;
    max-width: 100%;
  }
  
  .features {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Tablet styles */
@media (max-width: 992px) {
  /* Tablet-specific styles */
  body {
    padding-left: 0 !important;
    padding-top: 60px;
  }
  
  header {
    left: 0 !important;
    width: 100% !important;
    height: auto;
    min-height: 60px;
  }
  
  .table-container {
    overflow-x: auto;
    width: 100%;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin: 1rem 0.5rem;
  }
  
  .data-table,
  .table {
    min-width: 100%;
    width: auto;
    table-layout: fixed;
  }
  
  .data-table th,
  .data-table td,
  .table th,
  .table td {
    padding: 10px 12px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }
  
  /* Ensure headers are sticky at top during scroll */
  .table thead,
  .data-table thead {
    position: sticky;
    top: 60px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .table th,
  .data-table th {
    background-color: #f8f9fa;
  }
  
  /* Fix first row positioning issue */
  .table tbody tr:first-child,
  .data-table tbody tr:first-child {
    position: relative;
    z-index: 1;
  }
  
  /* Improve form elements for tablets */
  #uploadFile {
    padding: 1.8rem;
  }
  
  form#wizardForm {
    max-width: 90%;
  }
  
  .wizard-steps {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .sort-controls {
    flex-wrap: wrap;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  /* Fix the first-row issue by ensuring proper z-index and positioning */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 10px 0;
    position: relative;
    z-index: 1;
  }
  
  .data-table,
  .table {
    min-width: 100%;
    width: max-content;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    position: relative; /* Important for stacking context */
  }
  
  /* Critical fix for first row appearing outside the table */
  .data-table tbody,
  .table tbody {
    position: relative;
    z-index: 1;
  }
  
  .data-table tr,
  .table tr {
    position: relative;
    z-index: 1;
  }
  
  /* Add clearfix to table container to fix overflow issues */
  .table-container::after {
    content: "";
    display: table;
    clear: both;
  }
  
  /* Add better tap target size for mobile */
  .data-table td,
  .table td {
    padding: 8px 10px;
    font-size: 0.85rem;
    min-height: 44px; /* Better tap target size */
  }
  
  /* Remove scroll arrows in mobile view */
  .table-container [class^="scroll-indicator"] {
    display: none !important;
  }
  
  /* Make swipe indicator more visible on mobile */
  .swipe-indicator {
    background-color: rgba(33, 150, 243, 0.15);
    color: #0277bd;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
    border: 1px dashed #90caf9;
  }
  
  /* Fix navigation on mobile */
  .cleannav {
    width: 100%;
    height: 60px;
    top: 0;
    bottom: auto;
    flex-direction: row;
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  
  .cleannav:after {
    display: none;
  }
  
  .cleannav__list {
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: 5px 0;
  }
  
  .cleannav__item {
    margin: 0;
    width: auto;
  }
  
  .cleannav__link:before,
  .cleannav__manage-btn:before {
    top: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }
  
  .cleannav__link:hover:before,
  .cleannav__manage-btn:hover:before {
    transform: translateX(-50%) translateY(0);
  }
  
  .cleannav__link.active::after {
    left: 50%;
    top: auto;
    bottom: -5px;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
  }
  
  /* Fix header on mobile */
  header {
    left: 0;
    width: 100%;
    height: 10vh;
  }
  
  header h1 {
    font-size: 1.5rem;
    text-align: center;
    padding: 0 15px;
  }
  
  /* Fix user info on mobile */
  .user-info {
    top: auto;
    bottom: 10px;
    right: 10px;
    font-size: 0.75rem;
  }
  
  /* Adjust tables and controls for mobile */
  #dataTable,
  .sort-controls {
    max-width: 100%;
    margin: 1rem 0.5rem;
  }
  
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: 8px;
  }
  
  .data-table {
    min-width: 650px; /* Force horizontal scrolling for tables */
  }
  
  .data-table th,
  .data-table td {
    padding: 0.8rem 0.6rem;
    font-size: 0.8rem;
  }
  
  /* Make filter controls stack on mobile */
  .sort-controls {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .date-filter {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .filter-group {
    min-width: auto;
    width: 45%;
  }
  
  .sort-controls button {
    width: 100%;
    justify-content: center;
  }
  
  .column-visibility {
    width: 100%;
  }
  
  .toggle-columns-btn {
    width: 100%;
    justify-content: center;
  }
  
  .column-selector {
    width: 90%;
    max-width: 300px;
    right: 5%;
    left: 5%;
  }
  
  /* Improve forms on mobile */
  #uploadFile {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-group input[type="text"],
  .form-group input[type="number"],
  .form-group select,
  .agent-form-input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 10px;
  }
  
  input[type="file"] {
    font-size: 14px;
  }
  
  /* Wizard and agent forms for mobile */
  form#wizardForm {
    padding: 15px;
    width: 95%;
  }
  
  .wizard-steps {
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
    margin-bottom: 20px;
    position: relative;
    gap: 15px;
  }
  
  .wizard-steps::before {
    content: none;
  }
  
  .wizard-step {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 5px;
  }
  
  .step-number {
    margin-right: 10px;
    margin-bottom: 0;
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
  
  .step-title {
    font-size: 0.9rem;
  }
  
  .wizard-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .wizard-actions .btn-next,
  .wizard-actions .btn-prev,
  .wizard-actions .btn-submit {
    width: 100%;
  }
  
  .agent-form-container {
    width: 95%;
    padding: 20px;
    margin: -40px auto 20px;
  }
  
  .agent-form-heading {
    font-size: 20px;
  }
  
  .agent-submit-button {
    width: 100%;
    max-width: 100%;
  }
  
  /* Login screen for mobile */
  .login-container {
    width: 90%;
    padding: 30px 20px;
  }
  
  /* Fix column visibility dropdown on mobile */
  .column-selector-body {
    max-height: 250px;
  }
  
  .column-checkbox-label {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  /* Make notification more visible on mobile */
  .notification {
    max-width: 90%;
    right: 5%;
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  /* Landing page mobile styles */
  .landing-container {
    padding: 10px;
  }
  
  .welcome-message {
    font-size: 1.5rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .feature-card {
    width: 95%;
  }
}

/* Small mobile styles */
@media (max-width: 480px) {
  body {
    padding-top: 8vh;
  }
  
  header {
    height: 8vh;
  }
  
  header h1 {
    font-size: 1.3rem;
  }
  
  /* Further simplify navigation for small screens */
  .cleannav__item:not(.cleannav__item:nth-child(1)):not(.cleannav__item:nth-child(2)):not(.cleannav__item:nth-child(7)) {
    display: none;
  }
  
  /* Add a more menu button */
  .cleannav:after {
    content: "•••";
    display: block;
    color: white;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  .user-info {
    display: none;
  }
  
  /* Make tables even more compact */
  .data-table th,
  .data-table td {
    padding: 6px;
    font-size: 0.75rem;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .agent-form-heading {
    font-size: 18px;
  }
  
  form#wizardForm h2 {
    font-size: 1.3rem;
  }
  
  .column-selector {
    max-width: 95%;
    right: 2.5%;
    left: 2.5%;
  }
  
  /* Reduce footer content size on small screens */
  .footer-note {
    font-size: 0.8rem;
  }
  
  /* Minimize form elements */
  #uploadFile label,
  .agent-form-label,
  .form-group label {
    font-size: 0.9rem;
  }
}

/* Orientation-specific styles */
@media (max-height: 600px) and (orientation: landscape) {
  body {
    padding-top: 70px;
  }
  
  header {
    position: absolute;
    height: 60px;
  }
  
  .cleannav {
    width: 100%;
    height: 60px;
  }
  
  /* Optimize wizard form for landscape */
  .wizard-steps {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }
  
  .wizard-step {
    flex-direction: column;
    min-width: 100px;
    flex-shrink: 0;
  }
}

/* Print styles */
@media print {
  body {
    padding: 0;
    margin: 0;
    background: white;
  }
  
  header, 
  .cleannav, 
  .sort-controls,
  .column-visibility,
  .action-buttons,
  button, 
  .notification,
  form {
    display: none !important;
  }
  
  .data-table,
  .table-container {
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .data-table th,
  .data-table td {
    font-size: 10pt;
    padding: 5pt;
    background-color: white !important;
    color: black !important;
    border: 0.5pt solid #ddd;
  }
  
  .table-container:before {
    content: "Wydrukowano dnia: " attr(data-print-date);
    display: block;
    text-align: right;
    font-size: 8pt;
    margin-bottom: 10pt;
  }
}

/* Mobile-only navigation styles - DEPRECATED, replaced by more specific media queries */
/* This section is kept for backward compatibility but is no longer used */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Tablet-specific styles are now handled in the tablet media query */
}

/* Show hamburger menu on mobile and tablets */
@media (max-width: 1024px) {
  /* Hide original navigation */
  .cleannav {
    display: none !important;
  }
  
  /* Hamburger menu button */
  .mobile-menu-btn {
    display: block;
    position: fixed;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 5px;
    z-index: 1010;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
  
  /* Slide-out navigation menu */
  .mobile-nav {
    position: fixed;
    top: 0;
    left: -280px; /* Start off-screen */
    width: 280px;
    height: 100vh;
    background-color: #000;
    z-index: 1005;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding-top: 60px;
  }
  
  .mobile-nav.active {
    left: 0; /* Slide in */
  }
  
  /* Mobile navigation list */
  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
  }
  
  .mobile-nav-item {
    margin: 0;
    width: 100%;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s;
  }
  
  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .mobile-nav-icon {
    margin-right: 15px;
    width: 20px;
    text-align: center;
  }
  
  /* Close button */
  .mobile-menu-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
  }
  
  /* Overlay when menu is open */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
  }
  
  .mobile-nav-overlay.active {
    display: block;
  }
  
  /* Adjust body and header for mobile view */
  body {
    padding-left: 0 !important;
    padding-top: 0 !important;
  }
  
  header {
    left: 0 !important;
    width: 100% !important;
    top: 0;
    height: auto;
    min-height: 60px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  header h1 {
    font-size: 1.5rem;
    text-align: center;
    margin: 0;
    padding: 15px 50px;
  }
  
  /* Fix for table layout on podsumowanie spraw */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 10px 0;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .data-table,
  .table {
    min-width: 100%;
    width: max-content;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
  }
  
  .data-table thead,
  .table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--primary-color);
  }
  
  .data-table th,
  .data-table td,
  .table th,
  .table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px; /* Limit the width of cells */
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .data-table th,
  .table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  
  /* Fix for first row appearing outside the table */
  .data-table tbody tr:first-child,
  .table tbody tr:first-child {
    position: relative;
    z-index: 1;
  }
  
  .data-table tbody tr:first-child td,
  .table tbody tr:first-child td {
    border-top: none;
  }
  
  /* Remove scroll arrows in mobile and tablet view */
  @media (max-width: 1024px) {
    /* Hide the scroll indicator arrows */
    .table-container [class^="scroll-indicator"],
    .table-container > div[style*="position: absolute"][style*="top: 50%"] {
      display: none !important;
    }
    
    /* Additional fix for potential table overflow issues */
    .data-table,
    .table {
      margin: 0;
      width: 100%;
    }
    
    .data-table tbody,
    .table tbody {
      width: 100%;
    }
    
    /* Fix for swipe indicator */
    .swipe-indicator {
      position: relative;
      z-index: 1;
    }
  }
}

/* Enhanced mobile responsiveness for different phone sizes */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Tablet adjustments */
  body {
    padding-left: 0;
    padding-top: 60px;
  }
  
  header {
    left: 0;
    width: 100%;
    height: auto;
    min-height: 60px;
  }
  
  /* Better scaling for tables */
  .table-container {
    overflow-x: auto;
    width: 100%;
  }
  
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  /* Ensure hamburger menu is visible on tablets */
  .mobile-menu-btn {
    display: flex !important;
  }
  
  /* Hide sidebar on tablets */
  .cleannav {
    display: none !important;
  }
}

/* Large phone sizes (newer devices) */
@media (max-width: 896px) and (min-width: 769px) {
  header h1 {
    font-size: 1.8rem;
  }
  
  .user-info {
    top: 10px;
    right: 15px;
    font-size: 0.85rem;
  }
  
  /* Form elements for larger phones */
  .form-group input[type="text"],
  .form-group input[type="number"],
  .form-group select,
  .agent-form-input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px;
  }
}

/* Medium-sized phones */
@media (max-width: 768px) and (min-width: 576px) {
  body {
    padding-top: 60px;
  }
  
  header h1 {
    font-size: 1.6rem;
  }
  
  /* Adjust spacing for forms */
  .form-group {
    margin-bottom: 12px;
  }
  
  /* Better button sizes for medium phones */
  .btn, .action-button, .agent-submit-button {
    padding: 10px 16px;
    font-size: 0.95rem;
  }
  
  /* Improve table layout for medium phones */
  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

/* Small phones */
@media (max-width: 575px) {
  body {
    padding-top: 60px;
    margin: 0 5px;
  }
  
  header h1 {
    font-size: 1.4rem;
  }
  
  /* Make sure forms fit small screens */
  form#wizardForm,
  .agent-form-container {
    width: 95%;
    padding: 15px;
  }
  
  /* More compact buttons */
  .btn, .action-button, .agent-submit-button {
    padding: 8px 14px;
    font-size: 0.9rem;
  }
}

/* iPhone X, 11, 12, 13 specific fixes */
@media only screen 
and (device-width: 375px) 
and (device-height: 812px) 
and (-webkit-device-pixel-ratio: 3),
only screen 
and (device-width: 414px) 
and (device-height: 896px) 
and (-webkit-device-pixel-ratio: 2),
only screen 
and (device-width: 390px) 
and (device-height: 844px) 
and (-webkit-device-pixel-ratio: 3),
only screen 
and (device-width: 428px) 
and (device-height: 926px) 
and (-webkit-device-pixel-ratio: 3) {
  /* Fix for iPhone X notch and newer iPhones */
  header {
    padding-top: env(safe-area-inset-top);
  }
  
  .mobile-menu-btn {
    top: calc(10px + env(safe-area-inset-top));
  }
  
  .mobile-nav {
    padding-top: calc(60px + env(safe-area-inset-top));
  }
  
  /* Make table font more readable on high-res screens */
  .data-table td,
  .table td {
    font-size: 0.9rem;
  }
}

/* Samsung Galaxy Fold and other folding devices (narrow mode) */
@media only screen and (max-width: 320px) {
  body {
    font-size: 0.9rem;
  }
  
  header h1 {
    font-size: 1.2rem;
    padding: 10px 40px;
  }
  
  /* Extremely compact UI for ultra-narrow screens */
  .mobile-menu-btn {
    width: 35px;
    height: 35px;
  }
  
  .form-group label {
    font-size: 0.85rem;
  }
  
  .form-group input[type="text"],
  .form-group input[type="number"],
  .form-group select {
    padding: 8px;
    font-size: 0.95rem;
  }
}

/* Fix any vertical overflow issues with tall screens */
@media (min-height: 800px) and (max-width: 768px) {
  body {
    min-height: calc(100vh - env(safe-area-inset-bottom, 0px));
  }
  
  .mobile-nav {
    height: calc(100vh - env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* Responsive navigation styles */
@media (min-width: 1025px) {
  /* Style dla desktopa - pokazanie paska bocznego */
  .cleannav {
    display: flex !important; /* Zapewnienie, że pasek boczny jest widoczny na desktopie */
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 100vh;
    z-index: 1001;
  }
  
  body {
    padding-left: 60px !important; /* Utrzymanie paddingu dla paska bocznego */
  }
  
  header {
    left: 60px !important;
    width: calc(100% - 60px) !important;
  }
  
  /* Ukrycie hamburger menu na desktopie */
  .mobile-menu-btn,
  .mobile-nav,
  .mobile-nav-overlay {
    display: none !important;
  }
}

/* Style dla tabletu i mobile */
@media (max-width: 1024px) {
  /* Ukrycie oryginalnej nawigacji */
  .cleannav {
    display: none !important;
  }
  
  /* Usunięcie paddingu bocznego */
  body {
    padding-left: 0 !important;
  }
  
  header {
    left: 0 !important;
    width: 100% !important;
  }
  
  /* Przycisk menu hamburger */
  .mobile-menu-btn {
    display: flex !important; /* Wymuszenie wyświetlania na tabletach i telefonach */
    position: fixed;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 5px;
    z-index: 1010;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
}
