﻿/* ═══════════════════════════════════════
   Módulo: Perfil Seguranca
   ═══════════════════════════════════════ */

.seg-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 16px 64px;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
}

/* ── Cabeçalhos ── */
.seg-header {
    margin-bottom: 32px;
}

.seg-titulo {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.seg-subtitulo {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.seg-section-title {
    margin-bottom: 16px;
}

    .seg-section-title h3 {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
        margin: 0 0 4px 0;
    }

    .seg-section-title p {
        font-size: 13px;
        color: #6b7280;
        margin: 0;
    }

.seg-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
}

/* ── Container Principal (Card Gigante) ── */
.seg-card-main {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    padding: 24px;
    margin-bottom: 32px;
}

    .seg-card-main .seg-section-title {
        margin-bottom: 24px;
    }

.seg-subsection-title {
    margin-top: 24px;
    margin-bottom: 12px;
}

    .seg-subsection-title h4 {
        font-size: 13px;
        font-weight: 500;
        color: #4b5563;
        margin: 0;
    }

/* ── Cards e Caixas Internas ── */
.seg-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.seg-inner-box {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    overflow: visible; 
}

    .seg-inner-box .seg-list-item:first-child {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .seg-inner-box .seg-list-item:last-child {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }

/* 2FA Card Especial */
.seg-card-2fa {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seg-2fa-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seg-2fa-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.seg-2fa-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}

/* Divisores */
.seg-divider-main {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 32px 0;
}

/* Listas Gerais */
.seg-list-card {
    display: flex;
    flex-direction: column;
}

.seg-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f3f4f6;
}

    .seg-list-item:last-child {
        border-bottom: none;
    }

/* Item Destacado (Principal) */
.seg-item-primary {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin: -1px -1px 0 -1px; /* Sobrepõe a borda natural */
}

/* ── Elementos da Lista ── */
.seg-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

    .seg-item-left.align-start {
        align-items: flex-start;
    }

.seg-icon-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seg-main-icon {
    font-size: 18px;
    color: #374151;
}

.seg-brand-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.seg-device-icon {
    font-size: 18px;
    color: #6b7280;
    margin-top: 2px;
}

.seg-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seg-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seg-item-desc {
    font-size: 13px;
    color: #6b7280;
}

/* Badges */
.seg-badge-primary {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    background-color: #111827; /* Alterado de azul para preto */
    padding: 2px 8px;
    border-radius: 12px;
}

.seg-badge-connected {
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
    background-color: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Status do Dispositivo */
.seg-device-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* Cores Utilitárias */
.text-green {
    color: #10b981;
}

.text-red {
    color: #ef4444 !important;
}

.text-yellow {
    color: #f59e0b;
}

.text-gray {
    color: #9ca3af;
}

.text-blue {
    color: #0ea5e9;
}

/* ── Ações e Botões ── */
.seg-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.seg-btn-outline-danger-solid {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

    .seg-btn-outline-danger-solid:hover {
        background: #fef2f2;
    }

.seg-btn-dots {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
}

    .seg-btn-dots:hover {
        background: #f3f4f6;
        color: #374151;
    }

.seg-show-more {
    text-align: center;
    padding: 16px;
}

.seg-btn-text {
    background: none;
    border: none;
    color: #0ea5e9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .seg-btn-text:hover {
        text-decoration: underline;
    }

/* ── Menu Suspenso (Dropdown) ── */
.seg-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 40;
    background: transparent;
}

.seg-dropdown-menu {
    position: absolute;
    right: 30px;
    top: 30px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    min-width: 160px; /* Aumentado um pouquinho para o texto caber bem */
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

    .seg-dropdown-menu button {
        background: none;
        border: none;
        padding: 10px 16px;
        text-align: left;
        font-size: 13px;
        color: #374151;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .seg-dropdown-menu button:hover {
            background: #f9fafb;
        }

/* ── Toggle Switch (Interruptor) ── */
.seg-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

    .seg-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.seg-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 24px;
}

    .seg-slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

.seg-toggle input:checked + .seg-slider {
    background-color: #111827; 
}

    .seg-toggle input:checked + .seg-slider:before {
        transform: translateX(20px);
    }

/* ── Responsivo Geral ── */
@media (max-width: 600px) {
    .seg-section-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .seg-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .seg-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
