/* CSS Variables */
:root {
  --primary: #6d28d9;
  --accent: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg: #0b0f19;
  --text: #ffffff;

  --card: #121a2a;
  --muted: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.12);

  --radius: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.35);

  --space: 20px;
  --max: 980px;

  /* Animations */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space);
}

@media (max-width: 640px) {
  .container {
    padding: 8px;
  }
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

@media (max-width: 640px) {
  .brand {
    gap: 10px;
    padding: 10px 0;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 16px;
  }

  .badge {
    font-size: 11px;
    padding: 6px 10px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
}

/* Cards */
.card {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

@media (max-width: 640px) {
  .card {
    padding: 16px;
    border-radius: 12px;
  }
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Grid */
.grid {
  display: grid;
  gap: 16px;
}

@media (max-width: 860px) {
  .grid {
    gap: 12px;
  }

  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  /* Hide sidebar summary on mobile */
  .grid.cols-2 > aside {
    display: none;
  }
}

@media (min-width: 861px) {
  .grid.cols-2 {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Buttons */
.btn {
  height: 48px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .btn {
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    gap: 8px;
  }

  .row {
    gap: 10px;
  }

  .row > * {
    flex: 1 1 120px;
  }

  /* Form elements mobile optimization */
  input,
  select,
  textarea {
    padding: 10px 10px;
    font-size: 14px;
  }

  label {
    font-size: 12px;
    margin: 8px 0 4px;
  }

  .h1 {
    font-size: 18px;
  }

  .p {
    font-size: 13px;
  }
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 85%, black) 100%);
  border-color: color-mix(in srgb, var(--primary) 55%, white);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.4);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.btn.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

.btn.small {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

/* Form Elements */
input,
select,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin: 10px 0 6px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1 1 140px;
}

.hidden {
  display: none !important;
}

/* Stepper */
.stepper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.step-dot {
  height: 10px;
  width: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid var(--border);
}

.step-dot.active {
  background: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 55%, white);
}

/* Typography */
.h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.p {
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.45;
}

/* Service Grid */
.service-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (max-width: 640px) {
  .service-card {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .service-thumb {
    width: 100%;
    height: 160px;
    align-self: center;
  }

  .service-meta {
    text-align: center;
  }

  .price {
    align-self: center;
    margin-top: 8px;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 861px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(109, 40, 217, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.service-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: color-mix(in srgb, var(--primary) 55%, white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(109, 40, 217, 0.1);
}

.service-card:active {
  transform: translateY(-2px) scale(1.01);
}

.service-card.selected {
  border-color: color-mix(in srgb, var(--primary) 65%, white);
  background: color-mix(in srgb, var(--primary) 16%, rgba(255, 255, 255, 0.04));
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.3), 0 0 0 2px rgba(109, 40, 217, 0.2);
  transform: translateY(-2px);
}

.service-thumb {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.service-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-name {
  font-weight: 800;
  font-size: 17px;
  margin: 0 0 6px;
  line-height: 1.3;
}

.service-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.price {
  font-weight: 800;
  font-size: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  height: fit-content;
  align-self: flex-start;
  margin-top: auto;
}

/* Slot Grid */
.slot-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 420px) and (max-width: 640px) {
  .slot-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .slot {
    height: 44px;
    font-size: 14px;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .slot-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 861px) {
  .slot-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.slot {
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.slot:hover:not(.disabled)::before {
  opacity: 1;
}

.slot:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.slot.selected {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 24%, rgba(255, 255, 255, 0.06)),
    color-mix(in srgb, var(--primary) 18%, rgba(255, 255, 255, 0.04))
  );
  border-color: color-mix(in srgb, var(--primary) 70%, white);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
  transform: translateY(-2px);
}

.slot.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(100, 100, 100, 0.05);
}

.slot:active:not(.disabled) {
  transform: translateY(0) scale(0.98);
}

/* Staff Selection Grid */
.staff-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .staff-grid {
    gap: 10px;
  }

  .staff-card {
    padding: 12px;
  }

  .staff-name {
    font-size: 14px;
  }

  .staff-skills {
    font-size: 11px;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .staff-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 861px) {
  .staff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.staff-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

.staff-card:active {
  transform: translateY(1px);
}

.staff-card.selected {
  border-color: color-mix(in srgb, var(--primary) 55%, white);
  background: color-mix(in srgb, var(--primary) 16%, rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent);
}

.staff-color {
  width: 12px;
  height: 48px;
  border-radius: 6px;
  background: #999;
  border: 1px solid var(--border);
}

.staff-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-name {
  font-weight: 900;
  font-size: 15px;
  margin: 0;
}

.staff-skills {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.3;
}

.staff-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--primary) 60%, white);
}

hr.sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px 0;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 14px;
  }
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .nav-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }

  .nav-tabs .tab-btn {
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.tab-btn {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 800;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: color-mix(in srgb, var(--primary) 18%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--primary) 55%, white);
}

@media (max-width: 640px) {
  .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Responsive Table Styles */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .table-container {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    /* Remove horizontal scroll, force responsive behavior */
    overflow-x: visible;
  }

  .table {
    font-size: 13px;
    border: none;
    width: 100%;
    min-width: auto;
  }

  .table thead {
    display: none; /* Hide table headers on mobile */
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
  }

  .table td {
    border: none;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
  }

  .table td:before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Hide less important columns on mobile */
  .table .hide-mobile {
    display: none !important;
  }

  /* Make action buttons full width on mobile */
  .table .mobile-full {
    width: 100%;
    margin-top: 8px;
  }
}

.table th,
.table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.04);
}

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

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(18, 26, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  z-index: 9999;
  max-width: calc(100% - 48px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-weight: 600;
  font-size: 14px;
  animation: toastSlideIn var(--transition-slow) forwards,
             toastSlideOut var(--transition-slow) 2.3s forwards;
}

@keyframes toastSlideIn {
  to {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toastSlideOut {
  to {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
}

/* Calendar Grid Styles */
.calendar-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 16px;
  min-height: 400px;
}

@media (max-width: 640px) {
  .calendar-grid {
    overflow-x: auto;
    min-height: 300px;
    -webkit-overflow-scrolling: touch;
  }
}

.calendar-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  font-weight: 900;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.calendar-time-col {
  background: rgba(255, 255, 255, 0.02);
  padding: 0 4px;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.calendar-staff-col {
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  height: 100%;
}

.booking-slot {
  position: absolute;
  left: 4px;
  right: 4px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 20px;
  border-left-width: 2px;
  border-left-style: solid;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.booking-slot .slot-service,
.booking-slot .slot-customer {
  display: inline-block;
  margin: 0 4px;
}

.booking-slot:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22);
}

.booking-slot .slot-time {
  font-weight: 900;
}

.booking-slot .slot-customer {
  color: var(--muted);
  font-size: 10px;
}

.booking-slot .slot-service {
  font-weight: 700;
  font-size: 10px;
}

.calendar-time-col {
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px dotted rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.calendar-staff-col {
  border-bottom: 1px dotted rgba(255, 255, 255, 0.05);
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  height: 100%;
}

.calendar-empty {
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  padding: 40px;
  color: var(--muted);
  border-radius: var(--radius);
  margin-top: 16px;
}

/* Sticky Summary Box */
.sticky-summary {
  position: fixed;
  top: 70px;
  right: 16px;
  background: color-mix(in srgb, var(--card) 95%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  z-index: 100;
  min-width: 220px;
  max-width: 280px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.sticky-summary > div {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.3;
}

.sticky-summary strong {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 860px) {
  .sticky-summary {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    transform: translateY(10px);
  }
}

/* Badge Notifications */
.tab-btn {
  position: relative;
}

.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: bold;
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* Monthly View */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .month-grid {
    gap: 4px;
  }

  .month-cell {
    min-height: 60px;
    padding: 6px;
    border-radius: 8px;
  }

  .month-cell-date {
    font-size: 12px !important;
    margin-bottom: 2px !important;
  }
}

@media (max-width: 400px) {
  .month-grid {
    gap: 1px;
  }

  .month-cell {
    min-height: 40px;
    padding: 2px;
    border-radius: 4px;
  }

  .month-cell-date {
    font-size: 10px !important;
    margin-bottom: 0px !important;
  }
}

.month-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 80px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.month-cell:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}

.month-cell.today {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}

.month-cell-date {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.month-cell-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.booking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Month Navigation Header */
.month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .month-nav {
    margin-bottom: 12px;
  }

  .month-nav h3,
  .month-nav .h1 {
    font-size: 16px !important;
  }

  .month-nav .btn {
    min-width: 44px;
    padding: 0 12px;
  }
}

/* Pending Request Card */
.pending-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.pending-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pending-actions {
  display: flex;
  gap: 8px;
}

/* Booking slots with different states */
.booking-slot.pending {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 193, 7, 0.2),
    rgba(255, 193, 7, 0.2) 10px,
    rgba(255, 193, 7, 0.1) 10px,
    rgba(255, 193, 7, 0.1) 20px
  );
  border-left-color: #fbbf24 !important;
}

.booking-slot.confirmed {
  background: rgba(34, 197, 94, 0.15);
  border-left-color: #22c55e !important;
}

.booking-slot.cancelled {
  background: rgba(148, 163, 184, 0.15);
  border-left-color: #94a3b8 !important;
  opacity: 0.5;
}

.booking-slot.hidden-by-filter {
  display: none !important;
}

/* Success button style */
.btn.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

/* Toggle Switch Style */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

.toggle-label {
  font-weight: 500;
  font-size: 14px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  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: rgba(255, 255, 255, 0.1);
  transition: 0.3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.btn.small {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 14px;
}

/* Services and Team Sections Mobile Optimizations */
@media (max-width: 640px) {
  /* Stack form fields vertically on mobile for better usability */
  #tab-services .row > div,
  #tab-team .row > div {
    flex: 1 1 100%; /* Full width on mobile */
    margin-bottom: 12px;
  }

  /* Better spacing for form sections */
  #tab-services .card:first-child,
  #tab-team .card:first-child {
    padding-bottom: 20px;
    margin-bottom: 16px;
  }

  /* Larger touch targets for table buttons */
  #tab-services .mobile-full,
  #tab-team .mobile-full {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* Improve file input appearance */
  #tab-services #svcImage,
  #tab-team input[type="file"] {
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    margin-top: 6px;
  }

  /* Better spacing for form labels */
  #tab-services label,
  #tab-team label {
    margin-top: 8px;
    margin-bottom: 4px;
  }

  /* Improve color input on mobile */
  #tab-team #stfColor {
    width: 60px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid var(--border);
  }
}

