/* ==================== CSS VARIABLES (LIGHT / BLUE) ==================== */
:root {
  --primary-color-start: #667eea;
  --primary-color-mid: #635bde;
  --primary-color-end: #764ba2;
  --hover-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  --background-start: #f5f7fa;
  --background-end: #c3cfe2;
  --card-bg: #ffffff;
  --container-bg: #ffffff;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --border-color: #e0e0e0;
  --white: #ffffff;
  --hover-bg: #f8f9fa;
  --input-bg: #ffffff;
  --success-bg: #d4edda;
  --success-text: #155724;
  --warning-bg: #fff3cd;
  --warning-text: #856404;
  --danger-bg: #f8d7da;
  --danger-text: #721c24;
  --busy-bg: #e8d5f5;
  --busy-text: #6a1a9a;
  --shadow: rgba(0, 0, 0, 0.1);
  --modal-bg: rgba(0, 0, 0, 0.7);
}

/* ==================== ORANGE THEME ==================== */
[data-theme="orange"] {
  --primary-color-start: #f39c12;
  --primary-color-mid: #d98207;
  --primary-color-end: #e67e22;
  --background-start: #fdf3e3;
  --background-end: #fde8c8;
}

/* ==================== RED THEME ==================== */
[data-theme="red"] {
  --primary-color-start: #e74c3c;
  --primary-color-mid: #c74334;
  --primary-color-end: #c0392b;
  --background-start: #fde8e8;
  --background-end: #f9d0d0;
}

/* ==================== TEAL THEME ==================== */
[data-theme="teal"] {
  --primary-color-start: #14b8a6;
  --primary-color-mid: #0f8f82;
  --primary-color-end: #0f766e;
  --background-start: #eefdfb;
  --background-end: #d8f4ef;
}

/* ==================== INDIGO THEME ==================== */
[data-theme="indigo"] {
  --primary-color-start: #6366f1;
  --primary-color-mid: #4f46e5;
  --primary-color-end: #4338ca;
  --background-start: #eef2ff;
  --background-end: #e0e7ff;
}

/* ==================== EMERALD THEME ==================== */
[data-theme="emerald"] {
  --primary-color-start: #10b981;
  --primary-color-mid: #0e9a6a;
  --primary-color-end: #059669;
  --background-start: #ecfdf5;
  --background-end: #d1fae5;
}

/* ==================== SLATE THEME ==================== */
[data-theme="slate"] {
  --primary-color-start: #64748b;
  --primary-color-mid: #475569;
  --primary-color-end: #334155;
  --background-start: #f8fafc;
  --background-end: #e2e8f0;
}

/* ==================== OLIVE THEME ==================== */
[data-theme="olive"] {
  --primary-color-start: #8f9a3b;
  --primary-color-mid: #74802f;
  --primary-color-end: #5f6b23;
  --background-start: #f7f8e6;
  --background-end: #e5e9c7;
}

/* ==================== ROSE THEME ==================== */
[data-theme="rose"] {
  --primary-color-start: #f472b6;
  --primary-color-mid: #db4f93;
  --primary-color-end: #be185d;
  --background-start: #fff1f7;
  --background-end: #ffd6e8;
}

/* ==================== DARK MODE ==================== */
[data-dark="true"] {
  --primary-color-mid: #7b8ff2;
  --hover-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  --background-start: #0f0f1a;
  --background-end: #1a1a2e;
  --card-bg: #1e1e30;
  --container-bg: #16213e;
  --text-dark: #e0e0f0;
  --text-light: #9090b0;
  --border-color: #2e2e4e;
  --white: #16213e;
  --hover-bg: #252540;
  --input-bg: #1e1e30;
  --modal-bg: rgba(0, 0, 0, 0.85);
  --shadow: rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Tooltip styling */
.cmax-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start),
    var(--primary-color-mid),
    var(--primary-color-end)
  );
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px var(--shadow);
  z-index: 9999;
  white-space: pre-wrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(12px, 12px);
  transition: opacity 0.12s ease;
}
.cmax-tooltip.visible {
  opacity: 1;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(
    135deg,
    var(--background-start) 0%,
    var(--background-end) 100%
  );
  min-height: 100vh;
  padding: 10px;
}
@media (min-width: 600px) {
  body {
    padding: 20px;
  }
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  background: var(--container-bg);
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--shadow);
  padding: 16px;
}
@media (min-width: 600px) {
  .container {
    padding: 30px;
  }
}

