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

:root {
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Inter', sans-serif;

  /* HSL Color System - Premium Dark Mode */
  --bg-primary: 222 47% 6%;         /* #060913 */
  --bg-secondary: 222 47% 10%;       /* #0b0f1d */
  --surface: 222 47% 14%;           /* #111827 */
  --surface-hover: 222 47% 18%;     /* #1f2937 */
  
  --primary: 217 91% 60%;           /* Neon Blue */
  --primary-glow: 217 91% 60% / 0.15;
  
  --success: 142 76% 45%;           /* Emerald Green */
  --success-glow: 142 76% 45% / 0.15;
  
  --warning: 38 92% 50%;            /* Amber/Gold */
  --warning-glow: 38 92% 50% / 0.15;
  
  --danger: 350 89% 60%;            /* Rose/Crimson */
  --danger-glow: 350 89% 60% / 0.15;

  --text-primary: 210 40% 98%;      /* Off-white */
  --text-secondary: 215 20% 65%;    /* Cool Gray */
  --text-muted: 215 15% 45%;        /* Muted Gray */
  
  --border-color: 217 30% 18%;      /* Deep Blue Border */
  --border-glass: 255 255 255 / 0.06;
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-primary);
  background-color: hsl(var(--bg-primary));
  color: hsl(var(--text-primary));
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Native App Wrapper */
.app-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background-color: hsl(var(--bg-secondary));
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  border-left: 1px solid hsl(var(--border-color));
  border-right: 1px solid hsl(var(--border-color));
}

@media (min-width: 480px) {
  .app-container {
    height: 92vh;
    border-radius: 32px;
    border: 1px solid hsl(var(--border-color));
  }
}

/* Scroll Container */
.screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 90px; /* Space for Bottom Nav Bar */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Hide Scrollbar */
.screen-content::-webkit-scrollbar {
  display: none;
}
.screen-content {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(var(--border-glass));
  border-radius: 20px;
}

.glass-card {
  background: rgba(22, 30, 49, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:active {
  transform: scale(0.98);
  background: rgba(22, 30, 49, 0.7);
}

/* Glowing Neon Elements */
.glow-primary {
  box-shadow: 0 0 15px var(--primary-glow);
}
.glow-success {
  box-shadow: 0 0 15px var(--success-glow);
}

/* Premium Form Elements */
.input-field {
  width: 100%;
  padding: 14px 16px;
  background: rgba(10, 15, 30, 0.6);
  border: 1.5px solid hsl(var(--border-color));
  border-radius: 12px;
  color: hsl(var(--text-primary));
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.input-field:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
  background: rgba(10, 15, 30, 0.9);
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--text-secondary));
  margin-bottom: 6px;
}

/* Custom Grid Buttons for Quick Billing */
.service-grid-button {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  height: 105px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-grid-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 80%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-grid-button:active {
  transform: scale(0.96);
  border-color: hsl(var(--primary));
}

.service-grid-button.selected {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(29, 78, 216, 0.05) 100%);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.service-grid-button.selected::before {
  opacity: 1;
}

.service-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: hsl(var(--text-primary));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.service-price {
  font-weight: 700;
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  color: hsl(var(--primary));
}

.service-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: hsl(var(--text-secondary));
}

/* Bottom Tab Navigation Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: rgba(11, 15, 29, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 20%;
  height: 100%;
  color: hsl(var(--text-muted));
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.25s ease;
  position: relative;
}

.nav-tab i {
  font-size: 1.35rem;
  margin-bottom: 4px;
  transition: transform 0.25s ease;
}

.nav-tab:active i {
  transform: scale(0.85);
}

.nav-tab.active {
  color: hsl(var(--primary));
}

.nav-tab.active i {
  transform: translateY(-2px);
}

/* Tab indicator dot */
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: hsl(var(--primary));
  box-shadow: 0 0 8px hsl(var(--primary));
}

/* Micro-animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Slide in sheets / modals */
.slide-up-modal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--bg-secondary));
  border-top: 1.5px solid hsl(var(--border-color));
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.7);
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.94, 0.6, 1);
}

.active > .slide-up-modal {
  transform: translateY(0);
}

/* Keyboard adjust scroll offset spacer */
.keyboard-spacer {
  height: 0;
  transition: height 0.2s ease;
}
