/* ── BarberCRM Styles ──────────────────────────────────────────────────────── */

:root {
  --primary: #d35400;
  --primary-light: #e87e04;
  --accent: #e87e04;
  --accent-hover: #cf6f00;
  --text-light: #f5f5f5;
  --sidebar-width: 260px;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--primary);
  color: var(--text-light);
  overflow-y: auto;
  z-index: 1050;
  transition: transform 0.3s;
}

.sidebar .brand {
  padding: 1.5rem 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: var(--primary-light);
  color: #fff;
}

.sidebar .nav-link i {
  width: 20px;
  text-align: center;
}

.sidebar .nav-section {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  margin-top: 0.5rem;
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 2rem;
  min-height: 100vh;
  background: #f8f9fa;
}

/* Stat cards */
.stat-card {
  border: none;
  border-radius: 12px;
  transition: transform 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Accent btn */
.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Upload drop zone */
.drop-zone {
  border: 2px dashed #ced4da;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(233,69,96,0.05);
}
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-zone .drop-icon {
  font-size: 2rem;
  color: #adb5bd;
}

/* Image preview grid */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.image-preview-grid .preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
}
.image-preview-grid .preview-item.is-main {
  border-color: var(--accent);
}
.image-preview-grid .preview-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.image-preview-grid .preview-item .overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
}

/* Badge status colours */
.badge-pending   { background: #ffc107; color: #000; }
.badge-confirmed { background: #198754; }
.badge-completed { background: #0d6efd; }
.badge-cancelled { background: #dc3545; }

/* Public pages */
.public-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.public-page > .public-content {
  flex: 1;
}

.public-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.package-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.package-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.package-card img {
  height: 200px;
  object-fit: cover;
}
.package-card .card-body {
  padding: 1.25rem;
}

/* Sidebar logo */
.sidebar-logo {
  max-height: 48px;
  max-width: 180px;
  object-fit: contain;
}

/* Footer */
.app-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid #dee2e6;
  text-align: center;
}
.footer-logo {
  height: 28px;
  object-fit: contain;
}

/* ── Gantt Chart ────────────────────────────────────────────────────────── */
.gantt-wrapper {
  overflow-x: auto;
  position: relative;
}
.gantt-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
.gantt-table th,
.gantt-table td {
  border: 1px solid #dee2e6;
  padding: 0;
  height: 42px;
  position: relative;
}
.gantt-table thead th {
  background: #f8f9fa;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.25rem;
  position: sticky;
  top: 0;
  z-index: 2;
}
.gantt-label {
  min-width: 180px;
  max-width: 220px;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem;
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 4px;
  opacity: 0.85;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  font-size: 0.7rem;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  min-height: 0;
}
.gantt-bar:hover {
  opacity: 1;
}
.gantt-draggable {
  cursor: grab !important;
}
.gantt-draggable:active {
  cursor: grabbing !important;
}
.gantt-grouped {
  box-shadow: 0 0 0 2px var(--gc, #888);
  z-index: 2;
}
.gantt-group-hover {
  box-shadow: 0 0 0 3px var(--gc, #888), 0 0 8px var(--gc, #888) !important;
  filter: brightness(1.15);
  z-index: 5 !important;
}
.gantt-segment {
  display: flex;
  align-items: center;
  padding: 0 5px;
  font-size: 0.65rem;
  color: #fff;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 100%;
  line-height: 1.2;
}
.gantt-bar-single-label {
  display: flex;
  align-items: center;
  padding: 0 6px;
  width: 100%;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}
.gantt-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  z-index: 3;
}
.gantt-hour-cell {
  background: #fff;
}
.gantt-hour-cell.past {
  background: #f1f1f1;
}

/* ── Booking Gantt (enlarged) ──────────────────────────────────── */
#bookingGantt .gantt-table th,
#bookingGantt .gantt-table td {
  height: 56px;
}
#bookingGantt .gantt-table thead th {
  font-size: 0.85rem;
  padding: 0.5rem 0.3rem;
}
#bookingGantt .gantt-label {
  font-size: 0.9rem;
  min-width: 190px;
  max-width: 240px;
  padding: 0.4rem 0.85rem !important;
}
#bookingGantt .gantt-bar {
  top: 4px;
  bottom: 4px;
  font-size: 0.78rem;
  border-radius: 5px;
}
#bookingGantt .gantt-segment {
  font-size: 0.72rem;
  padding: 0 6px;
}
#bookingGantt .gantt-bar-single-label {
  padding: 0 8px;
}

/* Closed / past / break overlay on booking Gantt */
.gantt-zone-closed {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #e9ecef;
  z-index: 0;
  pointer-events: none;
}
.gantt-zone-break {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 5px,
    rgba(0, 0, 0, 0.05) 5px,
    rgba(0, 0, 0, 0.05) 10px
  );
  z-index: 0;
  pointer-events: none;
}
.gantt-zone-past {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.06);
  z-index: 0;
  pointer-events: none;
}

/* Gantt toggle */
.gantt-view-toggle .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
}

/* Responsive sidebar */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* Table styling */
.table th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
}