/* ==================== HEADER ==================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  flex-wrap: wrap;
  gap: 12px;
}
.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-mid) 45%,
    var(--primary-color-end) 100%
  );
  opacity: 0.55;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.logo {
  width: 150px;
  height: 150px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-mid) 45%,
    var(--primary-color-end) 100%
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 4px 12px var(--shadow);
  overflow: hidden;
  flex-shrink: 0;
}
@media (min-width: 600px) {
  .logo {
    width: 150px;
    height: 150px;
    border-radius: 18px;
    font-size: 36px;
  }
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.title-section h1 {
  font-size: 36px;
  color: var(--text-dark);
}
.title-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#mainTitle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-color-start), var(--primary-color-end));
  color: #fff;
  box-shadow: 0 8px 20px var(--shadow);
}
#mainTitle::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
  transform: rotate(45deg);
}
@media (min-width: 600px) {
  .title-section h1 {
    font-size: 36px;
  }
}
.date-display {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 3px;
}
@media (min-width: 600px) {
  .date-display {
    font-size: 16px;
  }
}

.readonly-badge {
  background: var(--danger-bg);
  color: var(--danger-text);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: none;
}

/* ==================== HEADER RIGHT ==================== */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.presence-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  border-radius: 999px;
  min-height: 38px;
}

.presence-strip-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.presence-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.presence-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--primary-color-start),
    var(--primary-color-mid) 45%,
    var(--primary-color-end)
  );
  box-shadow: 0 2px 8px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  cursor: default;
  position: relative;
}

.presence-avatar.is-viewing {
  background: linear-gradient(135deg, #64748b, #94a3b8);
}

.presence-avatar.is-editing::after,
.presence-avatar.is-viewing::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--container-bg);
}

.presence-avatar.is-editing::after {
  background: #2ecc71;
}

.presence-avatar.is-viewing::after {
  background: #f59e0b;
}

/* Language selector as buttons */
.lang-selector {
  display: flex;
  gap: 4px;
}

.lang-btn {
  padding: 6px 10px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--input-bg);
  color: var(--text-dark);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn:hover {
  border-color: var(--primary-color-start);
  background-image: var(--hover-sheen);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.lang-btn.active {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-mid) 45%,
    var(--primary-color-end) 100%
  );
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.date-picker-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.date-picker-section label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

.date-picker {
  padding: 10px 14px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  width: 180px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--input-bg);
  color: var(--text-dark);
}
@media (min-width: 400px) {
  .date-picker {
    width: 220px;
  }
}

.date-picker:hover {
  border-color: var(--primary-color-start);
  background-image: var(--hover-sheen);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.date-picker:focus {
  outline: none;
  border-color: var(--primary-color-start);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ==================== BUTTONS ==================== */
.action-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-mid) 45%,
    var(--primary-color-end) 100%
  );
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
@media (min-width: 600px) {
  .btn {
    padding: 12px 22px;
    font-size: 15px;
  }
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.04) saturate(1.04);
  opacity: 0.96;
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
.btn:disabled:hover {
  opacity: 0.6 !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #ef6b5a 45%, #c0392b 100%);
}
.btn-success {
  background: linear-gradient(135deg, #27ae60 0%, #4fd48a 45%, #2ecc71 100%);
}
.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--border-color);
  box-shadow: none;
}
.btn-secondary:hover {
  border-color: var(--primary-color-start);
  color: var(--primary-color-start);
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
  opacity: 1;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
}
.btn-icon {
  gap: 6px;
}

/* ==================== LISTS SECTION ==================== */
.lists-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 30px;
}
@media (min-width: 500px) {
  .lists-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .lists-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1200px) {
  .lists-container {
    grid-template-columns: repeat(5, 1fr);
  }
}

.list-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 3px 12px var(--shadow);
  transition: all 0.3s ease;
}

.list-card:hover {
  box-shadow: 0 10px 24px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-color: var(--primary-color-start);
  background-image: var(--hover-sheen);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color-start);
  cursor: pointer;
  user-select: none;
}

.list-card h3 {
  font-size: 18px;
  color: var(--text-dark);
  margin: 0;
}

.collapse-icon {
  font-size: 16px;
  color: var(--primary-color-start);
  transition: transform 0.3s ease;
}
.collapse-icon.collapsed {
  transform: rotate(-90deg);
}

.list-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 600px;
}
.list-content.collapsed {
  max-height: 0 !important;
}

.list-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.list-controls .btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  justify-content: center;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--input-bg);
  border-radius: 8px;
  overflow: hidden;
}

.list-table thead {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: #fff;
}
.list-table th {
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}
.list-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-dark);
}
.list-table tr:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
}

.status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}
.status-available {
  background: var(--success-bg);
  color: var(--success-text);
}
.status-unavailable {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.status-absent {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.status-busy {
  background: var(--busy-bg);
  color: var(--busy-text);
}

.checkbox-cell {
  text-align: center;
}
.checkbox-cell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color-start);
}