/* Config Section Mobile Optimizations */
@media (max-width: 640px) {
  /* Config section cards spacing */
  #tab-config .card {
    margin-bottom: 12px;
  }

  /* Weekly schedule table - make it responsive like other tables */
  #tab-config .table-container {
    overflow-x: visible;
  }

  #tab-config .table {
    font-size: 13px;
    border: none;
    width: 100%;
    min-width: auto;
  }

  #tab-config .table thead {
    display: none;
  }

  #tab-config .table,
  #tab-config .table tbody,
  #tab-config .table tr,
  #tab-config .table td {
    display: block;
    width: 100%;
  }

  #tab-config .table tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
  }

  #tab-config .table td {
    border: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
  }

  #tab-config .table td:before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Enhanced Theme section */
  .color-theme-grid {
    display: grid;
    gap: 20px;
  }

  .color-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all var(--transition-fast);
  }

  .color-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
  }

  .color-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  .color-icon {
    font-size: 18px;
  }

  .color-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
  }

  .color-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
  }

  .color-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .color-picker-wrapper input[type="color"] {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast);
  }

  .color-picker-wrapper input[type="color"]:hover {
    transform: scale(1.05);
  }

  .color-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .color-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
  }

  .color-description {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
  }

  .theme-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(109, 40, 217, 0.1);
    border: 1px solid rgba(109, 40, 217, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
  }

  .theme-icon {
    font-size: 16px;
  }

  /* Mobile optimizations for theme section */
  @media (max-width: 640px) {
    .color-theme-grid {
      gap: 16px;
    }

    .color-item {
      padding: 14px;
    }

    .color-controls {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }

    .color-picker-wrapper {
      align-self: center;
    }

    .color-picker-wrapper input[type="color"] {
      width: 50px;
      height: 50px;
    }

    .color-preview {
      width: 50px;
      height: 50px;
    }

    .color-value {
      font-size: 13px;
      padding: 4px 8px;
      min-width: 70px;
    }

    .theme-notice {
      padding: 10px;
      font-size: 12px;
    }
  }

  /* Brand section - stack elements */
  #tab-config label[for="cfgBrandName"],
  #tab-config label[for="cfgLogo"],
  #tab-config label[for="cfgLogoFile"] {
    margin-top: 8px;
  }

  /* Exception form - compact */
  #tab-config .row:has(#cfgExceptionDate) {
    gap: 6px;
  }

  #tab-config .row:has(#cfgExceptionDate) input,
  #tab-config .row:has(#cfgExceptionDate) select {
    font-size: 13px;
    padding: 8px 8px;
  }

  /* Client visibility toggles - better spacing */
  #tab-config .toggle-row {
    margin-bottom: 6px;
  }

  #tab-config .toggle-row .toggle-label {
    font-size: 13px;
  }
}

