@import url("/assets/design-system.css?v=20260814-design-system-v1");

/* Navegação premium em dois níveis: categorias identificadas + painel contextual. */
@media (min-width: 841px) {
  .sidebar {
    width: 390px;
    padding: 0;
    overflow: visible;
    background: var(--surface);
  }

  .brand {
    position: absolute;
    z-index: 5;
    top: 17px;
    left: 17px;
    justify-content: flex-start;
    width: 350px;
    padding: 0;
  }
  .brand > span:not(.brand-mark) {
    position: absolute;
    left: 233px;
    display: block;
    min-width: 138px;
    transform: translateX(-50%);
    font-size: 13px;
  }
  .brand-mark { width: 44px; height: 44px; border-radius: 14px; }

  .sidebar nav.accordion-nav {
    position: absolute;
    top: 98px;
    /* Todos os atalhos ficam dentro da rolagem natural da navegação. */
    bottom: 16px;
    left: 0;
    display: block;
    width: 110px;
    padding: 0 12px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .nav-overview { margin: 0; }
  .nav-overview .nav-label { display: none; }
  .nav-overview > a,
  .nav-group-toggle,
  .nav-quick-help {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 29px auto;
    justify-items: center !important;
    align-items: center !important;
    justify-content: center !important;
    width: 86px;
    min-width: 86px;
    min-height: 67px;
    margin: 0 0 5px;
    padding: 7px 3px 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(145deg,var(--surface-2),var(--surface));
    box-shadow: none;
    color: var(--muted);
    text-align: center;
  }
  .nav-overview > a::after,
  .nav-group-toggle::after,
  .nav-quick-help::after {
    content: attr(data-short-label);
    max-width: 82px;
    overflow: visible;
    color: currentColor;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .025em;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
    justify-self: center !important;
    align-self: center !important;
    width: 100%;
  }
  .nav-overview > a > span:not(.nav-rail-icon),
  .nav-overview > a > i,
  .nav-group-toggle > span:not(.nav-rail-icon),
  .nav-quick-help > span:not(.nav-rail-icon) { display: none; }
  .nav-overview + .nav-group { margin-top: 18px; }
  .nav-group { margin: 0; }
  .nav-section-break { margin-top: 18px; }
  .nav-group:has(a[href="/account.php"]),
  .nav-quick-help {
    position: static;
    z-index: auto;
    bottom: auto;
    left: auto;
    margin: 0 0 5px !important;
  }
  .nav-quick-help { text-decoration:none; }
  .nav-rail-icon { display:grid !important; width:25px; height:25px; place-items:center; justify-self:center !important; align-self:center !important; margin:0 !important; }
  .nav-rail-icon svg { width:25px; height:25px; stroke:currentColor; }

  .nav-overview > a:hover,
  .nav-group-toggle:hover,
  .nav-quick-help:hover {
    background: var(--blue-soft);
    color: var(--blue-bright);
    filter: none;
    transform: none;
  }
  .nav-overview > a.active,
  .nav-group-toggle[aria-expanded="true"],
  .nav-quick-help.active {
    border-color: #198eff55;
    background: linear-gradient(145deg, #087cff33, #087cff12);
    box-shadow: inset 0 0 0 1px #158fff22,0 8px 20px #001b421f;
    color: var(--blue-bright);
  }
  .nav-overview > a.active .nav-rail-icon svg { stroke-width: 2.25; }

  .nav-group-panel,
  .nav-group-panel.open {
    position: fixed;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 110px;
    display: none;
    grid-template-rows: none;
    width: 280px;
    padding: 100px 14px 222px;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg,var(--surface-2),var(--surface));
    box-shadow: 17px 0 34px #00000012;
    opacity: 1;
    scrollbar-width: thin;
  }
  .nav-group-panel.open { display: block; }
  .nav-group-panel > div,
  .nav-group-panel.open > div { overflow: visible; padding: 0; }
  .nav-group-panel::before {
    content: attr(data-nav-label);
    display: block;
    margin: 0 10px 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--white);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .08em;
  }
  .nav-group-panel a {
    min-height: 46px;
    margin: 3px 0;
    border-radius: 10px;
    padding: 10px 11px;
  }
  .nav-group-panel a i { width: 19px; }
  .nav-subcategory-label { margin: 18px 11px 6px; }
  .nav-coming-soon { margin: 8px 11px 13px; }

  .sidebar-fixed-area { position:absolute; z-index:5; bottom:142px; left:13px; width:364px; margin:0; padding:0; }
  .sidebar-fixed-link { display:flex; width:100%; height:48px; justify-content:flex-start; padding:11px 13px; border:1px solid var(--line); background:linear-gradient(145deg,var(--surface-2),var(--surface)); }
  .sidebar-fixed-link span { display:block; }
  .sidebar-fixed-link i { width:19px; font-size:18px; }
  .ticket-badge { position:static; margin-left:auto; }

  #theme-toggle { position:absolute; z-index:5; bottom:86px; left:13px; display:flex; width:364px; height:48px; justify-content:flex-start; margin:0; padding:10px 13px; border:1px solid var(--line); background:linear-gradient(145deg,var(--surface-2),var(--surface)); box-shadow:none; }
  #theme-toggle:hover { background:var(--blue-soft); }
  .theme-toggle-label,.theme-toggle-switch { display:block; }
  .theme-toggle-icon { width:19px; font-size:19px; }

  .logout { position:absolute; z-index:5; bottom:12px; left:13px; display:flex; width:364px; justify-content:flex-start; margin:0; padding:11px 13px 0; border-top:1px solid var(--line); }
  .logout .avatar { width:42px; height:42px; }
  .logout .account a { display:block; }
  .logout .account button { position:static; display:block; width:auto; height:auto; margin:2px 0 0; padding:0; border:0; border-radius:0; background:none; color:#7f8998; font-size:12px; }
  .logout .account button::after { content:none; }
  .account a small { display:block; overflow:hidden; max-width:240px; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }

  .app-main { margin-left:390px; }
}

@media (min-width: 841px) {
  .panel-topbar #theme-toggle.topbar-theme-control {
    flex: 0 0 194px !important;
    width: 194px !important;
    min-width: 194px !important;
    overflow: visible !important;
  }
  .panel-topbar #theme-toggle.topbar-theme-control .theme-toggle-label {
    min-width: 88px;
  }
  .panel-topbar #theme-toggle.topbar-theme-control .theme-toggle-switch {
    flex: 0 0 42px;
    width: 42px !important;
    height: 24px !important;
    margin-left: auto !important;
    background: #8055ef !important;
  }
  @media (max-width: 1210px) {
    .panel-topbar #theme-toggle.topbar-theme-control { flex-basis: 184px !important; width: 184px !important; min-width: 184px !important; }
  }
}