.plan-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  background: var(--input-bg);
  color: var(--text-dark);
}
.plan-input:focus {
  outline: none;
  border-color: var(--primary-color-start);
}

/* ==================== PLANNING TABLE ==================== */
.planning-section {
  margin-top: 30px;
}
.planning-section h2 {
  font-size: 22px;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color-start);
}
@media (min-width: 600px) {
  .planning-section h2 {
    font-size: 26px;
  }
}

.planning-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.planning-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--input-bg);
  min-width: 900px;
}

.planning-table thead {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.planning-table th {
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.planning-table td {
  padding: 6px;
  border: 1px solid var(--border-color);
  text-align: center;
}
.planning-table tbody tr:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
}

.planning-table select,
.planning-table input[type="text"] {
  width: 100%;
  padding: 6px;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--input-bg);
  color: var(--text-dark);
}

.planning-table select:hover,
.planning-table input[type="text"]:hover {
  border-color: var(--primary-color-start);
  background-image: var(--hover-sheen);
}
.planning-table select:focus,
.planning-table input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color-start);
}

.duplicate-error {
  background: var(--danger-bg) !important;
  border-color: #f5c6cb !important;
}
.absent-warning {
  background: var(--warning-bg) !important;
  border-color: #ffeaa7 !important;
}
.moment-error {
  background: var(--danger-bg) !important;
  border-color: #f5c6cb !important;
}

/* ==================== FOOTER ==================== */
.footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 2px solid var(--border-color);
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

/* ==================== SITE SELECTOR ==================== */
.site-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-selector label {
  font-size: 14px;
  color: var(--text-dark);
}
.site-selector select {
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-dark);
}

/* ==================== TAB BAR ==================== */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}
.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab-btn.active {
  color: var(--primary-color-end);
  border-bottom-color: var(--primary-color-end);
}
.tab-btn:hover {
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
}

/* ==================== TIDPLAN ==================== */
.tidplan-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tidplan-header h1 {
  font-size: 36px;
  color: var(--text-dark);
}
.tidplan-control-buttons {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 0 10px;
}
.tidplan-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.tidplan-controls .btn {
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.tidplan-controls .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.04) saturate(1.04);
}
.management {
  display: flex;
  gap: 5px;
}
.filters {
  display: flex;
  gap: 10px;
}
.filters select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-dark);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filters select:hover {
  border-color: var(--primary-color-start);
  background-image: var(--hover-sheen);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.filters select:focus {
  outline: none;
  border-color: var(--primary-color-start);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.tidplan-container {
  display: flex;
  height: 600px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
}
.tidplan-left-panel {
  width: 600px;
  min-width: 300px;
  max-width: 800px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
}
.tidplan-resizer {
  width: 8px;
  background: var(--border-color);
  cursor: ew-resize;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tidplan-resizer:hover {
  background: linear-gradient(
    180deg,
    var(--primary-color-start),
    var(--primary-color-mid),
    var(--primary-color-end)
  );
}
.tidplan-resizer::before {
  content: '⋮⋮';
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  transform: rotate(90deg);
  opacity: 0.5;
}
.tidplan-resizer:hover::before {
  color: var(--white);
  opacity: 1;
}

/* ==================== TIDPLAN CONTROLS ==================== */
.tidplan-panel-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color-start);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.tidplan-panel-toggle:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color-start),
    var(--primary-color-mid),
    var(--primary-color-end)
  );
  transform: scale(1.1);
  box-shadow: 0 6px 16px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.tidplan-panel-toggle:active {
  transform: scale(0.95);
}

.tidplan-table-container {
  position: relative;
}

.tidplan-fullscreen-controls {
  position: relative;
  width: 100%;
  height: 0;
  margin-bottom: 10px;
}

.tidplan-fullscreen-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color-start);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.tidplan-fullscreen-toggle:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color-start),
    var(--primary-color-mid),
    var(--primary-color-end)
  );
  transform: scale(1.1);
  box-shadow: 0 6px 16px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.tidplan-fullscreen-toggle:active {
  transform: scale(0.95);
}

/* Fullscreen mode for timeline */
.tidplan-timeline-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: var(--card-bg) !important;
  z-index: 10000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: auto !important;
}

.tidplan-fullscreen-toggle.fullscreen-active {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  background: var(--error-color) !important;
  z-index: 10001 !important;
}

