/* === HEADER === */
.header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  height: 49px;
  background: #ffffff;
  z-index: 995 !important;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid rgb(226, 232, 240);
}
.header-logo img { width: 85px; height: 20px; }
.header-company {
  display: flex; align-items: center; gap: 8px;
  width: 180px; height: 40px; cursor: pointer;
}
.header-company-avatar {
  width: 24px; height: 24px;
  background: rgb(231, 235, 233);
  border-radius: 6.4px;
  color: rgb(48, 90, 80);
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.header-company-name {
  font-size: 15px; font-weight: 500; color: rgb(42, 46, 52);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-btn {
  background: rgb(249, 251, 252);
  border: 1px solid rgb(232, 231, 234);
  border-radius: 8px;
  padding: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-navy);
  transition: background 0.15s;
}
.header-btn:hover { background: var(--color-border-light); }
.header-user {
  padding: 10px 16px;
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  width: 230px; height: 56px;
}
.header-user img { width: 32px; height: 32px; border-radius: 50%; }
.header-user-name { font-size: 13px; font-weight: 600; color: var(--color-dark-blue); }
.header-user-email { font-size: 12px; font-weight: 400; color: var(--color-dark-blue); }

/* === TRIAL BAR === */
.trial-bar {
  position: fixed;
  top: 49px; left: 0; right: 0;
  height: 45px;
  background: rgb(235, 244, 250);
  border-bottom: 1px solid rgb(0, 105, 180);
  z-index: 994;
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  font-size: 13px; color: var(--color-navy);
}
.trial-bar .btn-assinar {
  background: var(--color-green-primary);
  color: white; border: none; border-radius: 4px;
  padding: 6px 16px; font-size: 13px; font-weight: 500;
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 56px;
  height: 100vh;
  z-index: 993;
}
.sidebar-inner {
  background: var(--color-bg-white);
  box-shadow: var(--shadow-sidebar);
  display: flex; flex-direction: column;
  overflow: hidden;
  padding-top: calc(var(--header-height) + var(--trial-bar-height));
  width: var(--sidebar-width);
  height: 100vh;
}
.sidebar-nav { padding: 24px 0 12px; margin: 0; }
.sidebar-bottom { padding: 12px 0 0; margin: 0; margin-top: auto; }
.sidebar-link {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 48px;
  color: rgb(146, 146, 157);
  transition: color 0.15s;
  position: relative;
}
.sidebar-link svg { stroke: currentColor; fill: none; stroke-width: 2; width: 1em; height: 1em; }
.sidebar-li.active { background: var(--color-bg-sidebar-active); }
.sidebar-li.active .sidebar-link { color: var(--color-green-primary); }
.sidebar-link:hover { color: var(--color-green-primary); }
.sidebar-tooltip {
  position: absolute;
  left: calc(var(--sidebar-width) + 8px);
  top: 50%; transform: translateY(-50%);
  background: rgb(34, 34, 34); color: white;
  font-size: 12px; padding: 6px 14px;
  border-radius: 4px; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
  z-index: var(--z-tooltip);
}
.sidebar-link:hover .sidebar-tooltip { opacity: 1; }

/* === MAIN CONTENT === */
.main-content {
  padding: var(--content-padding-top) 16px 16px calc(var(--sidebar-width) + 16px);
  min-height: 100vh;
  background: var(--color-bg-main);
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* === FOOTER === */
.footer {
  padding: 48px 16px 24px calc(var(--sidebar-width) + 16px);
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex; justify-content: space-between; align-items: center;
}

/* === PAGE HEADER === */
.page-title {
  font-size: var(--font-size-h3); font-weight: 500;
  color: var(--color-dark-blue); margin-bottom: 4px;
}
.page-subtitle {
  font-size: var(--font-size-sm2); color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* === PANEL LATERAL === */
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: calc(var(--z-panel) - 1);
  display: none;
}
.panel-overlay.open { display: block; }
.side-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 500px;
  max-width: 100vw;
  background: #ffffff;
  box-shadow: rgba(89,105,129,0.1) 0px 0px 0px 1px, rgba(89,105,129,0.3) 0px 3px 20px 0px, rgba(0,0,0,0.05) 0px 1px 2px 0px;
  z-index: 1005;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.side-panel.open { display: flex; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; height: 50px;
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid rgba(0,0,0,0.125);
  flex-shrink: 0;
}
.panel-header h5 { font-size: 16px; font-weight: 600; color: var(--color-dark-blue); }
.panel-header .btn-close { background: none; border: none; color: var(--color-text-muted); }
.panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0; min-height: 0; }
.panel-body-inner { padding: 16px; max-width: 100%; box-sizing: border-box; }
.panel-footer {
  padding: 12px 20px; height: 59px;
  border-top: 1px solid rgba(0,0,0,0.125);
  background: rgba(0,0,0,0.03);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
