/* Estilos adicionales */
.pwa-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.no-pwas {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
    grid-column: 1 / -1;
}

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

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Mejoras para el script container */
.script-container {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--success);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.copy-btn:hover {
    background: #3aa8d0;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Single PWA Styles */
.pwa-single-header {
    margin-bottom: 2rem;
}

.pwa-single-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pwa-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.pwa-default-hero {
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 4rem;
}

.pwa-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.pwa-author {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.pwa-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.pwa-single-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.pwa-main-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pwa-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.pwa-description, .pwa-details, .pwa-script-section, .pwa-stats-section {
    margin-bottom: 2rem;
}

.pwa-description h2, .pwa-details h2, .pwa-script-section h2, .pwa-stats-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.pwa-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.color-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid #ddd;
}

.social-share {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: block;
    padding: 0.75rem;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    transition: opacity 0.3s;
}

.social-link:hover {
    opacity: 0.9;
    color: white;
}

.social-link.facebook { background: #3b5998; }
.social-link.twitter { background: #1da1f2; }
.social-link.linkedin { background: #0077b5; }

/* Responsive */
@media (max-width: 968px) {
    .pwa-single-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .pwa-single-content {
        grid-template-columns: 1fr;
    }
    
    .pwa-hero-image {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .pwa-details-grid {
        grid-template-columns: 1fr;
    }
    
    .pwa-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Mejoras para analytics */
.pwa-analytics {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Mejoras para el dashboard */
.pwa-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pwa-action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
    font-size: 0.9rem;
}

.pwa-action-btn:hover {
    background: #f8f9fa;
}

/* Indicadores de estado PWA */
.pwa-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}