.tidplan-fullscreen-toggle.fullscreen-active:hover {
  background: linear-gradient(135deg, #e74c3c 0%, #d24b3a 50%, #c0392b 100%) !important;
  box-shadow: 0 6px 16px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Panel modes */
.tidplan-left-panel-hidden {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

.tidplan-left-panel-expanded {
  width: 100% !important;
  max-width: none !important;
}

.tidplan-container-expanded .tidplan-timeline {
  display: none !important;
}

.tidplan-container-expanded .tidplan-resizer {
  display: none !important;
}
.tidplan-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border-radius: 12px 0 0 0;
  margin: 0;
  padding: 0;
}
.tidplan-table tbody {
  margin: 0;
  padding: 0;
}
.tidplan-table tr {
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 12px;
}
.tidplan-table th,
.tidplan-table td {
  border: 1px solid var(--border-color);
  padding: 2px;
  text-align: center;
  font-size: 12px;
  height: 40px;
  line-height: 1.2;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
.tidplan-table th {
  background: var(--hover-bg);
  position: sticky;
  top: 0;
  z-index: 1;
  height: 60px;
  box-sizing: border-box;
}
.tidplan-timeline {
  flex: 1;
  overflow: auto;
  position: relative;
}
.tidplan-legend {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.tidplan-legend-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}
.tidplan-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.tidplan-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dark);
}
.tidplan-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex: 0 0 14px;
}
.tidplan-legend-swatch.is-surplus {
  background: #3a7afe;
}
.tidplan-legend-swatch.is-exact {
  background: #39b86f;
}
.tidplan-legend-swatch.is-shortage {
  background: #d85d6d;
}
.tidplan-legend-swatch.is-weekend {
  background: rgba(120, 128, 140, 0.45);
}
.tidplan-legend-swatch.is-holiday {
  background: rgba(216, 93, 109, 0.45);
}
.tidplan-legend-note {
  font-size: 12px;
  color: var(--text-light);
}
.tidplan-controls .sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
#tidplanSortOptions {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  gap: 8px;
  flex-direction: column;
  padding: 12px;
  background: var(--card-bg);
  border: 2px solid var(--primary-color-start);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  z-index: 40;
  min-width: 220px;
  max-width: 340px;
  transition: all 0.15s ease;
}
#tidplanSortOptions.show {
  display: flex;
}
#tidplanSortOptions.flip-left {
  left: 0;
  right: auto;
}
#tidplanSortOptions label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
#tidplanSortOptions label:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
#tidplanSortOptions .sort-checkbox-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 6px;
  width: 100%;
}
#tidplanSortOptions .sort-checkbox-block label {
  justify-content: flex-start;
  text-transform: capitalize;
  font-size: 12px;
  gap: 6px;
  background: none;
  margin: 0;
}
#tidplanSortOptions .sort-checkbox-block input[type="checkbox"] {
  transform: scale(1.05);
  margin-right: 4px;
}

#tidplanSortOptions select {
  width: 100%;
  margin-top: 3px;
}
.tidplan-cell-wide {
  min-width: 180px;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tidplan-table tbody tr td:nth-child(2) {
  min-width: 140px;
}

/* Column width adjustments for better text fit */
.tidplan-table tbody tr td:nth-child(5) { /* Resursi */
  min-width: 120px;
}
.tidplan-table tbody tr td:nth-child(6) { /* Start */
  min-width: 140px;
}
.tidplan-table tbody tr td:nth-child(7) { /* End */
  min-width: 140px;
}
.tidplan-table tbody tr td:nth-child(8) { /* Komentar */
  min-width: 220px;
}

.site-switcher {
  position: relative;
  margin-top: 10px;
}
.site-switcher-btn {
  font-size: 16px;
  padding: 10px 18px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start),
    var(--primary-color-end)
  );
  border: none;
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}
.site-switcher-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.04) saturate(1.04);
}
.site-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--card-bg);
  border: 2px solid var(--primary-color-start);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  padding: 12px;
  z-index: 30;
  width: 260px;
  min-width: 260px;
}
.site-option {
  background: var(--hover-bg) !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  margin: 4px 0 !important;
  color: var(--text-dark) !important;
  text-align: left !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
.site-option:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color-start),
    var(--primary-color-mid),
    var(--primary-color-end)
  ) !important;
  color: #fff !important;
  transform: translateX(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.site-dropdown-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}
