/**
 * firewater-layout.css — shell layout (sidebar desktop / bottom bar mobile)
 */

html.fw-shell-active {
  font-family: var(--fw-font);
}

html.fw-shell-active body {
  min-height: 100vh;
}

/* Desktop sidebar */
.fw-shell-sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--fw-sidebar-width);
  background: var(--fw-bg-subtle);
  border-right: 1px solid var(--fw-border-subtle);
  z-index: 200;
  flex-direction: column;
}

.fw-shell-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Mobile bottom bar */
.fw-shell-bottom {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fw-bottom-nav-height);
  background: var(--fw-bg-subtle);
  border-top: 1px solid var(--fw-border-subtle);
  z-index: 200;
  padding: 0 var(--fw-space-2);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.fw-shell-bottom .fw-shell-nav {
  flex-direction: row;
  flex: 1;
  align-items: stretch;
  justify-content: space-around;
  padding: var(--fw-space-1) 0;
  gap: 0;
}

.fw-shell-bottom .fw-shell-link {
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: var(--fw-space-1);
  padding: var(--fw-space-1);
  font-size: 10px;
  text-align: center;
}

.fw-shell-bottom .fw-shell-link svg {
  width: 20px;
  height: 20px;
}

.fw-shell-bottom .fw-shell-link-indicator {
  display: none;
}

.fw-shell-bottom .fw-shell-brand,
.fw-shell-bottom .fw-shell-footer {
  display: none;
}

.fw-shell-bottom .fw-shell-signout-mobile {
  flex: 0 0 auto;
  min-width: 56px;
}

@media (min-width: 768px) {
  .fw-shell-signout-mobile {
    display: none !important;
  }
}

/* Main content offset */
html.fw-shell-active:not([data-fw-app=""]) {
  --fw-content-offset-bottom: var(--fw-bottom-nav-height);
  --fw-content-offset-left: 0;
}

@media (min-width: 768px) {
  html.fw-shell-active .fw-shell-sidebar {
    display: flex;
  }

  html.fw-shell-active .fw-shell-bottom {
    display: none;
  }

  html.fw-shell-active:not([data-fw-app=""]) {
    --fw-content-offset-bottom: 0;
    --fw-content-offset-left: var(--fw-sidebar-width);
  }
}

html.fw-shell-active body {
  padding-bottom: calc(var(--fw-content-offset-bottom, 0px) + env(safe-area-inset-bottom, 0px));
  margin-left: var(--fw-content-offset-left, 0);
}

/* Hub: expand beyond 480px phone column on desktop */
html.fw-shell-active[data-fw-app="hub"] body,
html[data-fw-app="hub"] body {
  max-width: none;
  margin: 0;
}

.fw-hub-main {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

html.fw-shell-active[data-fw-app="hub"] .fw-hub-main {
  max-width: min(640px, 100%);
}

html.fw-shell-active[data-fw-app="hub"] .app-header {
  position: sticky;
  top: 0;
  z-index: 120;
}

/* Hub internal tabbar sits above shell bottom nav on mobile */
html.fw-shell-active[data-fw-app="hub"] .tabbar {
  left: 0;
  right: 0;
  transform: none;
  max-width: none;
  width: auto;
  bottom: calc(var(--fw-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  z-index: 150;
}

html.fw-shell-active[data-fw-app="hub"] .fw-hub-main {
  padding-bottom: calc(var(--fw-hub-tabbar-height, 72px) + var(--fw-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

html.fw-shell-active[data-fw-app="hub"] body {
  padding-bottom: 0;
}

@media (min-width: 768px) {
  html.fw-shell-active[data-fw-app="hub"] .tabbar {
    left: var(--fw-sidebar-width);
    right: 0;
    bottom: 0;
    width: auto;
  }

  html.fw-shell-active[data-fw-app="hub"] .fw-hub-main {
    padding-bottom: calc(var(--fw-hub-tabbar-height, 72px) + env(safe-area-inset-bottom, 0px));
  }
}

/* Inventory submit bar above bottom nav */
html.fw-shell-active[data-fw-app="inventory"] .submit-bar {
  bottom: calc(var(--fw-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

html.fw-shell-active[data-fw-app="inventory"] .container {
  padding-bottom: calc(120px + var(--fw-bottom-nav-height));
}

@media (min-width: 768px) {
  html.fw-shell-active[data-fw-app="inventory"] .submit-bar {
    bottom: 0;
    left: var(--fw-sidebar-width);
    right: 0;
  }

  html.fw-shell-active[data-fw-app="inventory"] .container {
    padding-bottom: 120px;
  }
}

/* Dashboard tabs sticky offset */
html.fw-shell-active[data-fw-app="dashboard"] nav.tabs {
  top: calc(56px + var(--fw-shell-topbar-height, 0px));
}

@media (min-width: 768px) {
  html.fw-shell-active[data-fw-app="dashboard"] .app {
    padding-bottom: var(--fw-space-6);
  }
}

html.fw-standalone-inventory body {
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  margin-left: 0 !important;
}

html.fw-standalone-inventory .container {
  padding-bottom: 120px !important;
}

html.fw-standalone-inventory .submit-bar {
  bottom: 0 !important;
  left: 0 !important;
}
.fw-landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--fw-space-6);
  background: var(--fw-bg);
}

.fw-landing-inner {
  width: 100%;
  max-width: 400px;
}

.fw-landing-logo {
  display: block;
  width: min(280px, 80vw);
  height: auto;
  margin: 0 auto var(--fw-space-6);
}

.fw-landing-title {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fw-text-muted);
  margin-bottom: var(--fw-space-6);
}

.fw-landing-tabs {
  display: flex;
  gap: var(--fw-space-2);
  margin-bottom: var(--fw-space-4);
}

.fw-landing-tab {
  flex: 1;
  padding: var(--fw-space-2) var(--fw-space-3);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--fw-text-secondary);
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  cursor: pointer;
  transition: all var(--fw-duration) var(--fw-ease);
}

.fw-landing-tab.active {
  color: var(--fw-text);
  background: var(--fw-brand-soft);
  border-color: var(--fw-brand-border);
}

.fw-landing-panel {
  display: none;
}

.fw-landing-panel.active {
  display: block;
}
