#app-container {
  width: 100%;
  max-width: var(--layout-max-width, none);
  margin: 0;
  background: var(--bg-body);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 100%;
  background: var(--bg-body);
  overflow-y: auto;
  animation: slideIn 0.3s ease forwards;
  box-sizing: border-box;
}

.page.has-bottom-nav {
  padding-bottom: 80px;
}

.page.has-sticky-footer {
  padding-bottom: 0;
}

.page-content {
  flex: 1;
  padding-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-inset {
  padding: var(--layout-gutter);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-inset-x {
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-inset-y {
  padding-top: var(--layout-gutter);
  padding-bottom: var(--layout-gutter);
}

.header {
  display: flex;
  align-items: center;
  padding: 1rem var(--layout-gutter);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-app);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-back {
  padding: 0.5rem;
  color: var(--text-muted);
  min-width: var(--thumb-min);
  min-height: var(--thumb-min);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  margin-right: 2rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-hero {
  flex-direction: column;
  align-items: stretch;
  position: relative;
  top: auto;
  border-bottom: none;
  background: var(--bg-app);
  padding: 2.5rem var(--layout-gutter) 1.5rem;
  border-radius: 0 0 var(--radius-hero) var(--radius-hero);
  box-shadow: var(--shadow-soft);
}

.header-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.brand-accent {
  color: var(--primary);
}

.header-back-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  background: var(--bg-body);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-back-btn:hover {
  background: #f1f5f9;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-strong);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem var(--layout-gutter);
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: var(--shadow-nav);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  min-width: 56px;
  min-height: var(--thumb-min);
  justify-content: center;
  flex: 1;
}

.nav-item i {
  font-size: 1.25rem;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item-logout {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--accent-red);
}

.nav-item-logout:hover,
.nav-item-logout:active {
  color: #dc2626;
}

.bottom-nav--dense {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.bottom-nav--dense .nav-item {
  min-width: 0;
  font-size: 0.6rem;
}

.bottom-nav--dense .nav-item i {
  font-size: 1.125rem;
}

@media (min-width: 1024px) {
  .bottom-nav--dense .nav-item {
    min-width: 56px;
    font-size: 0.65rem;
  }

  .bottom-nav--dense .nav-item i {
    font-size: 1.25rem;
  }
}

.center-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--layout-gutter);
  text-align: center;
}

.sticky-footer {
  position: sticky;
  bottom: 0;
  padding: 1rem var(--layout-gutter);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-strong);
  z-index: 10;
}

.sticky-footer-center {
  text-align: center;
}

.sticky-footer-center .btn-outline {
  width: 100%;
  max-width: 100%;
}

.page.has-sticky-footer .page-content {
  padding-bottom: 1rem;
}

.footer-dual {
  display: flex;
  gap: 0.75rem;
  padding: 1rem var(--layout-gutter);
}

.footer-dual .btn-primary {
  flex: 1;
}

#bookingsList,
#tabUpcoming,
#tabPast,
#proList {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding: 0 var(--layout-gutter);
  box-sizing: border-box;
}

#bookingsList .appt-card,
#tabUpcoming .appt-card,
#tabPast .appt-card {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  box-sizing: border-box;
}

#proList .pro-card {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  box-sizing: border-box;
}

#proList > .empty-state {
  width: 100%;
}
