/* ========================================================================
   ADMIN USERS - ESTILOS ESPECÍFICOS
   ======================================================================== */

.admin-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================================================
   BARRA DE AÇÕES
   ======================================================================== */

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ========================================================================
   SUMMARY CARDS
   ======================================================================== */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card.success {
    border-color: #10b981;
}

.summary-card.warning {
    border-color: #f59e0b;
}

.summary-card.admin {
    border-color: #6366f1;
}

.summary-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--hover-bg);
    border-radius: 10px;
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

/* ========================================================================
   TABELA DE USUÁRIOS
   ======================================================================== */

.users-table-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid var(--border-color);
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 5px 0;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: var(--hover-bg);
    border-radius: 8px;
}

.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.users-table tbody tr:hover {
    background: var(--hover-bg);
}

.users-table tbody tr:last-child {
    border-bottom: none;
}

.users-table td {
    padding: 15px;
    font-size: 14px;
    color: var(--text-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.role-badge.admin {
    background: #ddd6fe;
    color: #5b21b6;
}

.role-badge.user {
    background: #dbeafe;
    color: #1e40af;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-edit {
    background: #dbeafe;
    color: #1e40af;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-delete:hover {
    background: #fecaca;
}

.btn-toggle {
    background: #fef3c7;
    color: #92400e;
}

.btn-toggle:hover {
    background: #fde68a;
}

/* ========================================================================
   MODAL
   ======================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-small {
    max-width: 500px;
}

.modal-header {
    padding: 25px;
    border-bottom: 2px solid var(--border-color);
}

.modal-title-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.modal-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.modal-title-content {
    flex: 1;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 5px 0;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.close-modal:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--hover-bg);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.modal-actions {
    padding: 20px 25px;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ========================================================================
   FORMULÁRIO
   ======================================================================== */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.label-icon {
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: -4px;
}

/* ========================================================================
   ALERT BOX
   ======================================================================== */

.alert-box {
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 15px;
}

.alert-box.info {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #93c5fd;
}

.alert-box.danger {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #fecaca;
}

.alert-box strong {
    font-weight: 700;
}

/* ========================================================================
   BOTÕES
   ======================================================================== */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background:#405df0 ;
    color: rgb(255, 255, 255);
}

.btn-primary:hover {
    background: #03981e;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--hover-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* ========================================================================
   TOAST
   ======================================================================== */

.toast {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    min-width: 350px;
    border: 2px solid var(--border-color);
    transition: bottom 0.3s ease;
}

.toast.show {
    bottom: 30px;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 3px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 0 12px;
    animation: progressBar 3s linear forwards;
}

.toast-success {
    border-color: #10b981;
}

.toast-error {
    border-color: #ef4444;
}

.toast-warning {
    border-color: #f59e0b;
}

.toast-info {
    border-color: #3b82f6;
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ========================================================================
   RESPONSIVIDADE
   ======================================================================== */

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .users-table-container {
        overflow-x: auto;
    }
    
    .users-table {
        min-width: 800px;
    }
    
    .modal {
        width: 95%;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* ========================================================================
   MODAL MINIMALISTA - AJUSTES
   ======================================================================== */

   #toggleStatusModal .modal-body {
    padding: 30px 25px;
}

#toggleStatusModal .alert-box {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
}

#toggleStatusModal .alert-box strong {
    font-weight: 700;
    color: var(--text-color);
}

.btn-activate {
    background: #10b981;
    color: white;
}

.btn-activate:hover {
    background: #059669;
}

.btn-deactivate {
    background: #f59e0b;
    color: white;
}

.btn-deactivate:hover {
    background: #d97706;
}


/* ========================================================================
   CONFIGURAÇÃO DE E-MAIL - ADMIN
   ======================================================================== */

   .btn-email {
    background: #dbeafe;
    color: #1e40af;
}

.btn-email:hover {
    background: #bfdbfe;
}

.tab-btn-admin {
    color: var(--text-secondary);
}

.tab-btn-admin.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color) !important;
}

.tab-content-admin {
    display: none;
}

.tab-content-admin.active {
    display: block;
}

.connection-status {
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.connection-status.testing {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.connection-status.success {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.connection-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.status-icon {
    font-size: 24px;
}

.status-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-content p {
    font-size: 13px;
    margin: 2px 0;
}