/* Client Calendar with Availability */
.client-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 8px;
  overflow-x: hidden;
}

.client-day-cell {
  aspect-ratio: 1;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}

/* Mobile Optimization */
@media (max-width: 640px) {
  .client-month-grid {
    gap: 2px;
  }

  .client-day-cell {
    min-height: 48px;
    padding: 4px;
    border-radius: 8px;
    border-width: 1.5px;
  }

  .client-day-number {
    font-size: 14px !important;
    margin-bottom: 2px !important;
  }

  .client-day-status {
    font-size: 8px !important;
    letter-spacing: 0.3px !important;
  }

  .client-day-cell.today::after {
    width: 4px;
    height: 4px;
    top: 3px;
    right: 3px;
  }
}

/* Extra small screens - tighten calendar columns */
@media (max-width: 400px) {
  .client-month-grid {
    gap: 0.5px;
  }

  .client-day-cell {
    min-height: 32px;
    padding: 1px;
    border-radius: 4px;
    border-width: 1px;
  }

  .client-day-number {
    font-size: 10px !important;
    margin-bottom: 0px !important;
  }

  .client-day-status {
    font-size: 6px !important;
    letter-spacing: 0.1px !important;
  }

  .client-day-cell.today::after {
    width: 2px;
    height: 2px;
    top: 1px;
    right: 1px;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .client-day-cell {
    min-height: 54px;
    padding: 6px;
  }

  .client-day-number {
    font-size: 16px !important;
  }

  .client-day-status {
    font-size: 8.5px !important;
  }
}

.client-day-cell:hover:not(.disabled):not(.past) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.client-day-cell.selected {
  background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 85%, black) 100%);
  border-color: color-mix(in srgb, var(--primary) 55%, white);
  border-width: 3px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent), 0 4px 12px rgba(109, 40, 217, 0.4);
  transform: scale(1.05);
  color: white;
}

