* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 4px; /* Improved from 0 */
}

body {
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

button {
  cursor: pointer;
  border: none;
  -webkit-appearance: none;
  appearance: none;
}

/* ===== ZMIENNE KOLORÓW ===== */
:root {
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #777777;
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --border-color: #e0e0e0;
  --sidebar-bg: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
  --card-bg: #ffffff;
  --card-hover: #f9f9f9;
  --modal-bg: #ffffff;
  --input-bg: #ffffff;
  --input-border: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --link-color: #1a73e8;
  --link-hover: #0d62d9;
  --primary-gradient: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --warning-gradient: linear-gradient(135deg, #ff9800 0%, #e68900 100%);
  --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --danger-gradient: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);

  /* Custom Scrollbar - Light Theme */
  --scrollbar-track: rgba(44, 62, 80, 0.05);
  --scrollbar-thumb: #4a5568;
  --scrollbar-thumb-hover: #2c3e50;
  --scrollbar-border: rgba(44, 62, 80, 0.1);
}

/* ===== TRYB CIEMNY ===== */
body.dark-mode {
  --text-primary: #f0f0f0;
  --text-secondary: #cccccc;
  --text-muted: #aaaaaa;
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --border-color: #404040;
  --sidebar-bg: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  --card-bg: #2d2d2d;
  --card-hover: #3d3d3d;
  --modal-bg: #2d2d2d;
  --input-bg: #3d3d3d;
  --input-border: #555555;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --link-color: #63b3ed;
  --link-hover: #90cdf4;

  background: var(--bg-primary);
  color: var(--text-primary);
  color-scheme: dark;

  /* Custom Scrollbar - Dark Theme */
  --scrollbar-track: rgba(26, 26, 46, 0.4);
  --scrollbar-thumb: #454e5f;
  --scrollbar-thumb-hover: #5a657a;
  --scrollbar-border: rgba(255, 255, 255, 0.05);
}

/* ===== CUSTOM SCROLLBAR ===== */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* WebKit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
  transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

/* Special scrollbar for sidebar/navigation */
.sidebar::-webkit-scrollbar,
.admin-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.admin-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.admin-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.admin-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ===== NEXT PATIENT CARD ===== */
/* ===== GLOBAL SCROLLBARS ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
  border: 3px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.dark-mode::-webkit-scrollbar-thumb {
  background: #444;
}

.dark-mode::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.next-patient-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fbf9 100%);
  border-radius: 24px;
  padding: 35px;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 25px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(76, 175, 80, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark-mode .next-patient-card {
  background: linear-gradient(135deg, #2d2d2d 0%, #252525 100%);
  border: 1px solid rgba(76, 175, 80, 0.05);
}

.next-patient-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 6px;
  background: linear-gradient(to bottom, #4CAF50, #45a049);
  border-radius: 0 4px 4px 0;
}

.next-patient-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.dark-mode .next-patient-card {
  background: var(--card-bg);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.next-patient-card.is-fake::after {
  content: "WIZYTA SYSTEMOWA";
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #9c27b0;
  background: rgba(156, 39, 176, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(156, 39, 176, 0.2);
}

.next-patient-card.is-fake::before {
  background: linear-gradient(to bottom, #9c27b0, #7b1fa2);
}

.next-patient-card.pending-status::before {
  background: linear-gradient(to bottom, #ff9800, #f57c00);
}

.next-patient-card.pending-status {
  border-color: rgba(255, 152, 0, 0.2);
}

.next-patient-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.next-patient-header h2 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-badge {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
}

.dark-mode .time-badge {
  background: rgba(46, 125, 50, 0.2);
  color: #81c784;
}

.next-patient-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: flex-end;
}

.next-patient-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.next-patient-info h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 0;
}

.next-patient-info p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

.countdown {
  text-align: right;
  font-size: 1rem;
  color: var(--text-muted);
  display: block;
}

.countdown span {
  font-size: 2.2rem;
  font-weight: 800;
  color: #4CAF50;
  line-height: 1;
  display: inline-block;
  margin: 0 2px;
  vertical-align: baseline;
}

/* ===== AVAILABILITY SECTION ===== */
.availability-grid {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.availability-header {
  display: grid;
  grid-template-columns: 140px 100px 100px 30px 100px 1fr;
  gap: 15px;
  padding: 10px 15px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
}

.availability-row {
  display: grid;
  grid-template-columns: 140px 100px 100px 30px 100px 1fr;
  gap: 15px;
  align-items: center;
  background: var(--bg-primary);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.exclusion-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
}

.hour-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-color);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  animation: chipIn 0.2s ease-out;
}

.hour-chip .remove-chip {
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.hour-chip .remove-chip:hover {
  opacity: 1;
}

.btn-add-exclusion {
  background: transparent;
  border: 1px dashed var(--accent-color);
  color: var(--accent-color);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.btn-add-exclusion:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-style: solid;
}

.exclusion-dropdown {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 2000;
  max-height: 200px;
  overflow-y: auto;
  min-width: 100px;
  padding: 5px;
  animation: dropdownIn 0.2s ease-out;
}

.exclusion-dropdown div {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.exclusion-dropdown div:hover {
  background: var(--accent-color);
  color: white;
}

@keyframes chipIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes dropdownIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.dark-mode .availability-row {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.day-label {
  font-weight: 600;
  color: var(--text-primary);
}

.availability-row input[type="time"] {
  padding: 8px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
}

.dark-mode .availability-row input[type="time"] {
  background: #3d3d3d;
  color: #ffffff;
  border-color: #555555;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.off-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}


/* ===== MODAL SCROLLBAR ===== */
.modal-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(123, 152, 128, 0.4);
  border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 152, 128, 0.6);
}

/* Table scrollbar */
.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: rgba(123, 152, 128, 0.1);
  border-radius: 4px;
  margin: 0 10px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(123, 152, 128, 0.3);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 152, 128, 0.5);
}

/* Calendar scrollbar */
.fc-scroller::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.fc-scroller::-webkit-scrollbar-track {
  background: rgba(123, 152, 128, 0.1);
  border-radius: 4px;
}

.fc-scroller::-webkit-scrollbar-thumb {
  background: rgba(123, 152, 128, 0.3);
  border-radius: 4px;
}

.fc-scroller::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 152, 128, 0.5);
}

/* Custom scrollbar for appointment details */
.appointment-details::-webkit-scrollbar {
  width: 8px;
}

