/* Layout, navigation, and header styles extracted from index.html */
.mobile-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile */
  max-width: 100vw;
  position: relative;
}

/* Page Management */
.page {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page.active {
  display: flex;
}

/* Mobile Header */
.mobile-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  width: 100%;
  min-height: 60px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.logo-mobile {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: transparent;
  display: inline-grid;
  align-items: center;
  justify-items: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
}

.logo-mobile img {
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
}

#brandLogoFallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.page-title-mobile {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.back-btn-mobile {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn-mobile:active {
  background: var(--border-light);
  transform: scale(0.95);
}

.search-btn-mobile {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

.search-btn-mobile:hover {
  background: var(--border-light);
  border-color: var(--border);
}

.search-btn-mobile:active {
  transform: scale(0.97);
}

.search-btn-mobile:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.prototype-demo-btn-mobile {
  background: rgba(12, 21, 38, 0.92);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

.prototype-demo-btn-mobile:hover {
  background: rgba(37, 99, 235, 0.18);
}

.prototype-demo-btn-mobile:active {
  transform: scale(0.97);
}

.prototype-demo-btn-mobile:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Navigation */
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px;
  display: none !important; /* Hidden per request */
}

.nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

.nav-item-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 60px;
  min-height: 48px;
  justify-content: center;
  cursor: pointer;
}

.nav-item-mobile.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item-mobile:active {
  transform: scale(0.95);
}

.nav-item-mobile:focus-visible,
.filter-chip:focus-visible,
.status-item-mobile:focus-visible,
.order-card:focus-visible,
.search-back-btn:focus-visible,
.back-btn-mobile:focus-visible,
.search-btn-mobile:focus-visible,
.refresh-btn-mobile:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

.nav-icon {
  width: 24px;
  height: 24px;
}

.nav-label {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}
