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

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Color Palette - Light Mode Premium */
  --bg-base: #ecfdf5;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  
  --primary: #10b981; /* Emerald Green */
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.3);

  --secondary: #34d399;
  
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-strong: rgba(0, 0, 0, 0.1);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 15px var(--primary-glow);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, textarea, select {
  font-family: var(--font-body);
  outline: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Glassmorphism utilities */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.glass-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Common layout utilities */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
  transform: translateY(-1px);
}

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

.btn-success { background-color: var(--accent-success); color: white; box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39); }
.btn-danger { background-color: var(--accent-danger); color: white; box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39); }

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.input-field {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Digital Clock */
.digital-clock {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-family: var(--font-heading);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.05em;
}

.digital-clock .time {
  font-size: 1.1rem;
  color: var(--primary);
}

.digital-clock .date {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border-strong);
  padding-left: 0.5rem;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  z-index: 10;
  overflow-y: auto;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

/* Typography utilities */
.text-gradient {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Navigation */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}

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

.nav-item.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.25);
}

.hover-row:hover { background-color: rgba(255,255,255,0.02); }

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
    overflow-y: auto;
  }
  
  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border-strong);
    z-index: 100;
  }
  
  .sidebar nav {
    flex-direction: row !important;
    gap: 0.25rem !important;
  }
  
  .nav-item {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    font-size: 0.85rem;
  }

  .sidebar > div:first-child {
    display: none !important; 
  }

  .sidebar > div:last-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  .main-content {
    padding: 1rem;
    overflow-y: visible;
  }

  .pos-layout {
    flex-direction: column !important;
    height: auto !important;
  }

  .cart-section {
    width: 100% !important;
    margin-top: 1rem;
  }

  .glass-card {
    min-width: 100% !important;
  }
  
  #checkout-modal .glass-card, #scanner-modal .glass-card {
    width: 90% !important;
    padding: 1.5rem !important;
  }

  .digital-clock {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
  }
  .digital-clock .time { font-size: 0.95rem; }
  .digital-clock .date { font-size: 0.75rem; }
}