.appointment-details::-webkit-scrollbar-track {
  background: rgba(123, 152, 128, 0.1);
  border-radius: 4px;
}

.appointment-details::-webkit-scrollbar-thumb {
  background: rgba(123, 152, 128, 0.3);
  border-radius: 4px;
}

.appointment-details::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 152, 128, 0.5);
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* ===== ADMIN CONTAINER ===== */
.admin-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  transition: all 0.3s ease;
}

.logo {
  padding: 25px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 3px solid #4caf50;
  padding: 2px;
  object-fit: cover;
}

.logo h2 {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: #fff;
  font-weight: 600;
}

.user-role {
  font-size: 0.85rem;
  color: #4caf50;
  font-weight: 600;
  background: rgba(76, 175, 80, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 10px;
}

/* ===== PRZYCISK PRZEŁĄCZANIA MOTYWU ===== */
.theme-toggle-container {
  text-align: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Tryb ciemny - styl przycisku */
.dark-mode .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.theme-icon {
  transition: opacity 0.3s ease;
}

/* ===== NAVIGATION ===== */
.admin-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.admin-nav ul {
  list-style: none;
}

.admin-nav li {
  margin: 5px 0;
}

.admin-nav a {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  color: #b0b7c3;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  border-left: 4px solid transparent;
  gap: 10px;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-left-color: #4caf50;
}

.admin-nav .nav-active {
  background: rgba(76, 175, 80, 0.15);
  color: white;
  border-left-color: #4caf50;
}

.admin-nav .icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

/* ===== LOGOUT BUTTON ===== */
.logout-btn {
  margin: 20px;
  padding: 12px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.logout-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 20px;
  width: calc(100% - 250px);
  min-height: 100vh;
  transition: all 0.3s ease;
}

.content-section {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 30px;
  animation: fadeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  color: var(--text-primary);
}

.dark-mode .content-section {
  background: rgba(45, 45, 45, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section h1 {
  color: var(--text-primary);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
  font-size: 1.8rem;
  font-weight: 600;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-header h1 {
  margin-bottom: 0;
  border-bottom: none;
  flex: 1;
  min-width: 200px;
}

.calendar-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.stat-card:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.stat-card:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.stat-card:nth-child(4) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

.stat-card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  opacity: 0.9;
  font-weight: 500;
}

.stat-card p {
  font-size: 2.8rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== ULEPSZONE RAPORTY ===== */
.report-filters.advanced {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 3px 10px var(--shadow-color);
}

.report-filters.advanced .filter-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.report-filters.advanced .filter-group {
  flex: 1;
  min-width: 200px;
}

.report-filters.advanced .filter-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-secondary);
}

.report-filters.advanced select,
.report-filters.advanced input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
}

/* Statystyki w czasie rzeczywistym */
.realtime-stats {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 3px 10px var(--shadow-color);
}

.realtime-stats h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.stat-card.mini {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 10px;
  height: 250px;
}

.stat-card.mini h4 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.today-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.today-stat-item {
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
}

.today-stat-item.pending {
  background: rgba(255, 193, 7, 0.1);
  color: #ff9800;
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.today-stat-item.confirmed {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.today-stat-item.completed {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
  border: 1px solid rgba(33, 150, 243, 0.2);
}

.today-stat-item.cancelled {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.2);
}

.top-services {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.02);
}

.dark-mode .service-rank {
  background: rgba(255, 255, 255, 0.02);
}

.service-rank .rank {
  width: 24px;
  height: 24px;
  background: #4caf50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.upcoming-item {
  padding: 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.02);
  border-left: 3px solid #4caf50;
  font-size: 0.85rem;
}

.dark-mode .upcoming-item {
  background: rgba(255, 255, 255, 0.02);
}

.upcoming-item .time {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* Wizualizacja raportu */
.report-visualization {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .report-visualization {
    grid-template-columns: 1fr;
  }
}



/* Default state for close button (Hidden on Desktop) */
.sidebar-close-btn {
  display: none;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 1024px) {
  .admin-container {
    position: relative;
    overflow-x: hidden;
  }

  /* Sidebar - Drawer Style */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.2);
    width: 300px; /* Fixed robust width */
    max-width: 85vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1005; /* Higher than toggle */
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  }

  .sidebar.active {
    transform: translateX(0);
  }
  
  /* Logo Area improvements */
  .logo {
    padding: 30px 20px;
    background: rgba(0,0,0,0.1);
  }
  
  .logo img {
    width: 90px;
    height: 90px;
    border-width: 4px;
  }
  
  .logo h2 {
    font-size: 1.4rem;
    margin-top: 10px;
  }
  
  /* Larger touch targets for mobile nav */
  .admin-nav a {
    padding: 16px 25px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  
  .admin-nav .icon {
    font-size: 1.4rem;
    width: 30px;
  }
  
  .logout-btn {
    padding: 16px;
    font-size: 1.1rem;
    margin: 20px;
    margin-top: auto; /* Push to bottom */
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
    padding-top: 75px; /* Increased to avoid overlap with burger button */
  }

  /* Mobile Toggle Button - Floating Action Button style */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(30, 41, 59, 0.7); /* Dark Slate - more subtle than green */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border-radius: 12px;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-menu-toggle:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }

  .mobile-menu-toggle:active {
    transform: scale(0.9); /* Click animation */
    transition: transform 0.1s;
  }
  
  .dark-mode .mobile-menu-toggle {
    background: rgba(15, 23, 42, 0.8); /* Even darker in dark mode */
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  /* Hide toggle when sidebar is open to avoid conflict/overlap */
  .mobile-menu-toggle.active {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-menu-toggle span {
    display: block;
    height: 2px; /* Slightly thinner */
    width: 22px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Close Button inside Sidebar */
  .sidebar-close-btn {
    display: block !important; /* Visible only on mobile */
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
  }

  /* Overlay */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Adjustments for mobile content */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
    width: calc(100% - 60px);
  }
  
  .section-header h1,
  .content-section h1 {
    width: 100%;
    font-size: 1.5rem;
    padding-left: 0;
  }
  
  .section-header button {
    width: 100%;
    justify-content: center;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    min-width: 100%;
  }

  .report-filters.advanced .filter-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .stat-card p {
    font-size: 2.2rem;
  }
  
  /* Tables on mobile */
  .report-table th, 
  .report-table td {
    padding: 10px;
    font-size: 0.85rem;
  }
  
  .fc-header-toolbar {
    flex-direction: column;
    gap: 10px;
  }
  
  .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }
}

.chart-container {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 3px 10px var(--shadow-color);
  height: 400px;
}

/* ===== ULEPSZONE STYLE TABEL RAPORTÓW ===== */
.table-container {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px var(--shadow-color);
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.report-table-container {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px var(--shadow-color);
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  max-width: 100%;
}

.report-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.report-table th {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 18px 20px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: all 0.3s ease;
}

.report-table th::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 70%;
  background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
}

.report-table th:last-child::after {
  display: none;
}

.report-table th:hover {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
}

.dark-mode .report-table th {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .report-table th:hover {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(76, 175, 80, 0.15) 100%);
}

.report-table td {
  padding: 16px 20px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  font-size: 0.95rem;
  vertical-align: middle;
}

.report-table tr {
  transition: all 0.3s ease;
}

.report-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.01);
}

