.pedido-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.pedido-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pedido-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pedido-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-label {
    color: #6b7280;
    font-weight: 500;
}

.info-value {
    color: #1f2937;
    font-weight: 600;
}

.cartelas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.cartela-item {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: block;
}

.cartela-item:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.btn-voltar {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-voltar:hover {
    opacity: 0.9;
}

.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.pdf-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-modal-header {
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.pdf-modal-iframe {
    width: 100%;
    height: calc(100% - 60px);
    border: none;
}

@media (min-width: 768px) {
    .buttons-container {
        flex-direction: row !important;
        justify-content: center;
    }
    
    .buttons-container button,
    .buttons-container a {
        width: auto !important;
        min-width: 250px;
    }
}
