:root {
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-primary-start: #0eb984;
  --color-primary-end: #0ea7e1;
  --color-primary-mid: #0eb0a2;
  --color-secondary: #f59f0e;
}

body {
  font-family: inherit;
}

select {
  cursor: pointer;
}

.text-primary {
  color: var(--color-primary-start);
}

.text-primary-dark {
  color: var(--color-primary-mid);
}

.bg-primary-gradient {
  background-image: linear-gradient(120deg, var(--color-primary-start), var(--color-primary-end));
}

.hero-gradient {
  background-image: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
}

.btn-gradient {
  background-image: linear-gradient(120deg, var(--color-primary-start), var(--color-primary-end));
  color: #fff;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: #fff;
}

.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: #fff;
}

.collapsible-card {
  overflow: hidden;
}
.collapsible-card summary {
  list-style: none;
  user-select: none;
}
.collapsible-card summary::-webkit-details-marker {
  display: none;
}
.collapsible-card[open] .toggle-indicator {
  transform: rotate(180deg);
}

.calendar-shell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(14, 185, 132, 0.08), rgba(14, 167, 225, 0.08));
}
.calendar-ui {
  min-height: 680px;
}
.calendar-shell .fc {
  background: #fff;
  border-radius: 12px;
  border: none;
  padding: 12px;
  min-height: 680px;
}
.calendar-shell .fc-timegrid-slot {
  height: 3.5rem;
}
.calendar-shell .fc-scrollgrid-section-body {
  min-height: 600px;
}
.calendar-shell .fc-toolbar-title {
  font-size: 1.2rem;
  color: #0f172a;
}
.calendar-shell .fc-button {
  background: var(--color-primary-start);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  margin: 0 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.calendar-shell .fc-button-primary:not(:disabled).fc-button-active {
  background: #0ca172;
}
.calendar-shell .fc-button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}
.calendar-shell .fc-toolbar.fc-header-toolbar {
  flex-wrap: wrap;
  gap: 8px;
}
.calendar-shell .fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.calendar-shell .fc-toolbar-title {
  order: 2;
}
.calendar-shell .fc-daygrid-event {
  border: none;
  border-radius: 8px;
  padding: 4px 6px;
  font-weight: 600;
}
.calendar-shell .fc-daygrid-day-number {
  color: #0f172a;
  font-weight: 600;
}
.calendar-shell .fc-day-sat,
.calendar-shell .fc-day-sun {
  background-color: rgba(14, 167, 225, 0.08);
}
.calendar-shell .fc-day-today {
  background-color: rgba(14, 185, 132, 0.15);
}
.calendar-shell .fc-event.closure-event,
.calendar-shell .fc-event.closure-event .fc-event-main {
  background-color: #fee2e2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important;
}
.calendar-shell .fc-event.closure-event .fc-event-title::before {
  content: "●";
  margin-inline-end: 6px;
  color: #dc2626;
  font-size: 0.75rem;
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  padding: 20px;
  backdrop-filter: blur(6px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 183, 132, 0.12);
  color: #0eb984;
  border-radius: 9999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.badge-secondary {
  background: rgba(245, 159, 14, 0.15);
  color: #b76b00;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
}

.section-subtitle {
  color: #475569;
  font-size: 14px;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(14, 183, 132, 0.12);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(14, 167, 225, 0.12);
  color: #0ea7e1;
  font-size: 12px;
  font-weight: 700;
}

.chip-soft {
  background: rgba(14, 183, 132, 0.1);
  color: #0eb984;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.status-pill--pending {
  background: rgba(245, 159, 14, 0.2);
  color: #b76b00;
}

.status-pill--accept {
  background: rgba(14, 183, 132, 0.2);
  color: #0b8c64;
}

.status-pill--delay {
  background: rgba(14, 167, 225, 0.2);
  color: #0e7fb5;
}
.status-pill--rejected {
  background: rgba(248, 113, 113, 0.22);
  color: #991b1b;
}

.text-secondary {
  color: #f59f0e;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.form-control {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-control.flatpickr-input,
.flatpickr-input.form-control[readonly] {
  background-color: #fff;
  cursor: pointer;
}

.form-control:focus {
  outline: none;
  border-color: #0ea7e1;
  box-shadow: 0 0 0 3px rgba(14, 167, 225, 0.15);
}

.phone-field {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}

.phone-field .form-control {
  flex: 1;
  width: auto;
}

.phone-prefix-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-radius: 12px;
  background: #eef2ff;
  color: #0f172a;
  font-weight: 700;
  border: 1px solid #dbe2f1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  min-width: 68px;
  height: 100%;
  min-height: 46px;
  font-size: 0.95rem;
}

.stat-card {
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px;
}

.btn-outline-muted {
  border: 1px solid #e2e8f0;
  color: #0f172a;
  background: #ffffff;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline-muted:hover {
  background: #f8fafc;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  transition: background 0.2s ease, color 0.2s ease;
}
.icon-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.status-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.15rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
}
.status-label--pending {
  background: rgba(244, 208, 28, 0.18);
  color: #854d0e;
}
.status-label--approved,
.status-label--accepted {
  background: rgba(14, 185, 132, 0.18);
  color: #0d704d;
}
.status-label--delay,
.status-label--delayed {
  background: rgba(250, 204, 21, 0.2);
  color: #92400e;
}
.status-label--rejected,
.status-label--deleted {
  background: rgba(248, 113, 113, 0.22);
  color: #991b1b;
}
.icon-button--danger {
  border-color: #fecaca;
  color: #dc2626;
}
.icon-button--danger:hover {
  background: #fee2e2;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-radius: 9999px;
  border: none;
  transition: background 0.2s ease;
}
.btn-danger:hover {
  background: #dc2626;
}

