/* 1.0.292 — shell persistente, menu secundario e paginas de conta. */
:root {
  --oliver-bottom-nav-base: 66px;
  --oliver-account-surface: rgba(8, 17, 36, .96);
  --oliver-account-border: rgba(148, 163, 184, .15);
}

.profile-avatar-trigger { position: relative !important; isolation: isolate; }
.avatar-menu-indicator {
  position: absolute;
  right: -2px;
  bottom: -1px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-content: center;
  gap: 2px;
  border: 2px solid #07101f;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-primary), var(--brand-primary));
  box-shadow: 0 4px 12px rgba(var(--brand-rgb),.38);
  pointer-events: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.avatar-menu-indicator i { display: block; width: 9px; height: 1.5px; border-radius: 999px; background: currentColor; }
.profile-avatar-trigger:active .avatar-menu-indicator,
.profile-avatar-trigger[aria-expanded="true"] .avatar-menu-indicator { transform: scale(.9); box-shadow: 0 2px 9px rgba(var(--brand-rgb),.5); }

.sidebar-mobile-hub { display: none; }
.account-destination-page { display: grid; gap: 16px; }
.account-destination-head { display: grid; gap: 5px; margin: 2px 0 0; }
.account-destination-head small { color: #67e8f9; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.account-destination-head h2 { margin: 0; color: #f8fafc; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; }
.account-destination-head p { max-width: 720px; margin: 0; color: #94a3b8; font-size: 13px; line-height: 1.55; }
.account-destination-stack { display: grid; gap: 14px; }
.account-destination-card,
.account-destination-stack > .profile-settings-panel,
.profile-account-card {
  border: 1px solid var(--oliver-account-border);
  border-radius: 22px;
  background: radial-gradient(circle at 100% 0, rgba(59, 130, 246, .09), transparent 42%), linear-gradient(145deg, rgba(15, 23, 48, .98), var(--oliver-account-surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
.account-destination-stack > .profile-settings-panel { display: block !important; padding: 18px; }
.profile-card > .profile-settings-tabs { display: none !important; }
.profile-card > h3 { margin-bottom: 14px; }
.profile-card > [data-settings-panel="profile"] { display: block !important; }
.profile-account-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .48fr); gap: 12px; margin: 0 0 16px; }
.profile-account-card { padding: 15px; }
.profile-account-card small,
.profile-account-card span { display: block; color: #8ea2c0; font-size: 11px; }
.profile-account-card strong { display: block; margin-top: 5px; color: #f8fafc; font-size: 15px; }
.profile-account-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.profile-account-link { display: grid; gap: 4px; min-height: 76px; padding: 14px; border: 1px solid rgba(var(--brand-rgb),.28); border-radius: 16px; color: var(--brand-secondary); background: rgba(76, 29, 149, .12); text-decoration: none; }
.profile-account-link strong { font-size: 13px; }
.profile-account-link small { color: #94a3b8; font-size: 11px; }
.settings-preference-grid,
.support-faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-preference-card,
.support-faq-card { padding: 16px; border: 1px solid var(--oliver-account-border); border-radius: 18px; background: rgba(7, 15, 31, .78); }
.settings-preference-card strong,
.support-faq-card strong { display: block; color: #f8fafc; font-size: 14px; }
.settings-preference-card p,
.support-faq-card p { margin: 7px 0 12px; color: #8ea2c0; font-size: 12px; line-height: 1.5; }
.settings-preference-card .btn { width: 100%; }
.notifications-page-list { display: grid; gap: 10px; }
.notifications-page-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }

@media (max-width: 899px) {
  .sidebar { display: flex !important; flex-direction: column !important; padding: max(14px, var(--oliver-safe-top)) 12px max(10px, var(--oliver-safe-bottom)) !important; }
  .sidebar > .sidebar-brand,
  .sidebar > #sidebarNav,
  .sidebar-footer > #sidebarUser { display: none !important; }
  .sidebar-mobile-hub { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
  .sidebar-mobile-account { display: grid; grid-template-columns: 62px minmax(0, 1fr) 12px; align-items: center; gap: 12px; padding: 8px 8px 14px; }
  .sidebar-mobile-avatar { width: 62px; height: 62px; overflow: hidden; border: 1px solid rgba(var(--brand-rgb),.45); border-radius: 50%; background: rgba(15, 23, 42, .9); }
  .sidebar-mobile-avatar img,
  .sidebar-mobile-avatar .photo-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
  .sidebar-mobile-account-copy { min-width: 0; }
  .sidebar-mobile-account-copy strong { display: block; overflow: hidden; color: #f8fafc; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-mobile-account-copy small { display: block; margin-top: 3px; overflow: hidden; color: #8ea2c0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-mobile-status { width: 10px; height: 10px; border: 2px solid #07101f; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 10px rgba(45, 212, 191, .7); }
  .sidebar-mobile-profile,
  .sidebar-mobile-nav button { min-height: 50px; border: 1px solid transparent; color: #dbeafe; background: transparent; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .sidebar-mobile-profile { display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-color: rgba(var(--brand-rgb),.32); border-radius: 15px; background: linear-gradient(135deg, rgba(76, 29, 149, .28), rgba(15, 23, 42, .72)); text-align: left; }
  .sidebar-mobile-profile-icon,
  .sidebar-mobile-nav-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--brand-secondary); background: rgba(76, 29, 149, .3); }
  .sidebar-mobile-profile-icon svg,
  .sidebar-mobile-nav-icon svg { width: 18px; height: 18px; }
  .sidebar-mobile-profile > span:not(.sidebar-mobile-profile-icon) { font-size: 14px; font-weight: 700; }
  .sidebar-mobile-chevron { width: 17px; height: 17px; color: #8ea2c0; }
  .sidebar-mobile-nav { min-height: 0; margin-top: 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .sidebar-mobile-section-label { display: block; margin: 14px 10px 5px; color: #64748b; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  .sidebar-mobile-nav button { display: grid; grid-template-columns: 34px minmax(0, 1fr) 17px; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 13px; text-align: left; }
  .sidebar-mobile-nav button > span:nth-child(2) { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-mobile-nav button:active,
  .sidebar-mobile-nav button.active { border-color: rgba(var(--brand-rgb),.26); background: rgba(76, 29, 149, .18); }
  .sidebar-footer { flex: 0 0 auto !important; padding: 10px 0 0 !important; border-top: 1px solid rgba(148, 163, 184, .11); }
  #sidebarLogoutBtn { min-height: 50px !important; border: 1px solid rgba(244, 63, 94, .22) !important; border-radius: 14px !important; color: #fb7185 !important; background: rgba(127, 29, 29, .1) !important; }
  .sidebar-version { text-align: center; }
  .account-destination-head { padding: 0 3px; }
  .account-destination-head h2 { font-size: 24px; }
  .account-destination-stack > .profile-settings-panel { padding: 14px; border-radius: 18px; }
  .profile-account-overview,
  .settings-preference-grid,
  .support-faq-grid,
  .profile-account-links { grid-template-columns: 1fr; }

  /* A Bottom Navigation e parte permanente do shell, inclusive na IA. */
  .app,
  html.cap-native .app,
  body.ol-assistant-active .app,
  html.cap-native body.ol-assistant-active .app,
  html.cap-native body.ol-assistant-active.assistant-keyboard-open .app {
    box-sizing: border-box !important;
    padding-bottom: calc(var(--oliver-bottom-nav-base) + var(--oliver-safe-bottom)) !important;
  }
  .bottom-tabs,
  html:not(.cap-native) .bottom-tabs,
  html.cap-native .bottom-tabs,
  body.ol-assistant-active .bottom-tabs,
  body.ol-assistant-active.assistant-keyboard-open .bottom-tabs,
  html.cap-native body.ol-assistant-active.assistant-keyboard-open .bottom-tabs {
    bottom: 0 !important;
    height: calc(var(--oliver-bottom-nav-base) + var(--oliver-safe-bottom)) !important;
    padding-bottom: var(--oliver-safe-bottom) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) !important;
  }
  body.ol-assistant-active .bottom-tabs .nav-fab-slot { display: flex !important; }
  body.ol-assistant-active #fab,
  body.ol-assistant-active .bottom-tabs .nav-fab {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  body.ol-assistant-active #fabMenu:not(.hidden) { display: grid !important; }
  body.ol-assistant-active #fabMenu.hidden { display: none !important; }
  body.ol-assistant-active #page-assistant:not(.hidden),
  html.cap-native body.ol-assistant-active #page-assistant:not(.hidden),
  html.cap-native body.ol-assistant-active.assistant-keyboard-open #page-assistant:not(.hidden) { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; padding-bottom: 4px !important; }
  body.ol-assistant-active #page-assistant .assistant-chat-panel,
  html.cap-native body.ol-assistant-active.assistant-keyboard-open #page-assistant .assistant-chat-panel { min-height: 0 !important; height: 100% !important; }
  body.ol-assistant-active #page-assistant .chat-composer,
  body.ol-assistant-active.assistant-keyboard-open #page-assistant .chat-composer,
  html.cap-native body.ol-assistant-active #page-assistant .chat-composer,
  html.cap-native body.ol-assistant-active.assistant-keyboard-open #page-assistant .chat-composer { padding-bottom: 6px !important; }
  html.cap-native .fab-menu { bottom: calc(76px + var(--oliver-safe-bottom)) !important; }
}

@media (min-width: 900px) {
  .account-destination-page { max-width: 1180px; margin-inline: auto; }
  .profile-card { max-width: 980px; margin-inline: auto; }
}
@media (max-width: 380px) {
  .sidebar-mobile-account { grid-template-columns: 54px minmax(0, 1fr) 10px; }
  .sidebar-mobile-avatar { width: 54px; height: 54px; }
  .sidebar-mobile-nav button { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .avatar-menu-indicator,
  .profile-avatar-trigger { transition: none !important; }
}
