@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --background: #09090b; /* Zinc 950 */
  --foreground: #f4f4f5; /* Zinc 50 */
  --card: #18181b; /* Zinc 900 */
  --card-foreground: #f4f4f5;
  --primary: #c5a059; /* Gold Rota 47 */
  --primary-gradient: linear-gradient(135deg, #c5a059 0%, #9e7a3d 100%);
  --secondary: #27272a; /* Zinc 800 */
  --muted-foreground: #a1a1aa; /* Zinc 400 */
  --border: #27272a;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  -webkit-tap-highlight-color: transparent;
}

/* App Container limits for mobile/PWA layout */
.app-container {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
  margin-bottom: 24px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Premium Gold Indicator Line at the top */
.app-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.app-header {
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  padding-top: 10px;
}

/* Steps Progress Nodes styling */
.progress-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 10px 0;
}

.progress-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 1;
  transform: translateY(-50%);
}

.progress-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--primary);
  z-index: 1;
  transform: translateY(-50%);
  width: 0%;
  transition: var(--transition);
}

.step-node {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--background);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted-foreground);
  font-family: var(--font-title);
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.step-node.active {
  border-color: var(--primary);
  color: #121214;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(197, 160, 89, 0.3);
}

.step-node.completed {
  border-color: var(--primary);
  background: var(--card);
  color: var(--primary);
}

/* Stepper Panel view wrapper */
.step-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.step-panel.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.panel-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--foreground);
}

/* Barbers/Units card grid list */
.barber-grid, .units-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.barber-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.barber-card:hover, .barber-card.selected {
  border-color: var(--primary);
}

.barber-card.selected {
  background: rgba(197, 160, 89, 0.04);
  box-shadow: 0 0 0 1px var(--primary);
}

.barber-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
}

.barber-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
}

.barber-card:hover .barber-photo, .barber-card.selected .barber-photo {
  border-color: var(--primary);
}

.barber-info {
  flex-grow: 1;
}

.barber-name {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.barber-time {
  font-size: 0.72rem;
  color: var(--muted-foreground);
}

.barber-check {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  transition: var(--transition);
}

.barber-check svg {
  width: 18px;
  height: 18px;
}

.barber-card.selected .barber-check {
  color: var(--primary);
}

/* Services checkbox card styling */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.service-card:hover, .service-card.selected {
  border-color: var(--primary);
}

.service-card.selected {
  background: rgba(197, 160, 89, 0.04);
  box-shadow: 0 0 0 1px var(--primary);
}

.service-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.service-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.service-meta {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 4px;
}

.service-meta svg {
  width: 12px;
  height: 12px;
}

.service-price {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.service-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.service-checkbox svg {
  width: 12px;
  height: 12px;
  color: transparent;
}

.service-card.selected .service-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.service-card.selected .service-checkbox svg {
  color: #121214;
}

/* Forms styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 12px 14px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: inherit;
  font-size: 16px;
  transition: var(--transition);
}

input[type="date"] {
  -webkit-appearance: none;
  min-height: 48px;
  box-sizing: border-box;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.15);
}

/* Time slot selection grids */
.slots-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.slot-btn {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 2px;
  font-size: 0.8rem;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--foreground);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--primary);
}

.slot-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #121214;
}

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

/* Confirmation invoice card */
.conf-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conf-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.conf-row:last-child {
  border-bottom: none;
}

.conf-label {
  color: var(--muted-foreground);
}

.conf-val {
  font-weight: 600;
}

/* Float banner install prompt PWA */
.install-banner {
  display: none;
  background: rgba(197, 160, 89, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: -8px;
}

/* Toasts notify */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translate(-50%, -80px);
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 10px 16px;
  width: 90%;
  max-width: 380px;
  color: var(--foreground);
  font-size: 0.8rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast.danger { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

.toast svg {
  width: 16px;
  height: 16px;
}

/* Spinner active loading */
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
  gap: 8px;
}

/* Action button controls layout */
.action-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #121214;
  flex-grow: 1;
}

.btn-primary:hover {
  opacity: 0.95;
}

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

.btn-secondary {
  background: var(--secondary);
  color: var(--foreground);
  border: 1px solid var(--border);
  margin-right: 8px;
}

.btn-secondary:hover {
  background: var(--border);
}

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

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 440px) {
  body {
    padding: 12px;
  }
  .app-container {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-top: 10px;
    margin-bottom: 24px;
    min-height: auto;
  }
}
