* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 5px;
}

.header-subtitle {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.btn-nueva-noticia {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-nueva-noticia:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-actualizar {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-actualizar:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

.filtros {
    background: white;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
}

.filtros label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
}

.filtros input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tabs {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
}

.tab {
    flex: 1;
    background: #f3f4f6;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6b7280;
}

.tab:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
}

.tab.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.noticia-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.noticia-imagen {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.noticia-contenido {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.noticia-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    width: fit-content;
}

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

.badge-nueva {
    background: #fef3c7;
    color: #92400e;
}

.noticia-source {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.noticia-titulo {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.noticia-descripcion {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    flex: 1;
}

.noticia-fecha {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.noticia-acciones {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.noticia-acciones-secundarias {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-facebook {
    background: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background: #166fe5;
}

.btn-wordpress {
    background: #21759b;
    color: white;
}

.btn-wordpress:hover {
    background: #1e6a8d;
}

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

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

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

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

.btn-publicada {
    background: #6b7280;
    color: white;
    cursor: not-allowed;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: white;
    font-size: 1.5em;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #333;
}

.noticia-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.btn-cancelar,
.btn-guardar {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancelar {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-cancelar:hover {
    background: #e5e7eb;
    color: #333;
}

.btn-guardar {
    background: #667eea;
    color: white;
}

.btn-guardar:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Badge para noticias manuales */
.badge-manual {
    background: #fbbf24;
    color: #78350f;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros {
        flex-direction: column;
        gap: 15px;
    }
}
