/* ===============================
   AGENT MANAGEMENT PANEL STYLES
   =============================== */

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Screen - Redesigned */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(13, 13, 13, 0.7), rgba(13, 13, 13, 0.75)),
                url('../images/bg_1.jpg') center center / cover no-repeat fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    margin: 20px;
}

/* Left Panel - Branding */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.branding-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 25px;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.branding-title {
    color: #0D0D0D;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
}

.branding-subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 1.2rem;
    margin: 0 0 40px 0;
    font-weight: 500;
}

.branding-features {
    text-align: left;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    color: white;
}

.feature-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 18px;
    color: white;
}

.feature-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.feature-text span {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Right Panel - Login Form */
.login-form-panel {
    flex: 1;
    background: #fff;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-content {
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
}

.form-title {
    color: #0D0D0D;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.form-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin: 0 0 35px 0;
}

.agent-login-form .form-field {
    margin-bottom: 25px;
}

.agent-login-form .form-field label {
    display: block;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 15px;
    color: #9ca3af;
    font-size: 16px;
}

.agent-login-form input {
    width: 100%;
    padding: 15px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background: #f9fafb;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.agent-login-form input:focus {
    outline: none;
    border-color: #F26522;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.1);
}

.agent-login-form input::placeholder {
    color: #9ca3af;
}

.agent-login-form .password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.agent-login-form .password-toggle:hover {
    color: #F26522;
}

.login-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(242, 101, 34, 0.4);
}

.login-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 30px;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #fecaca;
}

/* Responsive Design for Login */
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }
    
    .login-branding {
        padding: 40px 30px;
    }
    
    .branding-logo {
        width: 80px;
        height: 80px;
    }
    
    .branding-title {
        font-size: 1.8rem;
    }
    
    .branding-features {
        display: none;
    }
    
    .login-form-panel {
        padding: 40px 30px;
    }
}

/* Agent Header */
.admin-header .agent-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 20px;
}


/* ===============================
   GESTIÓN DE AGENTES - ADMIN PANEL
   =============================== */

.agent-management-main {
    padding: 24px;
    background: #f8fafc;
    min-height: 100vh;
}