.zone-manager-panel {
  overflow: hidden;
  margin-bottom: 20px;
  padding: 16px;
  border: 2px solid var(--primary-color-start);
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05),
    rgba(118, 75, 162, 0.05)
  );
}
.zone-manager-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.zone-manager-panel > div:first-child strong {
  font-size: 16px;
  font-weight: 600;
}
#zoneList {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.zone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid #ccc;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.zone-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-color: var(--primary-color-start);
  background-image: var(--hover-sheen);
}
.zone-btn-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #999;
}
.zone-input-group {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.zone-input-group input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
}
.zone-input-group input[type="text"] {
  flex: 1;
  min-width: 150px;
}
.zone-input-group input[type="color"] {
  width: 50px;
  height: 40px;
  cursor: pointer;
  border-radius: 6px;
}
.gantt-bar {
  min-width: 40px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gantt-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.05) saturate(1.05);
}
.timeline-comment {
  position: absolute;
  top: 10px;
  height: 20px;
  line-height: 20px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-dark);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 48px);
  border: 1px solid var(--border-color);
}
.tidplan-select,
.tidplan-table input[type="number"],
.tidplan-table input[type="date"],
.tidplan-comment-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  font-size: 13px;
  background: var(--input-bg);
  color: var(--text-dark);
}
.tidplan-select:focus,
.tidplan-table input:focus {
  outline: none;
  border-color: var(--primary-color-start);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.btn-danger {
  border: 1px solid #db4858;
  background: #d85d6d;
  color: #fff;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #d85d6d 0%, #c84f60 50%, #b64455 100%);
  box-shadow: 0 6px 16px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.timeline-header {
  height: 60px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 10;
}
.timeline-body {
  position: relative;
  min-height: 540px;
  margin: 0;
  padding: 0;
}
.week-header {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  box-sizing: border-box;
}
.week-label {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  background: var(--hover-bg);
  border-bottom: 1px solid var(--border-color);
}
.day-headers {
  display: flex;
  height: 30px;
}
.day-header {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-color);
  background: var(--card-bg);
  position: relative;
  box-sizing: border-box;
  gap: 1px;
  line-height: 1;
}
.day-header.today {
  background: rgba(255, 0, 0, 0.1);
  font-weight: 600;
}
.day-header.is-weekend {
  background: rgba(120, 128, 140, 0.12);
}
.day-header.is-holiday {
  background: rgba(216, 93, 109, 0.16);
}
.day-header.is-holiday .day-header-name,
.day-header.is-holiday .day-header-date {
  color: #9f2733;
}
.day-header-name {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}
.day-header-date {
  font-size: 8px;
  color: var(--text-light);
}
.day-header.today::before,
.timeline-row .today-line {
  position: absolute;
  left: 0;
  width: 3px;
  background: var(--danger-text);
  pointer-events: none;
}
.day-header.today::before {
  content: "";
  top: 0;
  bottom: 0;
  z-index: 1;
}
.timeline-row .today-line {
  top: 0;
  bottom: 0;
  z-index: 1;
}
.timeline-row {
  height: 40px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  background: var(--card-bg);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  display: block;
  line-height: 1;
  font-size: 12px;
}
.timeline-day-highlight {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  pointer-events: none;
}
.timeline-day-highlight.is-weekend {
  background: rgba(120, 128, 140, 0.1);
}
.timeline-day-highlight.is-holiday {
  background: rgba(216, 93, 109, 0.12);
}
.timeline-row.timeline-resources-footer {
  position: sticky;
  bottom: 0;
  z-index: 8;
  height: 30px;
  min-height: 30px;
}
/* Zone indicator circle */
.zone-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  cursor: help;
  z-index: 2;
  transition: all 0.2s ease;
}
  z-index: 2;
  transition: all 0.2s ease;
}

.zone-indicator:hover {
  transform: translateY(-50%) scale(1.2);
  border-width: 3px;
  box-shadow: 0 4px 10px var(--shadow);
}

/* Zone background color for timeline rows */
.timeline-row.zona-row-colored {
}
.gantt-bar {
  position: absolute;
  height: 20px;
  top: 10px;
  background: var(--primary-color-start);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.05) saturate(1.05);
}
.tidplan-select {
  width: 100%;
}

/* ==================== LOGIN SCREEN ==================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.loading-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 35%),
    linear-gradient(135deg, rgba(39, 59, 120, 0.82), rgba(24, 33, 68, 0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  backdrop-filter: blur(6px);
}
.loading-box {
  min-width: 260px;
  padding: 28px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  color: #fff;
}
.loading-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  animation: cmax-spin 0.8s linear infinite;
}
.loading-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.loading-text {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}
@keyframes cmax-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-top-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-top-bar .lang-btn {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(4px);
}
.login-top-bar .lang-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.login-top-bar .lang-btn.active {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.6);
}

.login-box {
  background: var(--container-bg);
  padding: 30px 24px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  width: 92%;
}
@media (min-width: 500px) {
  .login-box {
    padding: 40px;
  }
}

.login-logo {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  margin: 0 auto 16px;
  overflow: hidden;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.login-box h2 {
  font-size: 24px;
  color: var(--text-dark);
  margin-bottom: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 14px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color-start);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 10px;
}
.login-btn:hover {
  opacity: 0.96;
  transform: translateY(-1px);
  filter: brightness(1.04) saturate(1.04);
  box-shadow: 0 8px 20px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.guest-btn {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 4px;
}
.guest-btn:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
  border-color: var(--primary-color-start);
  color: var(--primary-color-start);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-box {
  background: var(--container-bg);
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 650px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
}
@media (min-width: 600px) {
  .modal-box {
    padding: 30px;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
  font-size: 20px;
  color: var(--text-dark);
}
@media (min-width: 600px) {
  .modal-header h2 {
    font-size: 22px;
  }
}

.close-btn {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.close-btn:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
  color: var(--text-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ==================== CUSTOM DIALOG ==================== */
