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

:root {
  --bg-color: #0f111a;
  --card-bg: #1a1d2d;
  --card-border: #2a2e45;
  --text-primary: #ffffff;
  --text-secondary: #949aae;
  --accent-color: #00e676;
  --accent-hover: #00c853;
  --danger-color: #ff3d00;
  --warning-color: #ffab00;
  --nav-height: 70px;
  --border-radius: 16px;
  --transition: all 0.2s ease;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-height) + 20px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  font-weight: 600;
  color: var(--text-primary);
}

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

a:hover {
  filter: brightness(1.2);
}

/* Layout container */
.pos-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Glassmorphism Cards */
.pos-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Form Elements */
.pos-select, .pos-input {
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}
.pos-select:focus, .pos-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Buttons */
.pos-button {
  background: var(--accent-color);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pos-button:active {
  transform: scale(0.98);
}
.pos-button.secondary {
  background: var(--card-border);
  color: var(--text-primary);
}
.pos-button.danger {
  background: var(--danger-color);
  color: #fff;
}
.pos-button.full-width {
  width: 100%;
}

/* Dashboard TilesGrid */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.pos-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 16px 10px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-primary);
  min-height: 110px;
}
.pos-tile:active {
  transform: scale(0.96);
  border-color: var(--accent-color);
}
.pos-tile svg {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  fill: var(--accent-color);
}
.pos-tile h3 {
  margin: 0;
  font-size: 15px;
}
.pos-tile p {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 0px;
  line-height: 1.2;
}

/* List Groups Overrides for Delivery/Orders */
.pos-list-group {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pos-list-item {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
}
.pos-list-item:last-child {
  border-bottom: none;
}
.pos-list-item.header {
  font-weight: 600;
  font-size: 1.1em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--card-border);
}

/* Status Indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.status-pending {
  background: rgba(255, 171, 0, 0.15);
  color: var(--warning-color);
}
.status-delivered {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-color);
}

/* Delivery Card specifics */
.order-card {
  border-left: 4px solid var(--warning-color);
}
.order-card.delivered {
  border-left: 4px solid var(--accent-color);
  opacity: 0.8;
}

/* Segmented Control for Payment */
.pos-segmented-control {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.pos-segment-btn {
  flex: 1;
  min-width: 80px;
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}
.pos-segment-btn.active {
  background: rgba(0, 230, 118, 0.15);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Bottom Nav */
.pos-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
.pos-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  width: 100%;
  height: 100%;
  transition: var(--transition);
  font-size: 12px;
  font-weight: 500;
}
.pos-nav-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  fill: currentColor;
}
.pos-nav-item:active, .pos-nav-item:hover, .pos-nav-item.active {
  color: var(--accent-color);
}
@media (min-width: 768px) {
  /* For larger screens, we keep bottom nav but make it cleaner, or could switch to sidebar. Let's keep it centered at bottom for simplicity */
  .pos-bottom-nav {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    border-left: 1px solid var(--card-border);
    border-right: 1px solid var(--card-border);
  }
}