/* Header con botón de regreso */
.admin-header .back-link {
    color: #fff;
    text-decoration: none;
    margin-right: 15px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.admin-header .back-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===============================
   PANEL DE BÚSQUEDA
   =============================== */
.search-section {
    margin-bottom: 30px;
}

.search-card {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(242, 101, 34, 0.3);
}

.search-card h3 {
    color: white;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-card h3 i {
    font-size: 28px;
}

.search-form {
    width: 100%;
}

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

.search-controls {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-type {
    margin-bottom: 16px;
}

.search-grid .form-group {
    display: flex;
    flex-direction: column;
}

.search-grid .form-group label {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.search-grid .form-group input,
.search-grid .form-group select {
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-grid .form-group input:hover,
.search-grid .form-group select:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: white;
}

.search-grid .form-group input:focus,
.search-grid .form-group select:focus {
    outline: none;
    border-color: #F26522;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.2);
    background: white;
}

.search-grid .form-group input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
}

/* ===============================
   ESTADÍSTICAS
   =============================== */
.stats-section {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.stat-card {
    background: #ffffff;
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8e8e8;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card.total .stat-icon {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.stat-card.pending .stat-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.stat-card.paid .stat-icon {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.stat-card.operator .stat-icon {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
}

.stat-card.cancelled .stat-icon {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
}

.stat-card .stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #F26522;
    margin: 0 0 5px 0;
}

.stat-card .stat-content p {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

/* ===============================
   RESULTADOS DE BÚSQUEDA
   =============================== */
.results-section {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.results-header {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.table-container {
    overflow-x: auto;
    min-width: 100%;
}

.transactions-table {
    width: 100%;
    min-width: 1600px;
    border-collapse: separate;
    border-spacing: 0;
}

.transactions-table th,
.transactions-table td {
    padding: 14px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.transactions-table th {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    color: white;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Anchos mínimos de columnas para garantizar legibilidad */
.transactions-table th:nth-child(1),
.transactions-table td:nth-child(1) { min-width: 220px; } /* ID Transacción */
.transactions-table th:nth-child(2),
.transactions-table td:nth-child(2) { min-width: 110px; } /* Cliente ID */
.transactions-table th:nth-child(3),
.transactions-table td:nth-child(3) { min-width: 140px; } /* Nombre Cliente */
.transactions-table th:nth-child(4),
.transactions-table td:nth-child(4) { min-width: 120px; } /* Tipo Cambio */
.transactions-table th:nth-child(5),
.transactions-table td:nth-child(5) { min-width: 90px; } /* Tasa */
.transactions-table th:nth-child(6),
.transactions-table td:nth-child(6) { min-width: 150px; } /* Monto Enviar */
.transactions-table th:nth-child(7),
.transactions-table td:nth-child(7) { min-width: 160px; } /* Total Recibir */
.transactions-table th:nth-child(8),
.transactions-table td:nth-child(8) { min-width: 110px; } /* Fecha */
.transactions-table th:nth-child(9),
.transactions-table td:nth-child(9) { min-width: 110px; } /* Operador */
.transactions-table th:nth-child(10),
.transactions-table td:nth-child(10) { min-width: 110px; } /* Estado */
.transactions-table th:nth-child(11),
.transactions-table td:nth-child(11) { min-width: 100px; } /* Notas */

.transactions-table th:first-child {
    border-top-left-radius: 12px;
}

.transactions-table th:last-child {
    border-top-right-radius: 12px;
}

.transactions-table td {
    font-size: 14px;
    color: #2c3e50;
    vertical-align: middle;
}

.transactions-table tbody tr {
    transition: all 0.3s ease;
    background: #ffffff;
}

.transactions-table tbody tr:hover {
    background: rgba(242, 101, 34, 0.05);
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(242, 101, 34, 0.1);
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}

.status-badge.pending {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(246, 173, 85, 0.3);
}

.status-badge.operator {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(242, 101, 34, 0.3);
}

.status-badge.paid {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.status-badge.cancelled {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(252, 129, 129, 0.3);
}

.view-agent-btn {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(242, 101, 34, 0.3);
    transition: all 0.3s ease;
}

.view-agent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 101, 34, 0.4);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-results i {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.no-results h4 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.no-results p {
    color: #64748b;
}

.loading-results {
    text-align: center;
    padding: 60px 20px;
}

.loading-results .spinner {
    margin: 0 auto 20px;
}

.loading-results p {
    color: #666;
    font-size: 16px;
}

/* ===============================
   DETALLES DEL AGENTE
   =============================== */
.agent-details {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 24px auto;
    border: 1px solid #e8e8e8;
}



.details-container {
    padding: 40px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Más espaciado cuando se muestran detalles */
.details-expanded .details-container {
    padding: 50px;
    max-width: none;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.details-header h3 {
    margin: 0;
    color: #F26522;
    font-size: 20px;
    font-weight: 600;
}

.details-header h3 i {
    margin-right: 10px;
    color: #ff6b35;
}

.details-actions {
    display: flex;
    gap: 12px;
}

.details-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Secciones de información */
.info-section {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.info-section h4 {
    background: rgba(242, 101, 34, 0.08);
    margin: 0;
    padding: 16px 20px;
    color: #F26522;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e8e8e8;
}

.info-section h4 i {
    margin-right: 8px;
    color: #ff6b35;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    padding: 24px;
    max-width: 100%;
}

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

.form-group label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #F26522;
    font-size: 14px;
}

.form-input,
.form-select {
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    color: #2c3e50;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #F26522;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.1);
}

.form-input[readonly] {
    background: #f8f9fa;
    color: #64748b;
}

/* ===============================
   VISUALIZADOR DE DOCUMENTOS
   =============================== */
.documents-viewer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.document-item {
    text-align: center;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
}

.document-item h5 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.document-preview {
    width: 100%;
    height: 220px;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
    transition: border-color 0.3s ease;
    overflow: hidden;
}

.document-preview i {
    font-size: 32px;
    color: #adb5bd;
    margin-bottom: 8px;
}

.document-preview span {
    color: #6c757d;
    font-size: 14px;
}

.document-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.document-preview.loaded {
    border: 2px solid #28a745;
    background: white;
}

.document-preview.loaded img,
.document-preview .document-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.document-preview.not-found {
    border: 2px dashed #6c757d;
    background: #f8f9fa;
}

.document-loading {
    color: #ff6b35;
    font-weight: 500;
}

.document-not-found {
    color: #6c757d;
    text-align: center;
}

/* ===============================
   COMISIONES (PLACEHOLDER)
   =============================== */
.commission-placeholder {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.commission-placeholder i {
    font-size: 24px;
    margin-right: 8px;
}

.commission-placeholder p {
    margin: 0 0 16px 0;
    font-size: 16px;
}

/* ===============================
   MODAL DE CONTRATO
   =============================== */
.large-modal .modal-content {
    max-width: 900px;
    width: 90vw;
    max-height: 90vh;
}

.contract-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
}

.contract-content h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}

.contract-content h3 {
    color: #ff6b35;
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 18px;
}

.contract-content .preambulo,
.contract-content .articulo {
    margin-bottom: 24px;
}

.contract-content p {
    margin-bottom: 12px;
    text-align: justify;
}

.contract-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.contract-content li {
    margin-bottom: 6px;
}

.contract-signature-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    text-align: center;
}

.contract-signature-section h4 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.signature-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Más columnas en vista ampliada */
#agentDetails[style*="block"] .info-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.signature-field {
    text-align: center;
}

.signature-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.signature-field .value {
    font-size: 16px;
    color: #2c3e50;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
    min-height: 20px;
}

.signature-image {
    max-width: 200px;
    max-height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px auto;
    display: block;
}

/* ===============================
   BOTONES
   =============================== */
.btn-primary {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 101, 34, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(160, 174, 192, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 101, 34, 0.2);
    background: rgba(242, 101, 34, 0.2);
}

.btn-outline-primary,
.btn-outline-danger {
    background: transparent;
    border: 2px solid #F26522;
    color: #F26522;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-outline-danger {
    border-color: #f56565;
    color: #f56565;
}

.btn-outline-primary:hover {
    background: #F26522;
    color: white;
}

.btn-outline-danger:hover {
    background: #f56565;
    color: white;
}

.btn-secondary:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .agent-management-main {
        padding: 12px;
    }
    
    .search-card {
        padding: 25px 20px;
    }
    
    .search-card h3 {
        font-size: 22px;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .results-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    .details-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .details-actions {
        justify-content: stretch;
    }
    
    .details-actions button {
        flex: 1;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-viewer {
        grid-template-columns: 1fr;
    }
    
    .large-modal .modal-content {
        width: 95vw;
        margin: 20px auto;
    }
}

/* ===============================
   TOAST NOTIFICATIONS
   =============================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Membership Display Styles */
.membership-display {
    margin-top: 1rem;
}

.membership-card-admin {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.membership-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.membership-row:last-child {
    margin-bottom: 0;
}

.membership-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.membership-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.membership-item label i {
    color: #6366f1;
    font-size: 0.9rem;
}

.membership-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 0.5rem;
}

.membership-value.highlight {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.membership-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.membership-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.membership-input.highlight-input {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f59e0b;
}

.membership-input.highlight-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

@media (max-width: 768px) {
    .membership-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .membership-card-admin {
        padding: 1rem;
    }
}

/* ===============================
   MODERN HEADER STYLES
   =============================== */

.modern-header {
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    padding: 25px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-logo {
    height: 60px;
    width: auto;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-text h1 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 5px 0 0 0;
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
}

.logout-btn-modern {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.logout-btn-modern:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.logout-btn-modern i {
    font-size: 16px;
}

/* Agent Info Bar Updates */
.agent-info-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.agent-basic-info {
    display: flex;
    gap: 40px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.agent-basic-info .info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.agent-basic-info .info-item label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-basic-info .info-item .value {
    font-size: 16px;
    color: #212529;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 992px) {
    .modern-header {
        padding: 20px 20px;
    }
    
    .header-text h1 {
        font-size: 20px;
    }
    
    .header-text p {
        font-size: 13px;
    }
    
    .header-logo {
        height: 50px;
    }
    
    .agent-info-bar {
        padding: 15px 20px;
    }
    
    .agent-basic-info {
        gap: 25px;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header-left {
        gap: 15px;
    }
    
    .header-text h1 {
        font-size: 16px;
    }
    
    .header-text p {
        display: none;
    }
    
    .header-logo {
        height: 45px;
    }
    
    .logout-btn-modern {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .logout-btn-modern span {
        display: none;
    }
    
    .agent-basic-info {
        gap: 15px;
    }
    
    .agent-basic-info .info-item label {
        font-size: 11px;
    }
    
    .agent-basic-info .info-item .value {
        font-size: 14px;
    }
}

/* ===============================
   FORGOT PASSWORD MODAL STYLES
   =============================== */
.forgot-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.forgot-modal {
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(242, 101, 34, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.forgot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(242, 101, 34, 0.2);
}

.forgot-modal-header h3 {
    color: #F26522;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.forgot-modal .close-modal {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.forgot-modal .close-modal:hover {
    color: #F26522;
}

.forgot-modal-body {
    padding: 2rem;
}

.forgot-modal-body p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.forgot-modal-body .form-group {
    margin-bottom: 1.5rem;
}

.forgot-modal-body .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.forgot-modal-body .form-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(242, 101, 34, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.forgot-modal-body .form-group input:focus {
    outline: none;
    border-color: #F26522;
    background: rgba(255, 255, 255, 0.15);
}

.forgot-modal-body .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.forgot-modal .reset-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #F26522 0%, #D4541E 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.forgot-modal .reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(242, 101, 34, 0.4);
}

.forgot-modal .reset-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.forgot-modal .reset-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.forgot-modal .reset-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.forgot-modal .reset-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Forgot Password Link in Login Form */
.form-options {
    text-align: right;
    margin-bottom: 1rem;
}

.forgot-password-link {
    color: #F26522;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #D4541E;
    text-decoration: underline;
}

/* ===============================
   EXPORT BUTTONS STYLES
   =============================== */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.btn-export-csv {
    background: #ffffff;
    color: #28a745;
    border-color: #28a745;
}

.btn-export-csv:hover {
    background: #28a745;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-export-pdf {
    background: #ffffff;
    color: #dc3545;
    border-color: #dc3545;
}

.btn-export-pdf:hover {
    background: #dc3545;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.results-actions {
    display: flex;
    gap: 12px;
}
