/* Planilhas — site público e painel */

.sheet-section {
    padding: var(--space-6) 0;
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.sheet-empty {
    text-align: center;
    color: var(--color-gray-600);
    padding: var(--space-5);
}

.sheet-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.sheet-card__image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.sheet-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-4);
    gap: 8px;
}

.sheet-card__badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
}

.sheet-card__badge--free {
    background: #e8f5e9;
    color: #2e7d32;
}

.sheet-card__badge--paid {
    background: #fff3e0;
    color: #e65100;
}

.sheet-card__cat {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-gray-500);
    margin-bottom: 4px;
}

.sheet-card__price {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-primary-dark);
}

.sheet-card__title {
    margin: 0;
    font-size: var(--text-base);
    font-family: var(--font-display);
    line-height: 1.3;
}

.sheet-card__title a {
    color: var(--color-gray-800);
    text-decoration: none;
}

.sheet-card__title a:hover {
    color: var(--color-primary);
}

.sheet-card__desc {
    margin: 0;
    flex: 1;
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    line-height: 1.5;
}

.sheet-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sheet-detail__price {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--color-primary);
    margin: 0 0 var(--space-2);
}

.sheet-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.sheet-detail__cover {
    margin: var(--space-4) auto;
    max-width: 720px;
}

.sheet-detail__cover img {
    width: 100%;
    border-radius: var(--radius-md);
}

.sheet-detail__body {
    max-width: 720px;
    line-height: 1.75;
}

.sheet-card__badge--embed {
    background: #e3f2fd;
    color: #1565c0;
}

.sheet-detail__embed-title {
    font-size: var(--text-xl);
    font-weight: 800;
    margin: 0 0 var(--space-2);
}

.sheet-detail__embed-hint {
    color: var(--color-text-muted, #666);
    margin: 0 0 var(--space-4);
    max-width: 720px;
}

.sheet-detail__embed-gate {
    max-width: 640px;
    padding: var(--space-5);
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border, #e0e0e0);
}

.powerbi-embed {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    min-height: 420px;
    background: #f5f5f5;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.powerbi-embed__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.sheet-section__cta {
    text-align: center;
    margin-top: var(--space-5);
}

/* Painel */
.sheet-tag--free {
    background: #e8f5e9;
    color: #2e7d32;
}

.sheet-tag--paid {
    background: #fff3e0;
    color: #e65100;
}

.sheet-adm__stats {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .sheet-adm__stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sheet-paid-fields {
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--radius-sm);
}

.sheet-paid-fields[hidden] {
    display: none !important;
}

.usr-stat--ok .usr-stat__value {
    color: #2e7d32;
}
