/* App shell: PC left sidebar + mobile footer nav */

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  display: none;
}

.app-mobile-header {
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.app-content {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  body.has-app-shell {
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
  }

  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: 15rem;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    z-index: 40;
  }

  .app-main {
    margin-left: 15rem;
    width: auto;
  }

  .app-sidebar__brand {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    min-height: 4rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
  }

  .app-sidebar__brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }

  .app-sidebar__brand-link:hover {
    text-decoration: none;
  }

  .app-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .app-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.625rem;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  .app-sidebar__link:hover {
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
  }

  .app-sidebar__link.is-active {
    background: #eff6ff;
    color: #2563eb;
  }

  .app-sidebar__link svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
  }

  .app-sidebar__section-label {
    margin: 0.75rem 0 0.25rem;
    padding: 0 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .app-sidebar__footer {
    padding: 0.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .app-sidebar__user {
    margin: 0.25rem 0.75rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .app-sidebar__logout {
    margin: 0;
    padding: 0 0.75rem 0.75rem;
  }

  .app-sidebar__logout button {
    width: 100%;
  }

  .app-mobile-header,
  .app-footer-nav {
    display: none !important;
  }

  body.has-footer-nav .app-content {
    padding-bottom: 2rem !important;
  }
}

@media (max-width: 1023px) {
  body.has-footer-nav .app-content {
    padding-bottom: 6rem;
  }
}

.company-switcher__label {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94a3b8;
}

.company-switcher__current {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
  word-break: break-word;
}

.company-switcher__form {
  margin: 0;
}

.company-switcher__select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.625rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 500;
}

.grecaptcha-badge {
  visibility: hidden !important;
}
