/* ============================================================
   HelpDesk - VAN Area CSS
   Estilos específicos da área da VAN
   ============================================================ */

/* ---- Hierarquia pai/filho na lista de chamados ---- */

#hd-app .hd-apelido-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

#hd-app .hd-expand-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--hd-border);
    background: var(--hd-white);
    color: var(--hd-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    padding: 0;
}

#hd-app .hd-expand-btn:hover {
    background: var(--hd-primary);
    color: var(--hd-dark);
    border-color: var(--hd-primary);
}

#hd-app .hd-expand-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

#hd-app .hd-expand-btn.expanded {
    background: var(--hd-dark);
    color: var(--hd-primary);
    border-color: var(--hd-dark);
}

#hd-app .hd-children-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    background: var(--hd-primary);
    color: var(--hd-dark);
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--hd-radius-full);
    padding: 0 3px;
}

/* Row filho expandido */
#hd-app .hd-tr-children {
    background: var(--hd-surface);
}

#hd-app .hd-children-cell {
    padding: 0 !important;
    border-bottom: 2px solid var(--hd-primary) !important;
}

#hd-app .hd-children-table {
    width: 100%;
}

#hd-app .hd-children-table td {
    padding: 8px 12px;
    font-size: 12px;
    border-bottom: 1px solid var(--hd-border);
    background: #fffdf0;
}

#hd-app .hd-children-table tr:last-child td {
    border-bottom: none;
}

#hd-app .hd-child-apelido {
    font-weight: 600;
    color: var(--hd-dark);
    display: flex;
    align-items: center;
    gap: 4px;
}

#hd-app .hd-child-indicator {
    color: var(--hd-primary);
}

/* Indicador CXA */
#hd-app .hd-cxa-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

#hd-app .hd-cxa-dot.on  { background: var(--hd-success); box-shadow: 0 0 0 2px var(--hd-success-light); }
#hd-app .hd-cxa-dot.off { background: var(--hd-border); }

/* ---- Edição de chamado (VAN) ---- */

#hd-app .hd-chamado-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

#hd-app .hd-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#hd-app .hd-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#hd-app .hd-info-item.full {
    grid-column: 1 / -1;
}

#hd-app .hd-info-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--hd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

#hd-app .hd-info-value {
    font-size: 13px;
    color: var(--hd-dark);
    font-weight: 500;
}

/* ---- Autorizadores ---- */

#hd-app .hd-autorizador-row {
    background: var(--hd-surface);
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius);
    padding: 14px;
    margin-bottom: 10px;
    position: relative;
}

#hd-app .hd-autorizador-row .hd-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: var(--hd-radius-sm);
    border: 1px solid var(--hd-border);
    background: var(--hd-white);
    color: var(--hd-danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

#hd-app .hd-autorizador-row .hd-remove-btn:hover {
    background: var(--hd-danger-light);
    border-color: var(--hd-danger);
}

#hd-app .hd-add-autorizador-btn {
    width: 100%;
    border: 2px dashed var(--hd-border);
    background: none;
    border-radius: var(--hd-radius);
    padding: 10px;
    cursor: pointer;
    color: var(--hd-text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

#hd-app .hd-add-autorizador-btn:hover {
    border-color: var(--hd-primary);
    color: var(--hd-dark);
    background: rgba(252, 221, 69, 0.05);
}

/* ---- Status autorizador ---- */

#hd-app .hd-aut-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--hd-radius-full);
    font-size: 11px;
    font-weight: 600;
}

/* ---- Import modal ---- */

#hd-app .hd-import-info {
    background: var(--hd-surface);
    border-radius: var(--hd-radius-sm);
    padding: 12px;
    font-size: 12px;
    color: var(--hd-text-muted);
    margin-top: 12px;
}

#hd-app .hd-import-info p {
    font-weight: 600;
    color: var(--hd-text);
    margin-bottom: 6px;
}

#hd-app .hd-import-info li {
    padding: 2px 0 2px 12px;
    position: relative;
}

#hd-app .hd-import-info li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--hd-primary);
}

/* ---- Vinculados no chamado pai ---- */

#hd-app .hd-vinculado-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--hd-surface);
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius-sm);
    margin-bottom: 8px;
}

#hd-app .hd-vinculado-apelido {
    font-weight: 700;
    color: var(--hd-dark);
    font-size: 13px;
}

#hd-app .hd-vinculado-razao {
    font-size: 11.5px;
    color: var(--hd-text-muted);
}

#hd-app .hd-vinculado-req {
    font-size: 11px;
    color: var(--hd-text-light);
}