.client-day-cell.today {
  border-color: var(--primary);
  border-width: 2px;
}

.client-day-cell.today::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.client-day-cell.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: rgba(100, 100, 100, 0.1);
}

.client-day-cell.past {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(100, 100, 100, 0.05);
}

.client-day-cell.has-availability {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.client-day-cell.has-availability:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.5);
}

.client-day-cell.limited-availability {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.client-day-cell.limited-availability:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
}

.client-day-number {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.client-day-status {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.client-day-cell.has-availability .client-day-status {
  color: #22c55e;
}

.client-day-cell.limited-availability .client-day-status {
  color: #fbbf24;
}

.client-day-cell.disabled .client-day-status {
  color: #94a3b8;
}

/* Legend */
.calendar-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}

@media (max-width: 640px) {
  .calendar-legend {
    gap: 12px;
    padding: 10px;
    margin-top: 12px;
  }

  .legend-item {
    font-size: 11px;
  }

  .legend-color {
    width: 14px;
    height: 14px;
  }
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid;
}

.legend-color.available {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.legend-color.limited {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.legend-color.closed {
  background: rgba(100, 100, 100, 0.1);
  border-color: var(--border);
}

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-slot {
  height: 48px;
  border-radius: 12px;
}

.skeleton-service {
  height: 120px;
  border-radius: 16px;
}



/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-base) ease-out;
}
