/* ============================================================
EarVu — Admin Sidebar
Integrado con dashboard-layout
============================================================ */

:root{
  --admin-header-offset:120px;
}


/* ============================================================
Layout columns
============================================================ */

.earvu-admin-sidebar{
    grid-column:1;

    position:sticky;
    top:var(--admin-header-offset);
    height:calc(100vh - var(--admin-header-offset));

    overflow-y:auto;
    overflow-x:hidden;

    padding-right:4px;
}

.dashboard-main{
    grid-column:2;
}

.dashboard-help{
    grid-column:3;
}


/* ============================================================
Sidebar container
============================================================ */

.earvu-sidebar{
    background:rgba(20,20,30,0.8);
    backdrop-filter:blur(10px);
    border-radius:12px;

    padding:12px 10px 80px 10px;

    display:flex;
    flex-direction:column;
}


/* ============================================================
Header
============================================================ */

.earvu-sidebar-header{
    position:sticky;
    top:0;

    background:rgba(20,20,30,0.95);

    padding-bottom:10px;
    margin-bottom:10px;

    z-index:5;
}

.earvu-sidebar-header::after{
    content:"";
    display:block;

    height:1px;
    margin-top:8px;

    background:rgba(255,255,255,0.06);
}


/* ============================================================
Dashboard link
============================================================ */

.sidebar-dashboard{
    display:block;

    text-decoration:none;
    font-weight:600;

    color:#cfe8ff;

    padding:8px 6px;
    border-radius:8px;

    transition:background .2s ease;
}

.sidebar-dashboard:hover{
    background:rgba(255,255,255,0.08);
}


/* ============================================================
EarVu spectrum divider
============================================================ */

.sidebar-spectrum{
  height:2px;
  margin:6px 4px 14px 4px;
  border-radius:2px;
  background:linear-gradient(
      90deg,
      #5aa2ff,
      #7ed6ff,
      #6fe3b2,
      #ffd36f,
      #ff9f5a
  );
  opacity:.75;
}

/* ============================================================
Section titles (STEP)
============================================================ */

.sidebar-section-title{
    font-size:0.70rem;
    opacity:0.55;

    margin:22px 0 6px 0;
    padding-left:2px;

    letter-spacing:0.08em;
    text-transform:uppercase;

    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:6px;

    cursor:pointer;
}

.sidebar-section-title::after{
    content:"▾";
    font-size:.7rem;
    opacity:.45;
    margin-left:auto;
    transition:transform .18s ease;
}

.sidebar-section-title.collapsed::after{
    transform:rotate(-90deg);
}

.sidebar-section-title .step-index{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:22px;
    height:22px;
    min-width:22px;
    margin-right:6px;
    border-radius:999px;
    font-size:0.72rem;
    font-weight:700;
    line-height:1;
    color:#f2dcc0;
    background:rgba(0,0,0,0.42);
    border:1px solid rgba(255,215,160,0.20);
    box-shadow:inset 0 0 0 1px rgba(255,235,190,0.04);
    vertical-align:middle;
}

body:not(.dark-mode) .sidebar-section-title .step-index{
    color:#805300;
    background:#fffcef;
    border-color:rgba(230,170,60,0.48);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.5);
}


/* ============================================================
Sidebar steps
============================================================ */

.sidebar-step{
    position:relative;
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 26px 8px 2px;
    margin:2px 0;
    border-radius:6px;
    font-size:0.88rem;
    line-height:1.35;
    text-decoration:none;

    color:#cfd6e6;   /* gris claro neutro */
}

.sidebar-step[data-state]{
    color:#cfd6e6;
}

.sidebar-step:hover{
    background:rgba(255,255,255,0.06);
}


/* ============================================================
Active item
============================================================ */

.sidebar-step.active{
    background:rgba(255,255,255,0.10);
    font-weight:500;
    color:#ffffff;
}

.sidebar-step.active::before{
    content:"👉";
    position:absolute;
    right:24px;
    top:50%;
    transform:translateY(-50%);
    font-size:0.9rem;
    line-height:1;
}


/* ============================================================
Card state indicator
============================================================ */

.sidebar-step::after{
    content:"";
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    width:9px;
    height:9px;
    border-radius:50%;
    background:#666;
}

.sidebar-step[data-state="ok"]::after{
    background:#4cd964;
    opacity:1;
}

.sidebar-step[data-state="pending"]::after{
    background:#ffb347;
    opacity:1;
}

.sidebar-step[data-state="progress"]::after{
    background:#5aa9ff;
    opacity:1;
}

.sidebar-step[data-state="error"]::after{
    background:#ff5a5a;
    opacity:1;
}

.sidebar-step[data-state="na"]::after{
    background:#666;
    opacity:.45;
}


/* ============================================================
Icons
============================================================ */

.sidebar-step img{
    width:16px;
    height:16px;
    flex:0 0 16px;
    object-fit:contain;
}


/* ============================================================
Collapsible groups
============================================================ */

.sidebar-toggle{
    cursor:pointer;
    user-select:none;
}