.dialog-box {
  background: var(--container-bg);
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  width: 92%;
}

.dialog-message {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}
.dialog-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 12px;
}

.dialog-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
  background: var(--input-bg);
  color: var(--text-dark);
  font-family: inherit;
}
.dialog-input:focus {
  outline: none;
  border-color: var(--primary-color-start);
}

.dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.dialog-buttons .btn {
  min-width: 100px;
  justify-content: center;
}

/* ==================== MANAGE PANEL ==================== */
.manage-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 6px 0 16px;
}

.manage-cat-btn {
  padding: 14px 10px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.manage-cat-btn:hover {
  border-color: var(--primary-color-start);
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
  color: var(--primary-color-start);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.manage-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.manage-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
}

.manage-remove-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
}

.manage-remove-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-dark);
  transition: all 0.15s;
}
.manage-remove-item:last-child {
  border-bottom: none;
}
.manage-remove-item:hover {
  background: linear-gradient(135deg, var(--danger-bg), #f2b6b6);
  color: var(--danger-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.manage-remove-item .remove-x {
  color: var(--danger-text);
  font-weight: bold;
  opacity: 0.7;
}

.manage-result {
  text-align: center;
  padding: 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  margin-top: 8px;
}
.manage-result.success {
  background: var(--success-bg);
  color: var(--success-text);
}
.manage-result.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.manage-back-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.manage-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

/* ==================== ADMIN PANEL ==================== */
.admin-list {
  margin: 12px 0;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.permissions-editor {
  display: grid;
  gap: 12px;
}
.permission-section {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--hover-bg);
  padding: 12px;
}
.permission-section-header {
  margin-bottom: 10px;
}
.permission-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}
.permission-section-note,
.admin-section-note {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}
.permission-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.admin-item {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--card-bg);
  border-left: 4px solid var(--admin-level-color, var(--border-color));
}

.admin-item.super-admin {
  border: 2px solid var(--primary-color-start);
}

.admin-item.admin-level-1 { --admin-level-color: #9aa4b2; }
.admin-item.admin-level-2 { --admin-level-color: #5b8def; }
.admin-item.admin-level-3 { --admin-level-color: #2fb3a6; }
.admin-item.admin-level-4 { --admin-level-color: #f29d38; }
.admin-item.admin-level-5 { --admin-level-color: #e05d44; }
.admin-item.admin-level-6 { --admin-level-color: var(--primary-color-start); }

.admin-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-info {
  flex: 1;
  min-width: 0;
}
.admin-email {
  font-weight: 600;
  color: var(--text-dark);
  word-break: break-all;
  font-size: 14px;
}
.admin-role {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}
.admin-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--admin-level-color, var(--primary-color-start));
}
.admin-level-row {
  display: flex;
  gap: 8px;
}
.admin-level-row select {
  max-width: 160px;
}
.admin-item-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.admin-summary-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 600;
}

.admin-permissions {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}
.admin-permissions.open {
  display: block;
}

.permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 480px) {
  .admin-form-grid,
  .permission-section-grid,
  .permissions-grid {
    grid-template-columns: 1fr;
  }
}

.perm-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dark);
  cursor: pointer;
}
.perm-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color-start);
  cursor: pointer;
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--primary-color-start);
  border-bottom-color: var(--primary-color-start);
}
.tab-btn:hover {
  color: var(--primary-color-start);
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Notification badge */
.notif-badge {
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

/* Report items */
.report-item {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--card-bg);
}
.report-item.pending {
  border-left: 4px solid #f39c12;
}
.report-item.approved {
  border-left: 4px solid #27ae60;
}
.report-item.rejected {
  border-left: 4px solid #e74c3c;
}

.report-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}
.report-comment {
  font-style: italic;
  color: var(--text-light);
  margin-top: 6px;
  font-size: 13px;
}
.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.report-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}
.badge-pending {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.badge-approved {
  background: var(--success-bg);
  color: var(--success-text);
}
.badge-rejected {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.badge-new {
  background: #e74c3c;
  color: #fff;
}

/* Filter buttons */
.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-bar .btn {
  padding: 6px 12px;
  font-size: 12px;
  opacity: 0.7;
}
.filter-bar .btn.active {
  opacity: 1;
}

/* Admin extra settings */
.admin-settings-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.admin-settings-section h4 {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-weight: 600;
}

.theme-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
}
.theme-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.theme-btn.active {
  border-color: var(--text-dark);
}

/* ==================== FLATPICKR CUSTOM ==================== */
.flatpickr-calendar {
  background: var(--container-bg) !important;
  border: 2px solid var(--border-color) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 40px var(--shadow) !important;
  font-family: "Segoe UI", sans-serif !important;
}

.flatpickr-months {
  padding: 8px 4px 4px;
}
.flatpickr-month {
  background: transparent !important;
  color: var(--text-dark) !important;
}
.flatpickr-current-month {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text-dark) !important;
}
.flatpickr-current-month input.cur-year {
  color: var(--text-dark) !important;
}
.flatpickr-prev-month,
.flatpickr-next-month {
  color: var(--primary-color-start) !important;
  fill: var(--primary-color-start) !important;
}
.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg)) !important;
  border-radius: 50% !important;
}

