/* App shell — sidebar + header */
.layout-auth { background: #fff; }

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

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e8edf2;
  display: none;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 0;
}

@media (min-width: 992px) {
  .app-sidebar { display: flex; }
}

.app-sidebar-brand {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid #f0f3f7;
  margin-bottom: 1rem;
}

.app-sidebar-logo { max-height: 48px; width: auto; }

.app-sidebar-nav {
  flex: 1;
  padding: 0 0.75rem;
  overflow-y: auto;
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: 10px;
  color: #5a6a7a;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.app-nav-item i { width: 18px; text-align: center; font-size: 0.95rem; }

.app-nav-item:hover {
  background: #f4f8fc;
  color: var(--clube-cor-primaria);
}

.app-nav-item.active {
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--clube-cor-primaria);
  border-left: 3px solid var(--clube-cor-primaria);
  padding-left: calc(1rem - 3px);
}

.app-sidebar-help {
  margin: 1rem 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #eef2f6;
}

.app-sidebar-help-title { font-size: 0.85rem; font-weight: 700; margin: 0 0 0.25rem; }
.app-sidebar-help-text { font-size: 0.78rem; color: #6b7c8d; margin: 0 0 0.75rem; }

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

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e8edf2;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-left, .app-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-menu-toggle {
  color: var(--clube-text);
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
}

.app-header-logo img { max-height: 36px; }

.app-header-notify {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f4f7fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5a6a7a;
  text-decoration: none;
}

.app-header-notify-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-header-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  padding: 0.25rem;
}

/* Menu do usuário — dropdown customizado */
.app-header-user {
  position: relative;
}

.app-header-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 0.35rem 0.5rem 0.35rem 0.35rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.app-header-user-trigger:hover,
.app-header-user.is-open .app-header-user-trigger {
  background: #f4f8fc;
  border-color: #e8edf2;
}

.app-header-user-meta {
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  max-width: 160px;
}

.app-header-user-sub {
  font-size: 0.72rem;
  color: #6b7c8d;
  font-weight: 500;
}

.app-header-user-chevron {
  font-size: 0.7rem;
  color: #9aa8b5;
  transition: transform 0.2s;
}

.app-header-user.is-open .app-header-user-chevron {
  transform: rotate(180deg);
}

.app-header-avatar--lg {
  width: 48px;
  height: 48px;
}

.app-header-user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 200;
}

.app-header-user.is-open .app-header-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.app-header-user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid #f0f3f7;
  margin-bottom: 0.35rem;
}

.app-header-user-dropdown-info strong {
  display: block;
  font-size: 0.9rem;
  color: var(--clube-text);
}

.app-header-user-dropdown-info small {
  display: block;
  font-size: 0.75rem;
  color: #6b7c8d;
}

.app-header-user-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.app-header-user-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--clube-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.app-header-user-link:hover {
  background: #f4f8fc;
  color: var(--clube-cor-primaria);
}

.app-header-user-link-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f4f7fb;
  color: var(--clube-cor-primaria);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.app-header-user-dropdown-foot {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #f0f3f7;
}

.app-header-user-link--danger {
  color: #e74c3c;
}

.app-header-user-link--danger .app-header-user-link-icon {
  background: #fdecea;
  color: #e74c3c;
}

.app-header-user-link--danger:hover {
  background: #fff5f5;
  color: #c0392b;
}

.app-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #dde5ed;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.app-header-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clube-text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-content {
  flex: 1;
  padding: 1.5rem 1.25rem 2rem;
}

@media (min-width: 1200px) {
  .app-content { padding: 1.75rem 2rem 2.5rem; }
}

.app-offcanvas { width: 280px; }

/* Inner pages inside app shell */
.app-content .section-conta,
.app-content .section-corpo {
  padding: 0;
}

.app-content .container {
  max-width: 100%;
  padding: 0;
}

.app-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