@media (max-width: 840px) {
  .sidebar nav.accordion-nav { display:block; max-height:62vh; overflow-y:auto; overscroll-behavior:contain; }
  .sidebar nav.accordion-nav .nav-label { display:block; }
}

/* Barra superior e painel contextual recolhível (desktop). */
@media (min-width: 841px) {
  .sidebar { width:110px; transition:width .22s ease; }
  .brand { left:29px; width:44px; }
  .brand > span:not(.brand-mark) { display:none; }
  .sidebar nav.accordion-nav { bottom:16px; }
  .sidebar-fixed-area,.sidebar > .logout { display:none!important; }
  .app-main { margin-left:110px; padding-top:126px; transition:margin-left .22s ease; }
  body:has(.nav-group-panel.open) .app-main { margin-left:390px; }
  .panel-topbar { position:fixed; z-index:20; top:0; right:0; left:110px; height:80px; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:0 28px; border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--surface-2) 93%,transparent); backdrop-filter:blur(14px); transition:left .22s ease; }
  body:has(.nav-group-panel.open) .panel-topbar { left:390px; }
  .panel-topbar-brand { color:var(--white); font-size:12px; font-weight:900; letter-spacing:.12em; line-height:1.15; }
  .panel-topbar-brand b { display:block; color:var(--blue-bright); }
  .panel-topbar-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
  .topbar-action,.topbar-mentorship,.topbar-news,.topbar-suggestion,.topbar-icon-action,.topbar-profile-toggle { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; border:1px solid var(--line); border-radius:999px; background:transparent; box-shadow:none; color:var(--text); font:750 13px "Segoe UI Variable","Segoe UI",sans-serif; text-decoration:none; }
  .topbar-action,.topbar-mentorship,.topbar-news,.topbar-suggestion { padding:0 15px; }.topbar-upgrade { border:0; }.topbar-mentorship { border-color:#e48b3188; background:linear-gradient(135deg,#b454171f,#e48b3129); color:#ffd2a2; }.topbar-mentorship:hover{background:#e48b313b;color:#fff1df}.topbar-mentorship.is-pulsing{animation:topbar-mentorship-pulse 1.15s ease-in-out 2}.topbar-news { border-color:#258cff66; color:#b5dbff; animation:topbar-news-pulse 1s ease-in-out 3; }.topbar-suggestion { border-color:#28b98988; background:#1ca87818; color:#a6f0d1; }.topbar-suggestion:hover{background:#1ca8782c;color:#e5fff3}.topbar-icon-action { width:42px; color:var(--muted); font-size:17px; }.topbar-icon-action i{font-style:normal}.topbar-icon-action>span{display:none}.topbar-icon-action .ticket-badge{position:absolute;top:-5px;right:-5px;margin:0}.topbar-profile-toggle { width:46px; padding:0; overflow:hidden; }.topbar-profile-toggle .avatar { width:42px; height:42px; }.panel-topbar #theme-toggle,.panel-topbar #theme-toggle.topbar-theme-control { position:static!important; display:inline-flex!important; flex:0 0 158px!important; width:158px!important; min-width:158px!important; height:42px!important; margin:0!important; padding:0 11px!important; border-radius:999px!important; background:var(--surface)!important; border:1px solid var(--line)!important; box-shadow:none!important; }.panel-topbar #theme-toggle .theme-toggle-label,.panel-topbar #theme-toggle .theme-toggle-switch { display:block!important; flex-shrink:0!important; }.panel-topbar #theme-toggle .theme-toggle-label{font-size:12px!important;font-weight:800!important}.panel-topbar #theme-toggle .theme-toggle-switch{width:42px!important;height:24px!important;margin-left:auto!important;background:#8055ef!important}.panel-topbar #theme-toggle .theme-toggle-switch>span{display:block!important}.panel-topbar #theme-toggle .theme-toggle-icon { width:auto!important; font-size:17px!important; flex-shrink:0!important; }@keyframes topbar-news-pulse{50%{box-shadow:0 0 0 6px #168fff22;color:#fff}}@keyframes topbar-mentorship-pulse{50%{transform:translateY(-1px) scale(1.035);box-shadow:0 0 0 7px #e48b3124,0 10px 26px #e48b3126}}
  .topbar-profile-wrap { position:relative; }.topbar-profile-menu { position:absolute; top:54px; right:0; width:310px; padding:14px; border:1px solid #394354; border-radius:14px; background:var(--surface-2); box-shadow:0 22px 55px #0009; }.topbar-profile-summary { display:flex; align-items:center; gap:10px; padding:5px 5px 13px; border-bottom:1px solid var(--line); }.topbar-profile-avatar { display:grid; place-items:center; width:40px; height:40px; overflow:hidden; border-radius:50%; background:#44317d; color:#d8c9ff; font-weight:900; }.topbar-profile-avatar img { width:100%; height:100%; object-fit:cover; }.topbar-profile-summary strong,.topbar-profile-summary small,.topbar-profile-summary em { display:block; }.topbar-profile-summary small { max-width:210px; overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }.topbar-profile-summary em { color:#79baff; font-size:10px; font-style:normal; }.topbar-profile-menu nav { display:grid; margin:8px 0; }.topbar-profile-menu nav a,.topbar-profile-menu form button { display:block; width:100%; padding:10px 9px; border:0; border-radius:8px; background:none; color:var(--text); font:650 13px "Segoe UI Variable","Segoe UI",sans-serif; text-align:left; text-decoration:none; box-shadow:none; }.topbar-profile-menu nav a:hover,.topbar-profile-menu form button:hover { background:var(--blue-soft); color:var(--blue-bright); transform:none; filter:none; }.topbar-profile-menu form { margin:8px 0 0; padding-top:8px; border-top:1px solid var(--line); }
  [data-tooltip]::after { position:absolute; z-index:30; right:0; top:calc(100% + 8px); display:none; width:max-content; max-width:220px; padding:8px 10px; border:1px solid #424c5c; border-radius:8px; background:#11141a; color:#edf2fa; box-shadow:0 10px 28px #0008; content:attr(data-tooltip); font:600 11px "Segoe UI Variable","Segoe UI",sans-serif; line-height:1.35; white-space:normal; }[data-tooltip]:hover::after,[data-tooltip]:focus-visible::after { display:block; }
  @media(max-width:1210px){.topbar-upgrade{display:none}.panel-topbar{padding:0 18px}.panel-topbar-actions{gap:7px}.panel-topbar #theme-toggle,.panel-topbar #theme-toggle.topbar-theme-control{flex-basis:142px!important;width:142px!important;min-width:142px!important}.topbar-action,.topbar-mentorship,.topbar-news,.topbar-suggestion{padding:0 11px}}
  @media(max-width:1030px){.topbar-mentorship span,.topbar-news span,.topbar-suggestion span{display:none}.topbar-mentorship,.topbar-news,.topbar-suggestion{width:42px;padding:0}.panel-topbar #theme-toggle,.panel-topbar #theme-toggle.topbar-theme-control{flex-basis:136px!important;width:136px!important;min-width:136px!important}}
}

@media (min-width: 841px) {
  .panel-topbar #theme-toggle.topbar-theme-control { flex: 0 0 194px !important; width: 194px !important; min-width: 194px !important; overflow: visible !important; }
  .panel-topbar #theme-toggle.topbar-theme-control .theme-toggle-label { min-width: 88px; }
  .panel-topbar #theme-toggle.topbar-theme-control .theme-toggle-switch { flex: 0 0 42px; width: 42px !important; height: 24px !important; margin-left: auto !important; background: #8055ef !important; }
  @media (max-width: 1210px) { .panel-topbar #theme-toggle.topbar-theme-control { flex-basis: 184px !important; width: 184px !important; min-width: 184px !important; } }
}

@media (min-width: 841px) {
  .panel-topbar { justify-content: flex-start; }
  .panel-topbar-primary { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
  .panel-topbar-actions { margin-left: auto; }
  .topbar-partners { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid #8e66e8; border-radius: 999px; background: #5c3bb52a; color: #d9c9ff; font: inherit; font-weight: 800; white-space: nowrap; cursor: pointer; transition: .18s ease; }
  .topbar-partners:hover { border-color: #af8aff; background: #6946c83d; color: #fff; }
}
@media (min-width: 841px) and (max-width: 1210px) { .panel-topbar-primary .topbar-upgrade { display:inline-flex; padding:0 11px; } .topbar-partners { padding: 0 11px; } }
@media (min-width: 841px) and (max-width: 1030px) { .panel-topbar-primary .topbar-upgrade { width:42px; padding:0; } .panel-topbar-primary .topbar-upgrade span { display:none; } .topbar-partners { width: 42px; padding: 0; } .topbar-partners span { display: none; } }