.flatpickr-weekdays {
  background: transparent !important;
}
span.flatpickr-weekday {
  background: transparent !important;
  color: var(--text-light) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

.flatpickr-day {
  border-radius: 8px !important;
  color: var(--text-dark) !important;
  font-size: 13px !important;
}
.flatpickr-day:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg)) !important;
  border-color: var(--primary-color-start) !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-mid) 45%,
    var(--primary-color-end) 100%
  ) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.flatpickr-day.today {
  border-color: var(--primary-color-start) !important;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--text-light) !important;
  opacity: 0.5;
}

/* Flatpickr input styling */
.flatpickr-input {
  border-radius: 6px !important;
  height: auto !important;
  padding: 6px 30px 6px 8px !important; /* Added right padding for icon */
  font-size: 13px !important;
  color: var(--text-dark) !important;
  border: 1px solid var(--border-color) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  position: relative !important; /* For icon positioning */
  background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 6px center !important;
  background-size: 16px !important;
}

/* Prevent browser date input styling */
.flatpickr-input::-webkit-calendar-picker-indicator {
  display: none !important;
}

.flatpickr-input::-webkit-inner-spin-button,
.flatpickr-input::-webkit-outer-spin-button {
  display: none !important;
}

/* ==================== PRINT STYLES ==================== */
@media print {
  @page {
    size: landscape;
    margin: 0.8cm;
  }
  body {
    background: #fff !important;
    padding: 0;
    margin: 0;
  }
  html {
    background: #fff !important;
  }
  .container {
    box-shadow: none !important;
    padding: 12px;
    max-width: 100%;
    background: #fff !important;
    border-radius: 0;
  }
  .action-buttons,
  .lists-container,
  .date-picker-section,
  .footer,
  .readonly-badge,
  .collapse-icon,
  .lang-selector,
  .header-right {
    display: none !important;
  }
  .header {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  .planning-section h2,
  .bins-section h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .planning-table-wrapper,
  .bins-table-wrapper {
    box-shadow: none;
    overflow: visible;
  }
  .planning-table,
  .bins-table {
    min-width: 100% !important;
    font-size: 9px;
  }
  .planning-table thead,
  .bins-table thead {
    background: #667eea !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .planning-table th,
  .bins-table th {
    padding: 6px 3px;
    font-size: 10px;
    background: #667eea !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .planning-table td,
  .bins-table td {
    padding: 5px 3px;
    border: 1px solid #ccc !important;
  }
  /* Hide select/input — show data-print value via ::after */
  .planning-table select {
    display: none !important;
  }
  .planning-table input[type="text"] {
    display: none !important;
  }
  .bins-table input[type="number"] {
    display: none !important;
  }
  td[data-field]::after {
    content: attr(data-pval);
    display: block;
    font-size: 9px;
    padding: 2px;
  }
  .planning-table tbody tr:hover,
  .bins-table tbody tr:hover {
    background: none !important;
  }
  .duplicate-error {
    background: #f8d7da !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .absent-warning {
    background: #fff3cd !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bin-cell-green {
    background-color: #d4edda !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bin-cell-yellow {
    background-color: #fff3cd !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bin-cell-red {
    background-color: #f8d7da !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* Print header info */
  .print-header-date {
    display: block !important;
  }
  /* Hide main table when printing bins */
  .bins-section.active ~ .planning-section {
    display: none !important;
  }
}

.print-header-date {
  display: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
  .date-picker-section {
    align-items: flex-start;
  }
  .date-picker {
    width: 100%;
  }
  .action-buttons .btn {
    font-size: 13px;
    padding: 9px 14px;
  }
  .manage-actions {
    flex-direction: column;
  }
}

/* ==================== TOAST NOTIFICATION ==================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text-dark);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation:
    toastIn 0.3s ease,
    toastOut 0.3s ease 2.5s forwards;
  max-width: 340px;
  text-align: center;
  pointer-events: auto;
}
.toast.success {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
}
.toast.error {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toastOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ==================== BINS TABLE STYLES ==================== */
.bins-section {
  display: none;
  margin-top: 30px;
}
.bins-section.active {
  display: block;
}
.bins-section h2 {
  font-size: 22px;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color-start);
}
@media (min-width: 600px) {
  .bins-section h2 {
    font-size: 26px;
  }
}

.bins-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--shadow);
  -webkit-overflow-scrolling: touch;
}
.bins-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--input-bg);
  min-width: 900px;
}

