/* ============================================
   GESTÃO DA EQUIPE - Estilos específicos
   ============================================ */

.list-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

body {
    background: url('../assets/images/gestao-backgroud.png') center center / cover no-repeat fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 18, 0.91);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

.list-cards {
    padding-bottom: 8px;
}

/* ====== Add Button ====== */
.list-add-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s ease;
    position: relative;
    z-index: 2;
}

.list-add-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Collapsible list (Desligados) */
.list-header-toggle {
    cursor: pointer;
    user-select: none;
}

.list-header-toggle:hover .list-collapse-arrow {
    color: var(--text-primary);
}

.list-collapse-arrow {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

/* Desligados - padding quando collapsed */
.list[data-list="desligados"].collapsed .list-header {
    padding: 17px 12px;
}

.list-collapsible.collapsed .list-collapse-arrow {
    transform: rotate(-90deg);
}

.list-collapsible.collapsed .list-cards {
    display: none;
}

/* List backgrounds */
.list[data-list="aprendiz"],
.list[data-list="suporte"],
.list[data-list="moderador"],
.list[data-list="administrador"],
.list[data-list="coordenador"],
.list[data-list="gerente"],
.list[data-list="desligados"] {
    background: var(--bg-list);
}

/* ====== List Config Modal ====== */
#listConfigOverlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-config-modal {
    width: 480px;
    max-width: 95vw;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.list-config-modal::-webkit-scrollbar { width: 5px; }
.list-config-modal::-webkit-scrollbar-track { background: transparent; }
.list-config-modal::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.list-config-modal::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.modal-overlay.active .list-config-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.list-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    flex-shrink: 0;
}

.list-config-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-config-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.list-config-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.list-config-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.list-config-section {
    margin-bottom: 20px;
}

.list-config-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.list-config-section-header h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.list-config-promote-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.list-config-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 14px 0;
    line-height: 1.5;
}

.list-config-checklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 6px;
}

.list-config-checklist::-webkit-scrollbar { width: 5px; }
.list-config-checklist::-webkit-scrollbar-track { background: transparent; }
.list-config-checklist::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.list-config-checklist::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.list-config-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.list-config-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.06);
}

.list-config-item-number {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    flex-shrink: 0;
}

.list-config-item-input {
    font-size: 0.85rem;
    color: var(--text-primary);
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
}

.list-config-item-input:focus {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.list-config-item-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.15s ease;
}

.list-config-item:hover .list-config-item-delete {
    opacity: 1;
}

.list-config-item-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.list-config-add {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.list-config-add-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
}