.sidebar-group{
    display:block;
    max-height:1000px;
    overflow:hidden;
    transition:max-height .28s ease, opacity .2s ease;
    padding-bottom:8px;
    margin-left: 8px;
}

.sidebar-group.collapsed{
    max-height:0;
    opacity:.2;
}


/* ============================================================
Scrollbar
============================================================ */

.earvu-admin-sidebar::-webkit-scrollbar{
    width:6px;
}

.earvu-admin-sidebar::-webkit-scrollbar-thumb{
    background:rgba(120,120,160,0.35);
    border-radius:10px;
}

.earvu-admin-sidebar::-webkit-scrollbar-track{
    background:transparent;
}


/* ============================================================
Responsive
============================================================ */

@media (max-width:1500px){

    .earvu-admin-sidebar{
        display:none;
    }

}


/* ============================================================
Sidebar wizard
============================================================ */

.sidebar-wizard-logo{
    text-align:center;
    margin:6px 0 8px 0;
    font-size:.78rem;
    line-height:1;
    color:rgba(255,215,120,.95);
    opacity:.95;
    filter:drop-shadow(0 0 6px rgba(255,208,107,.35));
    pointer-events:none;
}

.sidebar-wizard{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:6px;
    margin:0 8px 18px 8px;
}

.sidebar-wizard-step{
    display:flex;
    justify-content:center;
    align-items:center;
}

.sidebar-wizard-circle{
    width:32px;
    height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    font-size:.80rem;
    font-weight:700;
    color:#d8eaff;
    background:rgba(255,255,255,.06);
    border:2px solid rgba(255,255,255,.18);
    box-shadow:none;
    transition:border-color .2s ease, box-shadow .2s ease, opacity .2s ease, color .2s ease;
}

.sidebar-wizard-step.step-complete .sidebar-wizard-circle{
    border-color:rgba(120,255,170,1);
    box-shadow:0 0 12px rgba(120,255,170,.70);
    color:#f3fff7;
}

.sidebar-wizard-step.step-sufficient .sidebar-wizard-circle{
    border-color:rgba(116,227,255,1);
    box-shadow:0 0 12px rgba(116,227,255,.70);
    color:#f1fbff;
}

.sidebar-wizard-step.step-progress .sidebar-wizard-circle{
    border-color:rgba(255,205,120,1);
    box-shadow:0 0 12px rgba(255,205,120,.70);
    color:#fff8ea;
}

.sidebar-wizard-step.step-error .sidebar-wizard-circle{
    border-color:rgba(255,90,90,1);
    box-shadow:0 0 12px rgba(255,90,90,.65);
    color:#fff1f1;
}

.sidebar-wizard-step.step-future .sidebar-wizard-circle,
.sidebar-wizard-step.step-locked .sidebar-wizard-circle{
    opacity:.50;
    border-color:rgba(255,255,255,.22);
    box-shadow:none;
}

/* ============================================================
Wizard states
============================================================ */

.sidebar-wizard-step.step-complete .sidebar-wizard-circle{
    border-color:rgba(120,255,170,1);
    box-shadow:0 0 12px rgba(120,255,170,.70);
}

.sidebar-wizard-step.step-sufficient .sidebar-wizard-circle{
    border-color:rgba(116,227,255,1);
    box-shadow:0 0 12px rgba(116,227,255,.70);
}

.sidebar-wizard-step.step-progress .sidebar-wizard-circle{
    border-color:rgba(255,205,120,1);
    box-shadow:0 0 12px rgba(255,205,120,.70);
}

.sidebar-wizard-step.step-error .sidebar-wizard-circle{
    border-color:rgba(255,90,90,1);
    box-shadow:0 0 12px rgba(255,90,90,.65);
}

.sidebar-wizard-step.step-future .sidebar-wizard-circle,
.sidebar-wizard-step.step-locked .sidebar-wizard-circle{
    opacity:.50;
    border-color:rgba(255,255,255,.22);
    box-shadow:none;
}


/* ============================================================
Dashboard title
============================================================ */

.sidebar-dashboard-title{
    white-space:nowrap;
}


/* ============================================================
Sidebar legend
============================================================ */

.sidebar-legend{
    margin-top:12px;
    padding-top:10px;
    border-top:1px solid rgba(255,255,255,0.08);
}

.sidebar-legend .dashboard-legend{
    display:flex;
    flex-direction:column;
    gap:4px;
    font-size:0.72rem;
    color:#9aa4b6;
}

.sidebar-legend-hint{
    margin-top:6px;
    font-size:0.70rem;
    color:#7f8899;
}

.sidebar-legend .legend-dot{
    display:inline-block;
    width:8px;
    height:8px;
    border-radius:50%;
    margin-right:6px;
}

.sidebar-legend .status-ok{
    background:#4cd964;
}

.sidebar-legend .status-warn{
    background:#ffb347;
}

.sidebar-legend .status-info{
    background:#5aa9ff;
}

.sidebar-legend .status-error{
    background:#ff5a5a;
}

.sidebar-legend .status-empty{
    background:#666;
}
