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

:root {
  --bg-main: #09090c;
  --bg-surface: #121217;
  --bg-card: rgba(22, 22, 28, 0.65);
  --bg-card-hover: rgba(30, 30, 38, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(212, 175, 55, 0.2);
  
  --primary: #d4af37;
  --primary-hover: #f3cf55;
  --primary-glow: rgba(212, 175, 55, 0.4);
  
  --text-main: #f3f3f6;
  --text-muted: #a0a0ab;
  --text-inverse: #09090c;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --error: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.2);
  --warning: #f59e0b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.05);
}

/* Base resets & utilities */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* Glassmorphism panels */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.glass-interactive:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Scrollbar customizations */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #b28f24 100%);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.btn-danger:hover {
  background: var(--error);
  color: white;
  transform: translateY(-1px);
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.5);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

/* Badge states */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Navbar / App Headers */
.navbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(9, 9, 12, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-main);
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

/* Dashboard Shell Grid */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 80px);
}

.sidebar {
  width: 260px;
  border-right: 1px solid var(--border-color);
  background: rgba(9, 9, 12, 0.4);
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition-fast);
}

.sidebar-item a:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.sidebar-item.active a {
  background: rgba(212, 175, 55, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.main-content {
  flex: 1;
  padding: 40px 32px;
  overflow-y: auto;
}

/* Dashboard Cards and Grids */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.stat-val {
  font-size: 2.2rem;
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 10px 0 5px;
  color: var(--text-main);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--success);
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin-bottom: 24px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 16px 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.custom-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.9rem;
}

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

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Booking Wizard Styling */
.wizard-container {
  max-width: 700px;
  margin: 40px auto;
}

.wizard-header {
  text-align: center;
  margin-bottom: 40px;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.step-node {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-muted);
  z-index: 2;
  transition: var(--transition-normal);
  font-size: 0.9rem;
}

.step-node.active {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px var(--border-glow);
}

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

.wizard-card {
  padding: 36px;
}

.wizard-panel {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.wizard-panel.active {
  display: block;
}

/* Service Grid Selectors */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.service-select-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.service-select-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.service-select-card.selected {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.05);
}

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

.service-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
}

.service-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.service-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.service-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Barber Selectors */
.barbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.barber-select-card {
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.barber-select-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.barber-select-card.selected {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.05);
}

.barber-avatar-container {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: var(--transition-fast);
}

.barber-select-card.selected .barber-avatar-container {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--border-glow);
}

.barber-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.barber-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Scheduling grid */
.scheduler-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

@media (max-width: 680px) {
  .scheduler-layout {
    grid-template-columns: 1fr;
  }
}

.calendar-input-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
}

.time-slots-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.time-slots-header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.time-slot {
  padding: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.time-slot:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.time-slot.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
  font-weight: 600;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.time-slot.booked {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
  background: transparent;
}

/* Payment Selector Card */
.payment-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.payment-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.payment-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.payment-card.selected {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.05);
}

.payment-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
}

.payment-card.selected .payment-icon {
  background: var(--primary);
  color: var(--text-inverse);
}

.payment-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.payment-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Checkout Waiting & Pix Room */
.pix-payment-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px;
  gap: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.qr-code-wrapper {
  background: white;
  padding: 14px;
  border-radius: var(--radius-md);
  display: inline-block;
}

.qr-code-img {
  display: block;
  width: 200px;
  height: 200px;
}

.pix-code-container {
  width: 100%;
}

.pix-input-group {
  display: flex;
  margin-top: 8px;
}

.pix-input-group input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.pix-input-group button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.booking-summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.summary-label {
  color: var(--text-muted);
}

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

.summary-total {
  font-size: 1.15rem;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: 4px;
}

.summary-total .summary-val {
  color: var(--primary);
}

/* Installer Design */
.installer-card {
  max-width: 580px;
  margin: 60px auto;
  padding: 40px;
}

.installer-header {
  text-align: center;
  margin-bottom: 30px;
}

.installer-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.installer-status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
}

/* UI Alert banners */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

/* Spinner Loader */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 1s infinite linear;
}

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

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 40px;
}

/* Landing Page Hero Style */
.hero {
  padding: 100px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, #a0a0ab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Dynamic calendar positioning for scheduling page */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(15deg);
  cursor: pointer;
}