.report-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.05) 0%, rgba(76, 175, 80, 0.02) 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dark-mode .report-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.dark-mode .report-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
}

.report-table tr:last-child td {
  border-bottom: none;
}

/* Wyrównanie dla kolumn liczbowych */
.report-table th:nth-child(2),
.report-table th:nth-child(3),
.report-table th:nth-child(4),
.report-table th:nth-child(5),
.report-table th:nth-child(6),
.report-table th:nth-child(7),
.report-table td:nth-child(2),
.report-table td:nth-child(3),
.report-table td:nth-child(4),
.report-table td:nth-child(5),
.report-table td:nth-child(6),
.report-table td:nth-child(7) {
  text-align: right;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", "Courier New", monospace;
}

/* Styl dla komórek z highlight */
.report-table td.highlight {
  color: var(--text-primary);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
  border-radius: 6px;
  padding: 12px 16px;
  border: 1px solid rgba(76, 175, 80, 0.2);
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.1);
  font-size: 1rem;
}

.dark-mode .report-table td.highlight {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
  border-color: rgba(76, 175, 80, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Styl dla rank-badge w tabeli */
.report-table .rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-right: 12px;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.report-table .progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.dark-mode .report-table .progress-bar {
  background: rgba(255, 255, 255, 0.05);
}

.report-table .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #45a049);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Styl dla komórek z procentami */
.report-table .percentage-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.report-table .percentage-value {
  min-width: 60px;
  text-align: right;
}

/* Stopka tabeli */
.report-table tfoot {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
  font-weight: 600;
}

.report-table tfoot td {
  color: var(--text-primary);
  border-top: 2px solid var(--border-color);
  padding: 18px 20px;
}

.dark-mode .report-table tfoot {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
}

/* Statusowe komórki */
.report-table .status-cell {
  text-align: center;
}

.report-table .status-cell .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Animacje dla tabeli */
@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.report-table tbody tr {
  animation: fadeInRow 0.3s ease forwards;
}

.report-table tbody tr:nth-child(1) {
  animation-delay: 0.05s;
}
.report-table tbody tr:nth-child(2) {
  animation-delay: 0.1s;
}
.report-table tbody tr:nth-child(3) {
  animation-delay: 0.15s;
}
.report-table tbody tr:nth-child(4) {
  animation-delay: 0.2s;
}
.report-table tbody tr:nth-child(5) {
  animation-delay: 0.25s;
}
.report-table tbody tr:nth-child(6) {
  animation-delay: 0.3s;
}

/* Podsumowanie raportu */
.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 3px 10px var(--shadow-color);
  text-align: center;
  border-top: 4px solid #4caf50;
  transition: transform 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.summary-card:nth-child(2) {
  border-top-color: #2196f3;
}

.summary-card:nth-child(3) {
  border-top-color: #ff9800;
}

.summary-card:nth-child(4) {
  border-top-color: #9c27b0;
}

.summary-card h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.summary-change {
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.summary-change.positive {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.summary-change.negative {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

/* Tabela raportu */
.report-table th {
  background: rgba(0, 0, 0, 0.05);
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dark-mode .report-table th {
  background: rgba(255, 255, 255, 0.05);
}

.report-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.report-table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.dark-mode .report-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.report-table .highlight {
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 6px;
  font-weight: 500;
}

.btn-warning {
  background: #ff9800;
}

.btn-warning:hover {
  background: #e68900;
}

.btn-success {
  background: #28a745;
}

.btn-success:hover {
  background: #218838;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #d32f2f;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  background: var(--input-bg);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Checkbox group styling */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkbox-group label {
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--input-bg);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

input[type="checkbox"]:checked {
  background: #4caf50;
  border-color: #4caf50;
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dark-mode input[type="checkbox"] {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode input[type="checkbox"]:checked {
  background: #4caf50;
  border-color: #4caf50;
}

/* Price tag in appointment cards */
.price-tag {
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 8px;
  display: inline-block;
}

.dark-mode .price-tag {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
}
/* Form hint styling */
.form-hint {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ===== STYLOWANIE LINKÓW KONTAKTOWYCH ===== */
.contact-link {
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Linki telefonu - tryb jasny */
.phone-link {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0 !important;
  border: 1px solid #90caf9;
}

.phone-link:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(21, 101, 192, 0.2);
  color: #1565c0 !important;
}

.phone-link:active {
  transform: translateY(0);
}

/* Linki email - tryb jasny */
.email-link {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #7b1fa2 !important;
  border: 1px solid #ce93d8;
}

.email-link:hover {
  background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(123, 31, 162, 0.2);
  color: #7b1fa2 !important;
}

.email-link:active {
  transform: translateY(0);
}

/* Tryb ciemny - linki telefonu */
.dark-mode .phone-link {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(21, 101, 192, 0.6) 100%);
  color: #bbdefb !important;
  border: 1px solid rgba(144, 202, 249, 0.3);
}

.dark-mode .phone-link:hover {
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.6) 0%, rgba(144, 202, 249, 0.4) 100%);
  box-shadow: 0 4px 12px rgba(144, 202, 249, 0.3);
  color: #bbdefb !important;
}

/* Tryb ciemny - linki email */
.dark-mode .email-link {
  background: linear-gradient(135deg, rgba(74, 20, 90, 0.8) 0%, rgba(123, 31, 162, 0.6) 100%);
  color: #e1bee7 !important;
  border: 1px solid rgba(206, 147, 216, 0.3);
}

.dark-mode .email-link:hover {
  background: linear-gradient(135deg, rgba(123, 31, 162, 0.6) 0%, rgba(206, 147, 216, 0.4) 100%);
  box-shadow: 0 4px 12px rgba(206, 147, 216, 0.3);
  color: #e1bee7 !important;
}

/* Dodaj ikony do linków */
.phone-link::before {
  content: "📱 ";
  font-size: 0.9em;
}

.email-link::before {
  content: "📧 ";
  font-size: 0.9em;
}

/* ===== FILTERS ===== */
.filter-controls {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  flex: 1;
}

.filter-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.filter-controls select {
  padding: 12px 16px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--text-primary);
}

.report-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* ===== FAKE DATA GENERATOR ===== */
.content-section-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.2), transparent);
  margin: 40px 0;
}

.fake-data-section {
  padding: 10px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 25px;
  line-height: 1.6;
}

.fake-data-filters {
  background: rgba(76, 175, 80, 0.03);
  padding: 30px;
  border-radius: 16px;
  border: 1px dashed rgba(76, 175, 80, 0.3);
}

.dark-mode .fake-data-filters {
  background: rgba(76, 175, 80, 0.05);
}


/* ===== STYLE CENNIKA (ZAKTUALIZOWANE) ===== */
.pricing-info {
  margin-bottom: 25px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: 8px;
  border-left: 4px solid #4caf50;
}

.info-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.pricing-table-container {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px var(--shadow-color);
  overflow-x: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.pricing-table th {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 18px 15px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.dark-mode .pricing-table th {
  background: rgba(255, 255, 255, 0.05);
}

.pricing-table td {
  padding: 16px 15px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

.pricing-table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.dark-mode .pricing-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.inactive-row {
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.02);
}

.dark-mode .inactive-row {
  background: rgba(255, 255, 255, 0.02);
}

.order-cell {
  width: 100px;
  font-weight: 600;
  color: #4caf50;
  text-align: center;
}

.service-cell {
  font-weight: 500;
  min-width: 250px;
}

.price-cell {
  width: 150px;
  font-weight: 600;
  color: #2196f3;
  text-align: right;
}

.pricing-table tbody tr[draggable="true"] {
  cursor: move;
}

.pricing-table tbody tr[draggable="true"]:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.dark-mode .pricing-table tbody tr[draggable="true"]:hover {
  background-color: rgba(255, 255, 255, 0.05);
}





.separator-row .service-cell {
  text-align: center;
  color: #4caf50;
  letter-spacing: 1px;
}

.separator-row .duration-cell,
.separator-row .price-cell {
  text-align: center;
  color: var(--text-muted);
}

.status-cell {
  width: 120px;
}

.actions-cell {
  width: 150px;
}

.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.table-actions .btn-small {
  padding: 6px 12px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-actions .icon {
  font-size: 1rem;
  margin: 0;
}

/* ===== CARDS ===== */
.employee-card,
.appointment-card,
.vacation-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px var(--shadow-color);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.employee-card:hover,
.appointment-card:hover,
.vacation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
  border-color: #4caf50;
}

.appointment-card.is-fake {
  border: 1.5px dashed #9c27b0;
  background: linear-gradient(to right, var(--card-bg), rgba(156, 39, 176, 0.03));
}

.dark-mode .appointment-card.is-fake {
  border-color: #ba68c8;
  background: linear-gradient(to right, var(--card-bg), rgba(186, 104, 200, 0.07));
}
.fc-event-fake {
  border: 1.5px dashed #9c27b0 !important;
  background-color: #ba68c8 !important;
}

.fc-event-fake .fc-event-title {
  font-weight: 700;
}
.appointment-header,
.vacation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.employee-header h4,
.vacation-header h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
}

.appointment-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.appointment-date {
  display: flex;
  align-items: center;
  gap: 15px;
}

.appointment-time {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== POPRAWIONE STYLE DLA PRACOWNIKÓW ===== */
.employee-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.employee-details p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .employee-details p {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.employee-details p:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.employee-details .icon {
  color: #4caf50;
  font-size: 1.1rem;
  width: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.employee-details strong {
  color: var(--text-primary);
  font-weight: 600;
  min-width: 100px;
  display: inline-block;
}

.employee-details span {
  flex: 1;
}

/* Specjalizacje - lepsze wyświetlanie */
.employee-details .specializations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.specialization-badge {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.85rem;
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.dark-mode .specialization-badge {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
  border-color: rgba(76, 175, 80, 0.3);
}

.vacation-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.appointment-details p,
.vacation-details p {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.appointment-details .icon,
.vacation-details .icon {
  color: #4caf50;
  font-size: 1.1rem;
  width: 24px;
}

.employee-actions,
.appointment-actions,
.vacation-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== STATUS BADGES ===== */
.status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tryb jasny - statusy */
.status-pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-confirmed {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-cancelled {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-completed {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.status-approved {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-rejected {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-hidden {
  background: #ff9800;
  color: white;
  border: 1px solid #ff9800;
}

/* Tryb ciemny - statusy */
.dark-mode .status-pending {
  background: #805d1a;
  color: #ffd54f;
  border-color: #ffb74d;
}

.dark-mode .status-confirmed {
  background: #1b5e20;
  color: #81c784;
  border-color: #66bb6a;
}

.dark-mode .status-cancelled {
  background: #7f1d1d;
  color: #ef9a9a;
  border-color: #e57373;
}

.dark-mode .status-completed {
  background: #0c4a6e;
  color: #90cdf4;
  border-color: #63b3ed;
}

.dark-mode .status-approved {
  background: #1b5e20;
  color: #81c784;
  border-color: #66bb6a;
}

.dark-mode .status-rejected {
  background: #7f1d1d;
  color: #ef9a9a;
  border-color: #e57373;
}

.dark-mode .status-hidden {
  background: #805d1a;
  color: #ffd54f;
  border-color: #ffb74d;
}

.date-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.date-badge.today {
  background: #2196f3;
  color: white;
}

.date-badge.future {
  background: #4caf50;
  color: white;
}

.date-badge.past {
  background: #9e9e9e;
  color: white;
}

/* ===== CALENDAR ===== */
#calendarEl {
  min-height: 700px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px var(--shadow-color);
}

.fc {
  max-width: 100%;
}

.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 1.5em;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 12px 12px 0 0;
  color: var(--text-primary);
}

.fc .fc-view-container {
  min-height: 500px;
  background: var(--card-bg);
}

.fc-toolbar-title {
  color: var(--text-primary);
  font-weight: 600;
}

.fc-button-primary {
  background-color: #4caf50 !important;
  border-color: #4caf50 !important;
  font-weight: 500;
}

.fc-button-primary:hover {
  background-color: #45a049 !important;
  border-color: #45a049 !important;
}

.fc-event {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.9rem;
}

.calendar-section.active #calendarEl {
  animation: fadeIn 0.5s ease;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: var(--modal-bg);
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  color: var(--text-primary);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content h2 {
  color: var(--text-primary);
  margin-bottom: 30px;
  font-size: 1.8rem;
  font-weight: 600;
}

.modal-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* ===== REPORT RESULTS ===== */
.report-results {
  margin-top: 30px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.report-table th {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.dark-mode .report-table th {
  background: rgba(255, 255, 255, 0.05);
}

.report-table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.dark-mode .report-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.report-table tfoot {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.dark-mode .report-table tfoot {
  background: rgba(255, 255, 255, 0.05);
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.summary-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 3px 10px var(--shadow-color);
  text-align: center;
}

.summary-card h4 {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 500;
}

.summary-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #4caf50;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 30px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 3px 10px var(--shadow-color);
  margin: 40px 0;
  color: var(--text-primary);
}

.empty-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: block;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 1.1rem;
}

/* ===== APPOINTMENT DETAILS ===== */
.appointment-details {
  max-width: 100%;
}

.detail-section {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 4px solid #4caf50;
  color: var(--text-primary);
}

.dark-mode .detail-section {
  background: rgba(255, 255, 255, 0.05);
}

.detail-section h3 {
  margin-top: 0;
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-section p {
  margin: 10px 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.detail-section .notes-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--text-primary);
}

.meta-info {
  background: #e8f4fd;
  border-left-color: #2196f3;
}

.dark-mode .meta-info {
  background: #2c5282;
  border-left-color: #63b3ed;
}

/* ===== NOTIFICATIONS ===== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 18px 25px;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification::before {
  font-size: 1.2rem;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.notification.error {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.notification.warning {
  background: linear-gradient(135deg, #ff9800 0%, #e68900 100%);
}

.notification.info {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

/* Notification Center Items */
.notification-item {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.notification-item.unread {
  background-color: #f0f7ff;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notification-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: #4caf50;
  border-radius: 0 2px 2px 0;
}

.notification-item.unread .notification-message {
  font-weight: 700;
}

.notification-content {
  flex: 1;
}

.notification-message {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.notification-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: block;
}

/* Dark mode for notification center */
.dark-mode .notification-item.unread {
  background-color: rgba(76, 175, 80, 0.15);
}

.dark-mode .notification-item.unread::before {
  background: #4caf50;
}

.dark-mode .notification-item.read {
  background-color: rgba(255, 255, 255, 0.05);
  opacity: 0.8;
}

.dark-mode .notification-item {
  border-color: var(--border-color);
}

/* ===== LOADING STATES ===== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-top: 3px solid #4caf50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== ERROR STATES ===== */
.error-message {
  color: #f44336;
  font-size: 0.9rem;
  margin-top: 8px;
  padding: 8px 12px;
  background: #ffebee;
  border-radius: 6px;
  border: 1px solid #ffcdd2;
}

.dark-mode .error-message {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #f44336;
  background: #fff5f5;
}

.dark-mode .form-group input.error,
.dark-mode .form-group select.error,
.dark-mode .form-group textarea.error {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

.loading-pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Animacje */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.report-visualization {
  animation: fadeInUp 0.5s ease;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.dark-mode .progress-bar {
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #45a049);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Quick date filters */
.quick-date-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.quick-filter-btn {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-filter-btn:hover {
  background: var(--card-hover);
  border-color: #4caf50;
  color: var(--text-primary);
}

.quick-filter-btn.active {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

/* Rank badges w tabeli */
.rank-badge {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #4caf50;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  margin-right: 10px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Tooltip dla wykresów */
.chartjs-tooltip {
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  position: absolute;
  z-index: 10000;
}

.chartjs-tooltip.active {
  opacity: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-controls {
    justify-content: center;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .employee-details,
  .appointment-details,
  .vacation-details {
    grid-template-columns: 1fr;
  }

  .pricing-table {
    min-width: 700px;
  }

  .report-filters.advanced .filter-row {
    flex-direction: column;
    gap: 15px;
  }

  .report-filters.advanced .filter-group {
    min-width: 100%;
  }

  .stats-cards-grid {
    grid-template-columns: 1fr;
  }

  .report-summary-cards {
    grid-template-columns: 1fr;
  }

  /* Responsywność dla tabel raportów */
  .report-table {
    min-width: 600px;
    font-size: 0.9rem;
  }

  .report-table th,
  .report-table td {
    padding: 12px 15px;
  }

  .report-table th:nth-child(n + 3),
  .report-table td:nth-child(n + 3) {
    text-align: left;
  }

  .report-table .percentage-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .report-table .percentage-value {
    min-width: auto;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 20px;
  }

  .content-section h1 {
    font-size: 1.5rem;
  }

  .modal-content {
    padding: 25px;
    margin: 10px;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }

  .theme-toggle-container {
    padding: 8px;
  }

  .theme-toggle-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: 100%;
  }

  .report-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .report-table th,
  .report-table td {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .notification {
    left: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    top: 10px;
  }

  .appointment-header,
  .employee-header,
  .vacation-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .table-actions {
    flex-direction: column;
    gap: 5px;
  }

  .table-actions .btn-small {
    width: 100%;
    justify-content: center;
  }

  .action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
  }

  .action-buttons button {
    width: 100%;
    margin: 0 !important;
    padding: 12px 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  /* Make the last button span full width if odd number (optional) */
  /* .action-buttons button:last-child:nth-child(odd) {
    grid-column: span 2;
  } */


  .modal-buttons,
  .form-actions {
    flex-direction: column;
  }

  .modal-buttons button,
  .form-actions button {
    width: 100%;
  }

  .chart-container {
    height: 300px;
  }

  .report-table {
    font-size: 0.85rem;
  }

  .report-table th,
  .report-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 10px;
  }

  .content-section {
    padding: 15px;
  }

  .content-section h1 {
    font-size: 1.3rem;
    margin-left: 60px; /* Use margin to clear the button */
    width: calc(100% - 60px);
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card p {
    font-size: 2.2rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 14px;
  }

  #calendarEl {
    min-height: 500px;
  }

  .fc .fc-toolbar.fc-header-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .fc .fc-toolbar-title {
    font-size: 1.2rem;
  }

  .fc-button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .order-cell,
  .duration-cell,
  .price-cell,
  .status-cell {
    width: auto;
  }

  .actions-cell {
    width: 100px;
  }

  /* Responsywność dla tabel raportów */
  .report-table {
    min-width: 400px;
    font-size: 0.85rem;
  }

  .report-table th,
  .report-table td {
    padding: 10px 12px;
  }

  .report-table .rank-badge {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    margin-right: 8px;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .stat-card:hover,
  .employee-card:hover,
  .appointment-card:hover,
  .vacation-card:hover {
    transform: none;
  }

  .btn-primary:active,
  .btn-secondary:active {
    transform: scale(0.98);
  }

  .admin-nav a {
    padding: 18px 25px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom */
  }

  .action-buttons button {
    min-height: 44px; /* Minimum touch target size */
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .sidebar,
  .modal,
  .notification,
  .action-buttons,
  .form-actions,
  .calendar-controls,
  .filter-controls,
  .report-filters,
  .report-controls,
  .employee-actions,
  .appointment-actions,
  .vacation-actions,
  .theme-toggle-container,
  .table-actions {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 0;
  }

  .content-section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  .report-table,
  .pricing-table {
    border: 1px solid #000;
  }

  .report-table th,
  .pricing-table th {
    background: #ddd !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ===== DODATKOWE POPRAWKI DLA TRYBU CIEMNEGO ===== */
.dark-mode .admin-nav a {
  color: #a0aec0;
}

.dark-mode .admin-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.dark-mode .admin-nav .nav-active {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.dark-mode .fc .fc-toolbar.fc-header-toolbar {
  background: var(--card-bg);
}

.dark-mode .fc .fc-view-container {
  background: var(--card-bg);
}

.dark-mode .fc-theme-standard .fc-scrollgrid {
  border-color: var(--border-color);
}

.dark-mode .fc-theme-standard td,
.dark-mode .fc-theme-standard th {
  border-color: var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
}

.dark-mode .fc .fc-daygrid-day.fc-day-today {
  background-color: rgba(76, 175, 80, 0.2);
}

.dark-mode .fc .fc-daygrid-day-number {
  color: var(--text-primary);
}

.dark-mode .fc .fc-col-header-cell-cushion {
  color: var(--text-primary);
}

/* Poprawki dla kalendarza w trybie ciemnym */
.dark-mode .fc .fc-daygrid-day-frame {
  background: var(--card-bg);
}

.dark-mode .fc .fc-day-other .fc-daygrid-day-frame {
  background: #1a202c;
}

/* Poprawki dla inputów typu date */
.dark-mode input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
}

.dark-mode input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Poprawki dla selectów */
.dark-mode select option {
  background: var(--card-bg);
  color: var(--text-primary);
}

/* Poprawki dla placeholder */
.dark-mode ::placeholder {
  color: var(--text-muted);
}

.dark-mode :-ms-input-placeholder {
  color: var(--text-muted);
}

.dark-mode ::-ms-input-placeholder {
  color: var(--text-muted);
}

/* Poprawki dla scrollbara */
.dark-mode ::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Poprawki dla modal backdrop w trybie ciemnym */
.dark-mode .modal {
  background: rgba(0, 0, 0, 0.8);
}

/* Poprawki dla ikon w trybie ciemnym */
.dark-mode .icon {
  opacity: 0.9;
}

/* Poprawki dla zwykłych linków (nie kontaktowych) */
.dark-mode a:not(.contact-link) {
  color: var(--link-color);
  text-decoration: none;
}

.dark-mode a:not(.contact-link):hover {
  color: var(--link-hover);
}

/* Tryb jasny - zwykłe linki */
body:not(.dark-mode) a:not(.contact-link) {
  color: var(--link-color);
  text-decoration: none;
}

body:not(.dark-mode) a:not(.contact-link):hover {
  color: var(--link-hover);
}

/* Poprawki dla tekstu w trybie jasnym - lepszy kontrast */
body:not(.dark-mode) .appointment-card .appointment-details p,
body:not(.dark-mode) .employee-card .employee-details p,
body:not(.dark-mode) .vacation-card .vacation-details p {
  color: #444444 !important;
}

body:not(.dark-mode) .empty-state p {
  color: #666666 !important;
}

body:not(.dark-mode) .report-table td,
body:not(.dark-mode) .pricing-table td {
  color: #444444 !important;
}

body:not(.dark-mode) .form-group label {
  color: #555555 !important;
}

/* Poprawki dla przejść między motywami */
body.theme-changing,
body.theme-changing * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Animacja przełączania motywu */
@keyframes themeSwitch {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.theme-changing {
  animation: themeSwitch 0.6s ease;
}

/* Poprawki dla FullCalendar w trybie ciemnym */
.dark-mode .fc .fc-button-primary:disabled {
  background-color: #555 !important;
  border-color: #555 !important;
  color: #999 !important;
}

.dark-mode .fc .fc-button-primary:not(:disabled):hover {
  background-color: #45a049 !important;
  border-color: #45a049 !important;
}

/* Poprawki dla selektorów dat w formularzach */
.dark-mode input[type="date"],
.dark-mode input[type="time"] {
  color-scheme: dark;
}

/* Poprawki dla tekstu w modalach */
.dark-mode .modal-content p,
.dark-mode .modal-content li {
  color: var(--text-secondary);
}

/* Poprawki dla nagłówków w modalach */
.dark-mode .modal-content h3,
.dark-mode .modal-content h4 {
  color: var(--text-primary);
}

/* Poprawki dla separatorów */
.dark-mode hr {
  border-color: var(--border-color);
}

/* Poprawki dla list */
.dark-mode ul,
.dark-mode ol {
  color: var(--text-secondary);
}

/* Poprawki dla kodów/ID */
.dark-mode code,
.dark-mode .code {
  background: rgba(0, 0, 0, 0.3);
  color: #f8f8f2;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
}

/* Poprawki dla tooltipów (jeśli są) */
.dark-mode [title]:hover::after {
  background: #333;
  color: #fff;
  border: 1px solid #555;
}

/* Poprawki dla disabled elementów */
.dark-mode :disabled,
.dark-mode [disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Poprawki dla focus outline w trybie ciemnym */
.dark-mode :focus {
  outline: 2px solid #4caf50;
  outline-offset: 2px;
}

/* Poprawki dla selection text */
.dark-mode ::selection {
  background: rgba(76, 175, 80, 0.3);
  color: #fff;
}

/* Dark mode adjustments for charts */
.dark-mode .chart-container {
  background: var(--card-bg);
}

.dark-mode .chartjs-tooltip {
  background: var(--modal-bg);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Sidebar Notification Badge */
.notification-badge {
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
}

/* Pending Status for Next Patient Card */
.next-patient-card.pending-status {
  border-color: rgba(255, 152, 0, 0.2);
}

.next-patient-card.pending-status::before {
  background: linear-gradient(to bottom, #FF9800, #F57C00);
}

.next-patient-card.pending-status .time-badge {
  background: #fff3e0;
  color: #ef6c00;
}


.next-patient-card.pending-status .countdown span {
  color: #FF9800;
}

/* ===== MODAL VARIATIONS ===== */
.modal-large {
  max-width: 1100px !important;
  width: 95% !important;
}

@media (max-width: 1200px) {
  .modal-large {
    max-width: 950px !important;
  }
}

@media (max-width: 992px) {
  .availability-header {
    grid-template-columns: 140px 100px 1fr 1fr 1fr;
    font-size: 0.75rem;
  }
  
  .availability-row {
    grid-template-columns: 140px 100px 1fr 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .availability-header {
    display: none;
  }

  .modal-content {
    padding: 20px;
    width: 98%;
  }

  .modal-content h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
  
  .availability-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
      "day toggle"
      "start end"
      "exclusions exclusions";
    gap: 15px;
    padding: 15px;
  }
  
  .day-label { grid-area: day; font-size: 1rem; }
  .toggle-container { grid-area: toggle; justify-self: end; }
  .start-time { 
    grid-area: start; 
    width: 100% !important; 
    height: 40px;
    font-size: 0.95rem;
    padding: 5px;
  }
  .end-time { 
    grid-area: end; 
    width: 100% !important;
    height: 40px;
    font-size: 0.95rem;
    padding: 5px;
  }
  .time-separator { display: none; }
  
  .exclusion-column { 
    grid-area: exclusions;
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
  }

  .btn-add-exclusion {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .availability-row {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "day"
      "toggle"
      "start"
      "end"
      "exclusions";
    gap: 10px;
    text-align: center;
  }

  .toggle-container {
    justify-self: center;
    margin-bottom: 10px;
  }

  .modal-content {
    padding: 15px;
  }
}

/* ===== CUSTOM AVAILABILITY (EXCEPTIONS) ===== */
.custom-days-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.custom-day-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.custom-day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-color);
  border-color: var(--link-color);
}

.custom-day-card.is-off {
  border-left: 4px solid #f44336;
}

.custom-day-card:not(.is-off) {
  border-left: 4px solid #4caf50;
}

.custom-day-info {
  flex: 1;
}

.custom-day-date {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: block;
}

.custom-day-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.custom-day-shifts {
  text-align: right;
  margin-right: 15px;
}

.custom-day-shift-item {
  display: block;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.custom-day-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: none;
  border: none;
  padding: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dark-mode .btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
}

.shift-row-edit input[type="time"] {
  padding: 8px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-primary);
}

/* ===== GALLERY MANAGEMENT ===== */
.gallery-management {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 600px;
}

.upload-form .form-group input {
  max-width: 450px;
}

.upload-form .btn-primary {
  align-self: flex-start;
  min-width: 200px;
}

/* Drop Zone Styles */
.drop-zone {
  width: 100%;
  min-height: 200px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  border: 3px dashed var(--border-color);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  background: rgba(0, 0, 0, 0.02);
}

.dark-mode .drop-zone {
  background: rgba(255, 255, 255, 0.02);
}

.drop-zone:hover, .drop-zone.drop-zone--over {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.05);
  color: var(--text-primary);
}

.drop-zone-input {
  display: none;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.drop-zone-icon {
  font-size: 3rem;
  margin-bottom: 5px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.drop-zone:hover .drop-zone-icon {
  transform: scale(1.2) translateY(-5px);
}

.drop-zone-text {
  font-weight: 600;
  font-size: 1.1rem;
}

.drop-zone-info {
  font-size: 0.85rem;
  opacity: 0.7;
}

.drop-zone-thumb {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background-color: #eee;
  background-size: cover;
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
}

/* Uploading State */
.upload-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card-bg);
  border-radius: 16px;
  justify-content: center;
  z-index: 10;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(76, 175, 80, 0.1);
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Gallery Grid & Items */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.gallery-admin-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: 0 10px 20px var(--shadow-color);
  background: var(--bg-primary);
  opacity: 0;
  transform: scale(0.9);
  animation: itemEntrance 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes itemEntrance {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-admin-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-admin-item:hover img {
  transform: scale(1.08);
}

.gallery-item-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 5;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.gallery-admin-item:hover .gallery-item-actions {
  opacity: 1;
  transform: translateY(0);
}

.btn-edit-photo, .btn-delete-photo {
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.btn-edit-photo {
  background: rgba(79, 172, 254, 0.8);
}

.btn-delete-photo {
  background: rgba(244, 67, 54, 0.8);
}

.btn-edit-photo:hover {
  background: #4facfe;
  transform: scale(1.1) rotate(3deg);
}

.btn-delete-photo:hover {
  background: #f44336;
  transform: scale(1.1) rotate(-3deg);
}

.video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 229, 255, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
  z-index: 2;
}

.video-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.video-item:hover::after {
  background: rgba(0, 0, 0, 0);
}

.gallery-item-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: white;
  font-size: 0.9rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-admin-item:hover .gallery-item-info {
  transform: translateY(0);
}

.gallery-item-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Staggered animation for grid items */
.gallery-admin-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-admin-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-admin-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-admin-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-admin-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-admin-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-admin-item:nth-child(n+7) { animation-delay: 0.35s; }

/* Fullscreen Drag Overlay */
.fullscreen-drag-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(76, 175, 80, 0.85); /* Slightly more transparent to see the zone expanding */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s ease;
  pointer-events: none;
  color: white;
}

.fullscreen-drag-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
}

/* Expansion Effect for Drop Zone */
.drop-zone.global-drag {
  transform: scale(1.04);
  border-color: #4caf50;
  border-style: solid;
  box-shadow: 0 0 50px rgba(76, 175, 80, 0.4);
  background: rgba(76, 175, 80, 0.1);
  animation: pulseZone 2s infinite;
  z-index: 100;
}

@keyframes pulseZone {
  0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(76, 175, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.overlay-content {
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fullscreen-drag-overlay.active .overlay-content {
  transform: scale(1);
}

.overlay-icon {
  font-size: 8rem;
  margin-bottom: 20px;
  animation: floatIcon 2s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.overlay-content h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.overlay-content p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.dark-mode .fullscreen-drag-overlay {
  background: rgba(45, 45, 45, 0.9);
  border: 4px dashed #4caf50;
  margin: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  border-radius: 30px;
}

/* ===== CUSTOM TIME PICKER DROPDOWN ===== */
.custom-time-select {
  position: relative;
  width: 100%;
}

.custom-time-select .form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
}

.time-slots-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.time-slots-dropdown .placeholder-text {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
  font-size: 0.9rem;
}

.time-slots-dropdown .loading-small {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
}

/* ===== ADMIN CALENDAR STYLES (MATCHED WITH RUCHWHARMONII) ===== */

/* Flatpickr Date Statuses */
.flatpickr-day.date-available {
  background: #e8f5e9 !important;
  border-color: #4CAF50 !important;
}
.flatpickr-day.date-available:hover {
  background: #c8e6c9 !important;
}

.flatpickr-day.date-full {
  background: #fff3e0 !important;
  border-color: #ffb74d !important;
  color: #ef6c00 !important;
}

.flatpickr-day.date-off {
  background: #ffebee !important;
  border-color: #e57373 !important;
  color: #c62828 !important;
}

/* Time Slots Dropdown */
.custom-time-select {
    position: relative;
}

.time-slots-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.dark-mode .time-slots-dropdown {
    background: var(--card-bg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.placeholder-text {
    text-align: center;
    color: #888;
    padding: 30px;
    font-style: italic;
    width: 100%;
}

/* ===== DARK MODE CALENDAR & TIME SLOTS ===== */

body.dark-mode .flatpickr-calendar {
    background: var(--card-bg) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .flatpickr-month {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    fill: var(--text-primary) !important;
}

body.dark-mode .flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: var(--card-hover) !important;
}

body.dark-mode .flatpickr-current-month input.cur-year {
    color: var(--text-primary) !important;
}

body.dark-mode .flatpickr-weekdays {
    background: var(--card-bg) !important;
}

body.dark-mode span.flatpickr-weekday {
    color: var(--text-secondary) !important;
}

body.dark-mode .flatpickr-day {
    color: var(--text-primary) !important;
}

body.dark-mode .flatpickr-day:today {
    border-color: var(--primary-color) !important;
}

body.dark-mode .flatpickr-day:hover,
body.dark-mode .flatpickr-day:focus {
    background: var(--input-bg) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .flatpickr-day.flatpickr-disabled {
    color: var(--text-muted) !important;
}

/* Status colors in dark mode */
body.dark-mode .flatpickr-day.date-available {
    background: rgba(76, 175, 80, 0.15) !important;
    border-color: #4CAF50 !important;
    color: #81c784 !important;
}

body.dark-mode .flatpickr-day.date-full {
     background: rgba(255, 152, 0, 0.15) !important;
     border-color: #ffb74d !important;
     color: #ffcc80 !important;
}

body.dark-mode .flatpickr-day.date-off {
     background: rgba(244, 67, 54, 0.15) !important;
     border-color: #e57373 !important;
     color: #ef9a9a !important;
}

/* Time Slots Dark Mode */


/* ===== APPOINTMENT CARDS (MATCHED WITH RUCHWHARMONII) ===== */
.appointment-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px var(--shadow-color);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.appointment-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

.appointment-card.confirmed { border-left: 5px solid #4caf50; }
.appointment-card.pending { border-left: 5px solid #ff9800; }
.appointment-card.cancelled { border-left: 5px solid #f44336; }
.appointment-card.completed { border-left: 5px solid #2196f3; }

.appointment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
}

.appointment-date {
  display: flex;
  align-items: center;
  gap: 15px;
}

.appointment-time {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.1rem;
}

.appointment-info h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.appointment-details p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .appointment-details p {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.appointment-details p:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.appointment-details .icon {
  color: var(--primary-color);
  font-size: 1.1rem;
  width: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.appointment-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-confirmed { background: rgba(76, 175, 80, 0.1); color: #2e7d32; }
.status-pending { background: rgba(255, 152, 0, 0.1); color: #e65100; }
.status-cancelled { background: rgba(244, 67, 54, 0.1); color: #c62828; }
.status-completed { background: rgba(33, 150, 243, 0.1); color: #1565c0; }

body.dark-mode .status-badge {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .status-confirmed { color: #81c784; }
body.dark-mode .status-pending { color: #ffb74d; }
body.dark-mode .status-cancelled { color: #e57373; }
body.dark-mode .status-completed { color: #64b5f6; }

/* ===== TIME PICKER POPUP (Admin) ===== */
.time-picker-wrapper {
    position: relative;
    width: 100%;
}

.time-slots-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85); /* Premium glass background */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 15px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
    display: none; /* Controlled by .active */
    grid-template-columns: repeat(3, 1fr); /* 3 column grid */
    gap: 10px;
}

.dark-mode .time-slots-popup {
    background: rgba(45, 45, 45, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

.time-slots-popup.active {
    display: grid !important; /* Force grid layout */
    animation: popupFadeIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Custom indicator for the scrollbar */
.time-slots-popup::-webkit-scrollbar {
    width: 6px;
}
.time-slots-popup::-webkit-scrollbar-track {
    background: transparent;
}
.time-slots-popup::-webkit-scrollbar-thumb {
    background: rgba(123, 152, 128, 0.2);
    border-radius: 10px;
}

.time-slot-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 10px 5px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: auto !important;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.dark-mode .time-slot-btn {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.time-slot-btn .slot-info {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    pointer-events: none;
}

.time-slot-btn:hover:not(:disabled) {
    background: #ffffff;
    border-color: #4caf50;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 5px 12px rgba(76, 175, 80, 0.15);
}

.dark-mode .time-slot-btn:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
}

.time-slot-btn.active {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%) !important;
    color: #ffffff !important;
    border-color: #4caf50 !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.35);
    transform: scale(1.03);
}

.time-slot-btn.full {
    background: rgba(244, 67, 54, 0.05);
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.15);
    cursor: not-allowed !important;
    opacity: 0.6;
}

.time-slot-btn.full:hover {
    transform: none;
    box-shadow: none;
}

.time-slot-btn.available {
    border-bottom: 3px solid #4CAF50;
}

.time-slot-btn.full {
    border-bottom: 3px solid #F44336;
}
