/* Sistema RH · Desktop Shell 1.0 */
@media (max-width:860px){
  .desktop-sidebar{display:none !important;}
}

@media (min-width:861px){
  .desktop-sidebar{display:flex !important;}

  [data-desktop-notifications].abierto > [data-desktop-notifications-toggle]{
    background:var(--shell-control-active);
    color:var(--color-primario,var(--primario));
  }

  [data-desktop-account].abierto > [data-desktop-account-toggle]{
    background:var(--shell-control-active);
  }

  [data-desktop-notifications] > [data-desktop-notifications-toggle][data-notification-state="unread"]{
    color:var(--text-main);
  }
}


/* ============================================================
   v2.7.35 · Desktop Floating Create Hub
   Desktop presentation of the shared QuickActionService registry.
   ============================================================ */
@media(min-width:861px){
  .main > .content{
    padding-bottom:max(94px,var(--surface-stack-gap,20px));
  }

  .desktop-create-hub{
    position:fixed;
    right:22px;
    bottom:22px;
    z-index:1180;
    display:grid;
    justify-items:end;
    pointer-events:none;
  }

  .desktop-create-fab{
    pointer-events:auto;
    appearance:none;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:0;
    width:50px;
    height:50px;
    min-width:50px;
    padding:0;
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--color-primario) 20%,transparent);
    border-radius:18px;
    background:var(--color-primario);
    color:#fff;
    box-shadow:0 12px 30px color-mix(in srgb,var(--color-primario) 22%,transparent);
    cursor:pointer;
    transition:
      width 170ms cubic-bezier(.2,.8,.2,1),
      transform 160ms ease,
      box-shadow 160ms ease,
      border-radius 170ms ease;
  }
  .desktop-create-fab:hover,
  .desktop-create-fab:focus-visible,
  .desktop-create-hub.is-open .desktop-create-fab{
    width:104px;
    border-radius:var(--radius-lg);
    box-shadow:0 14px 34px color-mix(in srgb,var(--color-primario) 28%,transparent);
  }
  .desktop-create-fab:hover{
    transform:translateY(-1px);
  }
  .desktop-create-fab:focus-visible{
    outline:0;
    box-shadow:
      0 0 0 3px var(--focus-ring),
      0 14px 34px color-mix(in srgb,var(--color-primario) 28%,transparent);
  }
  .desktop-create-fab-icon{
    width:20px;
    height:20px;
    flex:0 0 20px;
    display:grid;
    place-items:center;
    transition:transform 170ms cubic-bezier(.2,.8,.2,1);
  }
  .desktop-create-hub.is-open .desktop-create-fab-icon{
    transform:rotate(45deg);
  }
  .desktop-create-fab-label{
    max-width:0;
    opacity:0;
    overflow:hidden;
    white-space:nowrap;
    font-size:var(--type-button,.8125rem);
    font-weight:500;
    transition:
      max-width 170ms cubic-bezier(.2,.8,.2,1),
      opacity 120ms ease,
      margin-left 170ms cubic-bezier(.2,.8,.2,1);
  }
  .desktop-create-fab:hover .desktop-create-fab-label,
  .desktop-create-fab:focus-visible .desktop-create-fab-label,
  .desktop-create-hub.is-open .desktop-create-fab-label{
    max-width:52px;
    margin-left:7px;
    opacity:1;
  }

  .desktop-create-popover{
    pointer-events:auto;
    position:absolute;
    right:0;
    bottom:62px;
    width:min(340px,calc(100vw - 44px));
    max-height:min(620px,calc(100vh - 112px));
    padding:10px;
    overflow:auto;
    overscroll-behavior:contain;
    border:1px solid var(--glass-border);
    border-radius:22px;
    background:color-mix(in srgb,var(--surface-overlay) 92%,transparent);
    -webkit-backdrop-filter:blur(24px) saturate(145%);
    backdrop-filter:blur(24px) saturate(145%);
    box-shadow:0 22px 64px color-mix(in srgb,var(--text-main) 15%,transparent);
    transform-origin:bottom right;
    animation:desktop-create-in 170ms cubic-bezier(.2,.8,.2,1) both;
  }
  .desktop-create-popover[hidden]{
    display:none !important;
  }

  @keyframes desktop-create-in{
    from{opacity:0;transform:translateY(8px) scale(.985);}
    to{opacity:1;transform:translateY(0) scale(1);}
  }

  .desktop-create-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    padding:6px 6px 9px;
  }
  .desktop-create-head h2{
    margin:2px 0 0;
    color:var(--text-main);
    font-size:.95rem;
    line-height:1.25;
  }
  .desktop-create-close{
    appearance:none;
    width:34px;
    height:34px;
    flex:0 0 34px;
    display:grid;
    place-items:center;
    padding:0;
    border:0;
    border-radius:10px;
    background:transparent;
    color:var(--text-muted);
    cursor:pointer;
  }
  .desktop-create-close:hover{
    background:var(--interactive-hover);
    color:var(--text-main);
  }
  .desktop-create-close:focus-visible{
    outline:0;
    box-shadow:0 0 0 3px var(--focus-ring);
  }

  .desktop-create-actions{
    display:grid;
    gap:4px;
  }
  .desktop-create-action{
    appearance:none;
    width:100%;
    min-height:58px;
    display:grid;
    grid-template-columns:36px minmax(0,1fr) 16px;
    align-items:center;
    gap:9px;
    padding:8px;
    border:1px solid transparent;
    border-radius:13px;
    background:transparent;
    color:var(--text-main);
    font:inherit;
    text-align:left;
    text-decoration:none;
    cursor:pointer;
    transition:
      background-color 140ms ease,
      border-color 140ms ease,
      transform 140ms ease;
  }
  .desktop-create-action:hover{
    background:color-mix(in srgb,var(--surface-card) 72%,transparent);
    border-color:var(--glass-border);
    text-decoration:none;
    transform:translateX(-1px);
  }
  .desktop-create-action:focus-visible{
    outline:0;
    background:color-mix(in srgb,var(--surface-card) 72%,transparent);
    box-shadow:0 0 0 3px var(--focus-ring);
  }
  .desktop-create-action > svg:last-child{
    color:var(--text-subtle);
  }
  .desktop-create-action-icon{
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border:1px solid var(--border-subtle);
    border-radius:11px;
    background:var(--surface-subtle);
    color:var(--text-muted);
  }
  .desktop-create-action-copy{
    min-width:0;
    display:grid;
    gap:2px;
  }
  .desktop-create-action-copy strong{
    display:flex;
    align-items:center;
    gap:6px;
    min-width:0;
    color:var(--text-main);
    font-size:var(--type-label);
    font-weight:500;
  }
  .desktop-create-action-copy small{
    overflow:hidden;
    color:var(--text-muted);
    font-size:var(--type-caption);
    line-height:1.3;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .desktop-create-badge{
    min-width:18px;
    height:18px;
    display:inline-grid;
    place-items:center;
    padding:0 5px;
    border-radius:var(--radius-pill);
    background:var(--semantic-danger);
    color:#fff;
    font-size:.62rem;
    line-height:1;
  }

  .desktop-create-more{
    margin-top:6px;
    padding-top:6px;
    border-top:1px solid var(--glass-border);
  }
  .desktop-create-more > summary{
    min-height:36px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:0 8px;
    list-style:none;
    border-radius:10px;
    color:var(--text-muted);
    font-size:var(--type-caption);
    font-weight:500;
    cursor:pointer;
  }
  .desktop-create-more > summary::-webkit-details-marker{display:none;}
  .desktop-create-more > summary:hover{
    background:var(--interactive-hover);
    color:var(--text-main);
  }
  .desktop-create-more > summary span{
    min-width:22px;
    height:22px;
    display:grid;
    place-items:center;
    border-radius:var(--radius-pill);
    background:var(--surface-subtle);
    font-size:.65rem;
  }
  .desktop-create-more-list{
    display:grid;
    gap:2px;
    padding-top:3px;
  }
  .desktop-create-more-list > :is(a,button){
    appearance:none;
    min-height:40px;
    display:flex;
    align-items:center;
    gap:9px;
    padding:7px 8px;
    border:0;
    border-radius:10px;
    background:transparent;
    color:var(--text-main);
    font:inherit;
    font-size:var(--type-caption);
    text-decoration:none;
    cursor:pointer;
  }
  .desktop-create-more-list > :is(a,button):hover{
    background:var(--interactive-hover);
    text-decoration:none;
  }
  .desktop-create-more-list > :is(a,button):focus-visible{
    outline:0;
    box-shadow:0 0 0 3px var(--focus-ring);
  }

  html[data-theme="dark"] .desktop-create-popover{
    background:color-mix(in srgb,var(--surface-overlay) 90%,transparent);
  }
}

