/* ============================================================
   VECTOREXEC - ESTRATEGIAS
   ============================================================ */

/* Reutiliza estilos de bots.css */
.app-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #0D47A1;
}

.main-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #0D47A1;
}

.nav-link.active {
    color: #0D47A1;
    border-bottom-color: #0D47A1;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.username {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

.btn-logout {
    padding: 6px 14px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-logout:hover {
    background: #c53030;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
}

.page-header .subtitle {
    font-size: 14px;
    color: #718096;
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

.btn-secondary {
    padding: 8px 16px;
    background: #e2e8f0;
    color: #2d3748;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

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

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f4f8;
    color: #2d3748;
}

tbody tr:hover {
    background: #f7fafc;
}

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

/* Estados */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #c6f6d5;
    color: #276749;
}

.status-inactive {
    background: #fed7d7;
    color: #9b2c2c;
}

.status-testing {
    background: #feebc8;
    color: #9c4221;
}

.status-archived {
    background: #e2e8f0;
    color: #4a5568;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-icon {
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.btn-icon:hover {
    background: #edf2f7;
}

.btn-icon.delete:hover {
    background: #fed7d7;
}

.btn-icon.toggle:hover {
    background: #fefcbf;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 620px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1a202c;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #e53e3e;
}

.delete-modal p {
    margin: 12px 0;
    font-size: 15px;
    color: #2d3748;
}

.text-danger {
    color: #e53e3e;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Formulario */
#strategyForm .form-group {
    margin-bottom: 16px;
}

#strategyForm label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

#strategyForm input,
#strategyForm select,
#strategyForm textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

#strategyForm input:focus,
#strategyForm select:focus,
#strategyForm textarea:focus {
    border-color: #0D47A1;
    outline: none;
}

#strategyForm textarea {
    resize: vertical;
    min-height: 60px;
    font-family: 'Courier New', monospace;
}

#strategyForm small {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

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

.message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    margin-bottom: 16px;
}

.message.show {
    display: block;
}

.message.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.message.success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.message.info {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 8px;
    }

    .main-nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .user-menu {
        margin-left: auto;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    table {
        font-size: 13px;
    }

    th,
    td {
        padding: 8px 10px;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }

    .actions {
        flex-direction: column;
        gap: 4px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