.list-config-add-input:focus {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.list-config-add-input::placeholder {
    color: var(--text-muted);
}

.list-config-add-btn {
    background: var(--accent-primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.list-config-add-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.list-config-empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ====== Add Member Modal ====== */
.add-member-modal {
    width: 480px;
    max-width: 95vw;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: 80px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.active .add-member-modal {
    transform: translateY(0);
    opacity: 1;
}

.add-member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.add-member-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.add-member-icon-box {
    width: 42px;
    height: 42px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 16px;
    flex-shrink: 0;
}

.add-member-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.add-member-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
    font-weight: 500;
}

.add-member-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.add-member-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.add-member-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.add-member-field-full {
    grid-column: 1 / -1;
}

.add-member-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-member-field label i {
    font-size: 0.7rem;
    color: var(--text-muted);
    width: 14px;
    text-align: center;
}

.field-required {
    color: var(--accent-danger);
    font-weight: 700;
}

.add-member-field input,
.add-member-field select,
.add-member-field input[type="date"] {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    height: 36px;
    padding: 0 10px;
    font-size: 0.8rem;
    line-height: 34px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: dark;
}

.add-member-field input:focus,
.add-member-field select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.add-member-field input::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.add-member-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.add-member-field select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.add-member-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border);
}

.add-member-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-member-cancel:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.add-member-submit {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 9px 22px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
}

.add-member-submit:hover {
    background: var(--accent-hover);
}

.add-member-body-bottom {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .add-member-row {
        grid-template-columns: 1fr;
    }
    .add-member-modal {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .list-config-modal {
        max-width: 100vw;
        max-height: 80dvh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        margin-top: auto;
    }

    .add-member-modal {
        max-width: 100vw;
        max-height: 85dvh;
        margin-top: 10dvh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        overflow-y: auto;
    }

    .add-member-body {
        max-height: none;
        overflow-y: visible;
    }

    .confirm-modal {
        max-width: 90vw;
    }
}

/* ============================================
   CONFIRM MODAL (estilo guiadastaff)
   ============================================ */

.delete-confirm-overlay {
    align-items: center;
    backdrop-filter: blur(4px);
}

.confirm-modal {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    max-width: 380px;
    width: 90%;
    text-align: center;
    padding: 32px 28px 24px;
    animation: confirmSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes confirmSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ef4444;
}

.confirm-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.confirm-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 24px;
    line-height: 1.5;
    word-break: break-word;
}

.confirm-actions {
    display: flex;
    gap: 10px;
}

.confirm-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.confirm-btn--keep {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: white;
}

.confirm-btn--keep:hover {
    background: #60A5FA;
    border-color: #60A5FA;
}

.confirm-btn--delete {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.confirm-btn--delete:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ============================================
   LEMBRETES POPUP
   ============================================ */

/* ============================================
   GESTÃO - LIGHT MODE OVERRIDES
   ============================================ */

/* --- List backgrounds (pastel) --- */
body.light-mode .list[data-list="aprendiz"] {
    background: #a2a2fd;
}
body.light-mode .list[data-list="suporte"] {
    background: #F5E989;
}
body.light-mode .list[data-list="moderador"] {
    background: #75ea70;
}
body.light-mode .list[data-list="administrador"] {
    background: #fa958e;
}
body.light-mode .list[data-list="coordenador"] {
    background: #56baba;
}
body.light-mode .list[data-list="gerente"] {
    background: #ff7167;
}
body.light-mode .list[data-list="desligados"] {
    background: #D1D5DB;
}


/* --- List config modal --- */
body.light-mode .list-config-modal {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
body.light-mode .list-config-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}
body.light-mode .list-config-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
}
body.light-mode .list-config-modal {
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}
body.light-mode .list-config-header {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
}

/* --- Checklist items --- */
body.light-mode .list-config-checklist {
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}
body.light-mode .list-config-checklist::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}
body.light-mode .list-config-checklist::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
}
body.light-mode .checklist-config-item {
    background: rgba(0, 0, 0, 0.03);
}
body.light-mode .checklist-config-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}
body.light-mode .checklist-add-btn {
    background: rgba(0, 0, 0, 0.04);
}
body.light-mode .checklist-add-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* --- Add member modal --- */
body.light-mode .add-member-modal {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}
body.light-mode .add-member-header {
    background: var(--bg-secondary);
}
body.light-mode .add-member-icon-box {
    background: rgba(0, 0, 0, 0.04);
}
body.light-mode .add-member-submit {
    color: white;
}
body.light-mode .add-member-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}
body.light-mode .add-member-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* --- Responsáveis modal --- */
body.light-mode .responsaveis-modal {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}
body.light-mode .responsavel-item {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
body.light-mode .responsavel-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* --- Topbar gestão --- */
body.light-mode .topbar-gestao {
    background: var(--bg-secondary);
}

/* --- Misc buttons with white text --- */
body.light-mode .list-config-save-btn {
    color: white;
}
body.light-mode .responsaveis-add-btn {
    color: white;
}

/* --- Confirm modal --- */
body.light-mode .confirm-modal {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}
body.light-mode .confirm-btn--keep {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
body.light-mode .confirm-btn--keep:hover {
    background: rgba(0, 0, 0, 0.1);
}
body.light-mode .confirm-btn--delete {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Add member inputs --- */
body.light-mode .add-member-modal input,
body.light-mode .add-member-modal select,
body.light-mode .add-member-modal textarea {
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
}
body.light-mode .add-member-modal input:focus,
body.light-mode .add-member-modal select:focus {
    border-color: var(--accent-primary);
}
body.light-mode .add-member-body {
    background: var(--bg-secondary);
}
body.light-mode .add-member-footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- List config inputs --- */
body.light-mode .list-config-add-input {
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
}
body.light-mode .list-config-add-input:focus {
    border-color: var(--accent-primary);
}
body.light-mode .list-config-item-number {
    background: rgba(0, 0, 0, 0.05);
}
body.light-mode .list-config-item-actions button {
    color: var(--text-muted);
}
body.light-mode .list-config-item-actions button:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
}

/* --- Responsáveis inputs in gestão --- */
body.light-mode .responsaveis-add-wrapper input {
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
}