.bins-table thead {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.bins-table th {
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.bins-table td {
  padding: 6px;
  border: 1px solid var(--border-color);
  text-align: center;
}
.bins-table tbody tr:hover {
  background: linear-gradient(135deg, var(--hover-bg), var(--input-bg));
}

.bins-table input[type="number"] {
  width: 100%;
  padding: 6px;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  transition: all 0.2s ease;
  background: var(--input-bg);
  color: var(--text-dark);
}

.bins-table input[type="number"]:hover {
  border-color: var(--primary-color-start);
  background-image: var(--hover-sheen);
}
.bins-table input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color-start);
}
.bins-table input[type="number"]:disabled {
  background: var(--hover-bg);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ==================== NOTIFICATIONS ==================== */
#notifications-section {
  margin-top: 20px;
}
.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.notifications-header-actions {
  display: flex;
  gap: 8px;
}
.notifications-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.notifications-filters .form-group {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notifications-filters input,
.notifications-filters select {
  width: auto;
  min-width: 140px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-dark);
  font-size: 12px;
}
.notification-pin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 2px 4px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--hover-bg);
}
.notification-pin-toggle input {
  transform: scale(0.85);
}
.notifications-filters label {
  font-size: 12px;
}
.notifications-header h1 {
  margin: 0;
  font-size: 26px;
  color: var(--text-dark);
}
.notifications-composer {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 14px var(--shadow);
  margin-bottom: 18px;
}
.notifications-composer h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: var(--text-dark);
}
.notifications-composer textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text-dark);
}
.notification-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.notification-site-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: var(--hover-bg);
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}
.notification-image-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.notification-image-preview img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.notification-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 14px var(--shadow);
}
.notification-card h4 {
  margin: 0 0 6px 0;
  font-size: 15px;
  color: var(--text-dark);
}
.notification-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.notification-author {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  color: var(--text-dark);
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 12px;
  max-width: 45%;
  text-align: right;
}
.notification-body {
  font-size: 14px;
  color: var(--text-dark);
  white-space: pre-wrap;
}
.notification-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 150px));
  gap: 10px;
  margin-top: 12px;
}
.notification-images img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  background: var(--hover-bg);
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.notification-images img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.notification-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.notification-empty {
  padding: 18px;
  background: var(--hover-bg);
  border-radius: 12px;
  border: 1px dashed var(--border-color);
  color: var(--text-light);
}

/* ==================== IMAGE VIEWER ==================== */
.image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.image-viewer img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.image-viewer-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.image-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 36px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-viewer-prev {
  left: 20px;
}
.image-viewer-next {
  right: 20px;
}
.image-viewer-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Bin cell color classes */
.bin-cell-green {
  background-color: #d4edda !important;
}
.bin-cell-yellow {
  background-color: #fff3cd !important;
}
.bin-cell-red {
  background-color: #f8d7da !important;
}

.bin-status-cell {
  font-size: 11px;
  font-weight: 600;
  padding: 4px !important;
}

/* Logs tab */
.logs-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  background: var(--card-bg);
}
.log-entry {
  padding: 8px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-dark);
}
.log-entry:last-child {
  border-bottom: none;
}
.log-time {
  color: var(--text-light);
  font-size: 11px;
  margin-right: 8px;
}
.log-user {
  font-weight: 600;
  color: var(--primary-color-start);
}
.log-action {
  color: var(--text-dark);
}

/* Hide sections when bins active */
.planning-section.hidden {
  display: none !important;
}
.lists-container.hidden {
  display: none !important;
}