.flash {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-success {
  background: rgba(14, 183, 132, 0.15);
  color: #0b8c64;
  border: 1px solid rgba(14, 183, 132, 0.3);
}

.flash-error {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.flash-info {
  background: rgba(14, 167, 225, 0.15);
  color: #0e7fb5;
  border: 1px solid rgba(14, 167, 225, 0.3);
}

.manager-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
}
.manager-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.manager-modal__panel {
  width: min(480px, 100%);
  border-radius: 20px;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}
.manager-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.manager-modal__close {
  border: none;
  background: #f1f5f9;
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  transition: background 0.2s ease;
}
.manager-modal__close:hover {
  background: #e2e8f0;
}
.manager-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.booking-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
  overflow: hidden;
}
.booking-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.booking-modal__backdrop {
  position: absolute;
  inset: 0;
}
.booking-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: 90vh;
  border-radius: 20px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}
.booking-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid #e2e8f0;
}
.booking-modal__close {
  border: none;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 9999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.booking-modal__close:hover {
  background: #e2e8f0;
  transform: scale(1.02);
}
.booking-modal__content {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 0;
  min-height: 420px;
}
.booking-modal__sidebar {
  border-inline-end: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f8fafc;
}
.booking-search {
  position: relative;
}
.booking-search input {
  width: 100%;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}
.booking-search input:focus {
  border-color: #0ea7e1;
  box-shadow: 0 0 0 3px rgba(14, 167, 225, 0.15);
  outline: none;
}
.booking-search .material-icons-outlined {
  position: absolute;
  top: 50%;
  inset-inline-start: 0.75rem;
  transform: translateY(-50%);
  color: #94a3b8;
}
.booking-department-list {
  flex: 1;
  overflow-y: auto;
  padding-inline-end: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.booking-department-item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.75rem 0.9rem;
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.booking-department-item:hover {
  border-color: #0eb984;
  transform: translateY(-1px);
}
.booking-department-item.is-active {
  border-color: #0eb984;
  background: rgba(14, 185, 132, 0.08);
  box-shadow: inset 0 0 0 1px rgba(14, 185, 132, 0.2);
}
.booking-department-item span {
  font-size: 0.85rem;
  color: #475569;
}
.booking-modal__form {
  padding: 1.5rem;
  overflow-y: auto;
}
.booking-selected {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: #f8fafc;
}
.booking-selected h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}
.booking-contact-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .booking-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.booking-readonly {
  background: #f1f5f9;
  color: #475569;
}
.booking-empty {
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  display: none;
}
.booking-empty.is-visible {
  display: block;
}
.booking-modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.booking-modal__actions button {
  min-width: 180px;
}
@media (max-width: 1024px) {
  .booking-modal__content {
    grid-template-columns: 1fr;
  }
  .booking-modal__sidebar {
    border-inline-end: none;
    border-bottom: 1px solid #e2e8f0;
  }
}
@media (max-width: 640px) {
  .booking-modal {
    padding: 1rem;
  }
  .booking-modal__panel {
    height: 95vh;
  }
}
.manager-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
