/* Layout do app - usa variáveis de tema (theme.css) */
.app-layout { display: flex; min-height: 100vh; height: 100vh; position: relative; overflow: hidden; }
body { background: var(--maestro-bg, #f8f9fa); color: var(--maestro-text, #212529); }
.app-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--maestro-sidebar-bg, #f8f9fa);
  border-right: 1px solid var(--maestro-sidebar-border, #dee2e6);
  padding: 1rem 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-sidebar .sidebar-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.app-sidebar .nav-link {
  color: var(--maestro-text, #495057);
  padding: 0.6rem 1.25rem;
  border-radius: 0;
}
.app-sidebar .nav-link:hover { background: var(--maestro-nav-hover, #e9ecef); }
.app-sidebar .nav-link.active {
  background: var(--maestro-nav-active, rgba(0,212,170,0.2));
  color: var(--maestro-accent, #00d4aa);
  font-weight: 500;
}
.app-sidebar .nav-link svg,
.app-sidebar .nav-link i { width: 1.2rem; margin-right: 0.5rem; vertical-align: -0.2em; flex-shrink: 0; }
.app-sidebar .nav-link i { font-size: 1.1rem; }
.app-content { flex: 1; overflow: hidden; padding: 1rem; min-width: 0; display: flex; flex-direction: column; background: var(--maestro-bg, #fff); }
.app-content iframe { border: none; width: 100%; flex: 1; min-height: 0; height: calc(100vh - 2rem); height: calc(100dvh - 2rem); display: block; }
.app-sidebar .btn-settings {
  margin: 0.25rem 0;
  background: var(--maestro-bg-elevated, #e9ecef) !important;
  border-color: var(--maestro-border, #dee2e6) !important;
  color: var(--maestro-text, #495057) !important;
}
.app-sidebar .btn-settings:hover {
  background: var(--maestro-nav-hover, #e9ecef) !important;
  border-color: var(--maestro-accent, #00d4aa) !important;
  color: var(--maestro-accent, #00d4aa) !important;
}
.app-sidebar .sidebar-footer { border-color: var(--maestro-border, #dee2e6) !important; }
.app-sidebar .text-muted { color: var(--maestro-text-muted, #6c757d) !important; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1019; }
.btn-menu-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1018;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  background: var(--maestro-accent, #00d4aa) !important;
  border: none !important;
  color: #0a0a0f !important;
}
.btn-menu-toggle:hover { background: var(--maestro-accent-hover, #00ffcc) !important; color: #0a0a0f !important; }

@media (max-width: 767px) {
  body.sidebar-open { overflow: hidden; }
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .sidebar-overlay.open { display: block; }
  .btn-menu-toggle { display: flex; align-items: center; justify-content: center; }
  .app-content { padding: 0.75rem; padding-bottom: 4.5rem; }
  .app-content iframe { min-height: calc(100vh - 5rem); min-height: calc(100dvh - 5rem); }
}