@media(max-width:860px){
  .desktop-create-hub{
    display:none !important;
  }
}

@media(prefers-reduced-motion:reduce){
  .desktop-create-fab,
  .desktop-create-fab-icon,
  .desktop-create-fab-label,
  .desktop-create-action{
    transition:none !important;
  }
  .desktop-create-popover{
    animation:none !important;
  }
}


/* ============================================================
   v2.7.48 · Desktop Brand State Machine
   Shell-specific final authority. No generic brand selectors.
   ============================================================ */
@media (min-width:861px){
  .desktop-sidebar .sidebar-logo{
    min-height:58px;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    padding:0 8px 14px !important;
    overflow:visible !important;
  }

  /* Expanded · Light theme */
  .app-shell:not(.sidebar-compacto) .desktop-sidebar .sidebar-brand-wordmark--light{
    display:block !important;
  }
  .app-shell:not(.sidebar-compacto) .desktop-sidebar .sidebar-brand-wordmark--dark{
    display:none !important;
  }
  .app-shell:not(.sidebar-compacto) .desktop-sidebar .sidebar-brand-compact{
    display:none !important;
  }

  /* Expanded · Dark theme */
  html[data-theme="dark"] .app-shell:not(.sidebar-compacto) .desktop-sidebar .sidebar-brand-wordmark--light{
    display:none !important;
  }
  html[data-theme="dark"] .app-shell:not(.sidebar-compacto) .desktop-sidebar .sidebar-brand-wordmark--dark{
    display:block !important;
  }

  /* Expanded wordmark geometry */
  .app-shell:not(.sidebar-compacto) .desktop-sidebar .sidebar-brand-wordmark{
    width:128px !important;
    height:46px !important;
    max-width:128px !important;
    max-height:46px !important;
    min-width:128px !important;
    margin:0 !important;
    object-fit:contain !important;
    object-position:left center !important;
    flex:0 0 128px !important;
    filter:none !important;
  }

  /* Collapsed · only compact asset, regardless of theme */
  .app-shell.sidebar-compacto .desktop-sidebar .sidebar-brand-wordmark{
    display:none !important;
  }
  .app-shell.sidebar-compacto .desktop-sidebar .sidebar-brand-compact{
    display:block !important;
    width:42px !important;
    height:42px !important;
    max-width:42px !important;
    max-height:42px !important;
    min-width:42px !important;
    margin:auto !important;
    object-fit:contain !important;
    object-position:center !important;
    filter:none !important;
  }
}
