:root {
    --primary: #e53e3e;
    --primary-hover: #c53030;
    --secondary: #1a202c;
    --accent: #f6e05e;
    --bg-color: #f7fafc;
    --text-main: #2d3748;
    --text-muted: #718096;
    --white: #ffffff;
    --success: #38a169;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; /* Space for sticky footer */
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--secondary);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    position: relative;
}

@media (min-width: 1024px) {
    .container {
        max-width: 800px; /* Um pouco mais largo no desktop para aproveitar o espaço */
        margin: 20px auto;
        border-radius: 20px;
        min-height: calc(100vh - 40px);
    }
    
    .carousel {
        border-radius: 12px;
    }
}

/* Urgency Banner */
.urgency-banner {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.pulse-icon {
    animation: pulse 1.5s infinite;
}

/* Header */
.product-header {
    padding: 20px;
}

.badges {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-primary {
    background: var(--secondary);
    color: var(--white);
}

.badge-discount {
    background: var(--accent);
    color: var(--secondary);
}

.product-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stars {
    color: #ecc94b;
    letter-spacing: 2px;
}

/* Carousel */
.product-gallery {
    position: relative;
    background: var(--white);
    padding-bottom: 10px;
}

.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
}

.carousel-inner {
    display: flex;
    transition: transform 0.3s ease-in-out;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Garante que a moto apareça inteira sem cortes */
    transition: transform 0.5s ease;
    padding: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.secure-badges {
    display: flex;
    justify-content: space-around;
    padding: 15px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
    background: #f0fff4;
    border-bottom: 1px solid var(--border);
}

/* Pricing Section */
.pricing-section {
    padding: 24px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.price-container {
    text-align: center;
    margin-bottom: 24px;
}

.old-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 1.1rem;
    font-weight: 500;
}

.current-price {
    color: var(--primary);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1;
    margin: 5px 0;
}

.currency { font-size: 1.5rem; margin-top: 8px; margin-right: 4px; }
.value { font-size: 4rem; letter-spacing: -2px; }
.cents { font-size: 1.5rem; margin-top: 8px; }

.installment {
    color: var(--success);
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
}

/* Colors */
.color-selector {
    margin-bottom: 24px;
}

.color-selector h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.color-options {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 1px var(--border);
    transition: all 0.2s ease;
}

.color-btn.active {
    box-shadow: 0 0 0 2px var(--primary);
    transform: scale(1.1);
}

#selected-color-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Checkout Form */
.quick-checkout {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.quick-checkout h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.btn-buy {
    width: 100%;
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 10px;
}

.btn-buy:hover { background: #2f855a; }
.btn-buy:active { transform: scale(0.98); }

.pulse {
    animation: shadow-pulse 2s infinite;
}

.secure-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 15px;
}

/* Features */
.features-section {
    padding: 30px 20px;
    background: var(--white);
}

.features-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.features-list .icon {
    font-size: 1.5rem;
    background: #edf2f7;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.features-list strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.features-list p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Shipping Badge Block ── */
.shipping-badge-block {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shipping-badge-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shipping-badge-icon {
    font-size: 1.3rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.shipping-badge-row div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.shipping-badge-row strong {
    font-size: 0.88rem;
    color: #14532d;
    font-weight: 700;
}

.shipping-badge-row span {
    font-size: 0.8rem;
    color: #166534;
}

/* ── Section Title ── */
.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
}

/* ── Sobre o Produto ── */
.about-section {
    padding: 24px 20px;
    background: white;
    margin-top: 8px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.about-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
}

.about-card-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.about-card strong {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.about-card span {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
}

.about-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-list-item {
    font-size: 0.92rem;
    color: #374151;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 8px;
    font-weight: 500;
    border-left: 3px solid #22c55e;
}

/* ── Avaliações ── */
.reviews-section {
    padding: 24px 20px 100px;
    background: #f8fafc;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reviews-score {
    font-size: 2.8rem;
    font-weight: 900;
    color: #1a202c;
    line-height: 1;
}

.stars-row { font-size: 1.1rem; margin-bottom: 2px; }
.reviews-summary small { color: #718096; font-size: 0.85rem; }

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.review-card {
    background: white;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.review-meta {
    flex: 1;
}

.review-meta strong {
    display: block;
    font-size: 0.95rem;
    color: #1a202c;
    margin-bottom: 2px;
}

.review-stars { font-size: 0.85rem; }

.review-verified {
    font-size: 0.72rem;
    color: #16a34a;
    font-weight: 700;
    background: #dcfce7;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.review-text {
    font-size: 0.92rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 12px;
    font-style: italic;
}

.review-photos {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.review-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.review-date {
    color: #94a3b8;
    font-size: 0.78rem;
}

/* Sticky Footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 15px 20px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
}

.sticky-price span {
    display: block;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
}

.sticky-price small {
    color: var(--text-muted);
    font-weight: 500;
}

.btn-buy-sticky {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    animation: shadow-pulse 2s infinite;
}

/* States */
.hidden { display: none !important; }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

#loading-state {
    text-align: center;
    padding: 30px 0;
}

.checkout-header {
    margin-bottom: 25px;
    border-bottom: 2px solid #f7fafc;
    padding-bottom: 20px;
}

.checkout-header h3 {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 5px;
}

.checkout-header p {
    color: #718096;
    font-size: 0.95rem;
}

/* Pagina de Pagamento (Full Page) */
#payment-page, #checkout-page {
    background-color: #f7fafc;
    min-height: 100vh;
    padding-bottom: 50px;
}

.payment-nav {
    background: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-back {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #f1f5f9;
}

.payment-logo {
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

.payment-container {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.payment-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    text-align: center;
}

.pix-header {
    margin-bottom: 25px;
}

.pix-badge {
    background: #e6fffa;
    color: #2c7a7b;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.pix-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #1a202c;
}

.pix-header p {
    color: #718096;
    font-size: 0.9rem;
}

.qr-code-section {
    margin-bottom: 30px;
}

.qr-code-wrapper {
    background: #f7fafc;
    padding: 15px;
    border-radius: 16px;
    display: inline-block;
    border: 2px solid #edf2f7;
    margin-bottom: 10px;
}

.qr-code-wrapper img {
    width: 220px;
    height: 220px;
    display: block;
}

.qr-instructions {
    font-size: 0.85rem;
    color: #a0aec0;
    font-weight: 600;
}

.copy-paste-section {
    text-align: left;
    margin-bottom: 30px;
}

.copy-paste-section label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #4a5568;
}

.copy-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.copy-box input {
    width: 100%;
    padding: 14px;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    font-size: 0.85rem;
    background: #f7fafc;
    color: #4a5568;
    font-family: monospace;
}

.btn-copy-action {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-copy-action.copied {
    background: var(--success);
}

.btn-copy-action:active {
    transform: scale(0.98);
}

.payment-alert {
    background: #fff5f5;
    color: #c53030;
    padding: 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 25px;
}

.payment-alert .icon {
    font-size: 1.2rem;
}

.secure-footer {
    border-top: 1px solid #edf2f7;
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shadow-pulse {
    0% { box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(56, 161, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 161, 105, 0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.shipping-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: left;
}

.shipping-info span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.expired-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

#expired-modal .modal-content {
    border-top: 5px solid #e53e3e;
}

.success-check {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 15px;
}

#payment-success-msg h4 {
    color: var(--success);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

/* === PAYMENT METHOD SELECTOR === */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.payment-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: 'Inter', sans-serif;
}

.payment-method-btn:hover {
    border-color: var(--primary);
    background: #f0fdf4;
}

.payment-method-btn.active {
    border-color: var(--primary);
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.2);
}

.pm-icon {
    color: #4a5568;
    display: flex;
    align-items: center;
}

.payment-method-btn.active .pm-icon { color: var(--primary); }

.pm-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1a202c;
}

.pm-sub {
    font-size: 0.72rem;
    color: #718096;
    text-align: center;
    line-height: 1.3;
}

.pm-discount-badge {
    position: absolute;
    top: -10px;
    right: -8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* === PRICE SUMMARY === */
.price-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.price-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 8px;
}

.price-summary-row:last-child { margin-bottom: 0; }

.discount-label { color: #16a34a; font-weight: 600; }
.discount-value { color: #16a34a; font-weight: 700; }

.price-summary-divider {
    border-top: 1px solid #e2e8f0;
    margin: 10px 0;
}

.price-summary-total {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.price-summary-total strong { font-size: 1.2rem; color: var(--primary); }

.installment-row small { color: #64748b; font-size: 0.82rem; }

/* === FORM SECTION === */
.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 14px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* === CARD INPUT === */
.card-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.card-input-wrapper input {
    width: 100%;
    padding-right: 80px;
}

.card-brand-icon {
    position: absolute;
    right: 12px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}

#card-installments {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

#card-installments:focus { border-color: var(--primary); }

/* === CARD ERROR STATE === */
.card-error-box {
    text-align: center;
    padding: 30px 20px;
    animation: fadeIn 0.3s ease;
}

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

.card-error-icon { font-size: 3rem; margin-bottom: 12px; }

.card-error-box h4 {
    font-size: 1.3rem;
    color: #dc2626;
    margin-bottom: 10px;
}

.card-error-box p { color: #64748b; font-size: 0.95rem; margin-bottom: 5px; }


/* === ADMIN DASHBOARD STYLES === */
.admin-body {
    background-color: #f8fafc;
    margin: 0;
    padding: 0;
}
.admin-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    background: #f8fafc;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}
.admin-loader p {
    margin-top: 15px;
    font-weight: 600;
    color: #475569;
}
.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 400px;
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-header h2 { font-size: 1.8rem; color: #1e293b; margin-bottom: 5px; }
.login-header p { color: #64748b; }

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 250px;
    background: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
}
.sidebar-header h2 { font-family: 'Outfit', sans-serif; font-size: 1.5rem; }
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-links li a {
    display: block;
    padding: 15px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}
.nav-links li.active a, .nav-links li a:hover {
    background: #0f172a;
    color: white;
    border-left: 4px solid #3b82f6;
}
.dashboard-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}
.dashboard-header h1 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 20px;
}

.stats-grid {
    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 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}
.stat-card h3 {
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
}
.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-muted { color: #64748b; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 1024px) {
    .dashboard-grid { grid-template-columns: 350px 1fr; }
}

.admin-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}
.admin-card h2 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.admin-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}
.admin-table td { font-size: 0.95rem; color: #334155; }
.admin-table tr:last-child td { border-bottom: none; }

.status-badge {
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-error { background: #fee2e2; color: #991b1b; }

.table-responsive { overflow-x: auto; }

/* ── Dashboard grid simples (só tabela) ── */
.dashboard-grid-simple {
    margin-top: 20px;
}

/* ── Settings Page Layout ── */
.settings-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .settings-layout { grid-template-columns: 1fr; }
}

.settings-card--full {
    grid-column: 1 / -1;
}

.settings-card {
    transition: box-shadow 0.2s;
}

.settings-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.settings-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.settings-card-header h2 {
    font-size: 1rem !important;
    margin-bottom: 3px !important;
    color: #1e293b;
}

.settings-card-header p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
}

.settings-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

.settings-card-icon--pix {
    background: #e6fffa;
    color: #2c7a7b;
}

.settings-card-icon--card {
    background: #eff6ff;
    color: #3b82f6;
}

/* Input com sufixo (%) */
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-suffix input {
    padding-right: 40px;
}

.input-suffix {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.9rem;
    pointer-events: none;
}

/* Botão salvar na settings page */
.btn-save-settings {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    font-size: 1rem;
    letter-spacing: 0.04em;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(15,23,42,0.25);
    transition: all 0.2s;
}

.btn-save-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15,23,42,0.3);
}

/* ── Webhook Copy Box ── */
.webhook-copy-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.webhook-copy-box input {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-family: monospace;
    font-size: 0.9rem;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: text;
}

.btn-copy {
    background: #e2e8f0;
    color: #334155;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #cbd5e1;
}

.btn-copy.copied {
    background: #22c55e;
    color: white;
}


/* ── Admin Payment Method Toggles ─── */
.payment-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pm-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    background: #fafafa;
}

.pm-toggle:hover {
    border-color: #94a3b8;
    background: white;
}

.pm-toggle.active {
    border-color: #22c55e;
    background: #f0fdf4;
}

/* Esconde o checkbox nativo */
.pm-toggle-input { display: none; }

.pm-toggle-track {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pm-toggle-icon {
    display: flex;
    align-items: center;
    color: #94a3b8;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    justify-content: center;
    transition: all 0.2s;
}

.pm-toggle.active .pm-toggle-icon {
    background: #dcfce7;
    color: #16a34a;
}

.pm-toggle-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    display: block;
    line-height: 1.2;
}

.pm-toggle-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.pm-toggle-track > span:not(.pm-toggle-icon) {
    display: flex;
    flex-direction: column;
}

.pm-toggle-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    font-weight: 700;
}

.pm-toggle.active .pm-toggle-check {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}


/* Admin form group */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 6px;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-group input:focus, .form-group select:focus { border-color: #3b82f6; }

.btn-admin {
    background: #1e293b;
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.03em;
}
.btn-admin:hover { background: #0f172a; transform: translateY(-1px); }
.btn-admin:active { transform: scale(0.98); }

.status-msg { margin-top: 12px; text-align: center; font-weight: 600; font-size: 0.9rem; }
.status-msg.success { color: #10b981; }
.status-msg.error { color: #ef4444; }

/* Mobile: input-row vira coluna única */
@media (max-width: 480px) {
    .input-row { grid-template-columns: 1fr; }
}

@media (min-width: 601px) {
    body { background-color: #e2e8f0; padding: 20px 0; }
    .container { border-radius: 16px; overflow: hidden; }
    .sticky-footer { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   GATEWAY DE PAGAMENTO — Sistema de Design Profissional
═══════════════════════════════════════════════════════════════════ */

.gateway-card {
    padding: 0 !important;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
}

/* ── Cabeçalho ───────────────────────────────────────────────────── */
.gateway-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1.5px solid #f1f5f9;
    background: #fafbfc;
}

.gateway-card-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gateway-card-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.gateway-card-title {
    font-size: 1.05rem !important;
    font-weight: 700;
    color: #0f172a;
    margin: 0 !important;
}

.gateway-card-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 2px 0 0;
}

.btn-edit-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: white;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-edit-action:hover {
    background: #f8fafc;
    border-color: #7c3aed;
    color: #7c3aed;
}

/* ── Seleção de Provedor ─────────────────────────────────────────── */
.gateway-provider-section {
    padding: 20px 24px;
    border-bottom: 1.5px solid #f1f5f9;
}

.gateway-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    margin: 0 0 12px;
}

.gateway-provider-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gateway-provider-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    overflow: hidden;
}

.gateway-provider-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gateway-provider-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.gateway-provider-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blackcat-logo {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #f6e05e;
}

.freepay-logo {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    color: white;
}

.gateway-provider-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gateway-provider-info strong {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 700;
}

.gateway-provider-info span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.gateway-provider-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

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

.freepay-badge {
    background: #e0f2fe;
    color: #0369a1;
}

.gateway-provider-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

/* Estado selecionado */
.gateway-provider-card:has(input:checked) {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.gateway-provider-card:has(input:checked) .gateway-provider-check {
    background: #7c3aed;
    border-color: #7c3aed;
    color: white;
}

/* Estado disabled (quando não está editando) */
.gateway-provider-card:has(input:disabled) {
    cursor: default;
}

/* ── Aviso FreePay ───────────────────────────────────────────────── */
.gateway-freepay-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 24px 0;
    padding: 14px 16px;
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 10px;
    font-size: 0.84rem;
    color: #92400e;
    line-height: 1.5;
}

.gateway-freepay-alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.gateway-freepay-alert strong {
    display: block;
    margin-bottom: 2px;
}

.gateway-freepay-alert span {
    opacity: 0.8;
}

/* ── Seção de Credenciais ────────────────────────────────────────── */
.gateway-creds-section {
    padding: 20px 24px 24px;
}

.gateway-creds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gateway-creds-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    background: #dcfce7;
    padding: 3px 10px;
    border-radius: 20px;
}

.gateway-creds-status svg {
    color: #16a34a;
}

/* Linha de input */
.gateway-input-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gateway-input-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    width: 90px;
    flex-shrink: 0;
}

.gateway-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gateway-input-wrapper:focus-within {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.gateway-input-icon {
    padding: 0 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gateway-input {
    flex: 1;
    border: none !important;
    outline: none;
    padding: 11px 0;
    font-size: 0.88rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #1e293b;
    background: transparent;
    min-width: 0;
}

.gateway-input.input-readonly {
    color: #94a3b8 !important;
    cursor: not-allowed;
    background: transparent !important;
}

.gateway-input-wrapper:has(.input-readonly) {
    background: #f8fafc;
    border-style: dashed;
}

.gateway-eye-btn {
    background: none;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.gateway-eye-btn:hover {
    color: #475569;
}

/* Hint bloqueado */
.gateway-creds-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Banner de edição ativa */
.gateway-edit-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #1e40af;
    line-height: 1.4;
}

.gateway-edit-banner-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.gateway-edit-banner p {
    flex: 1;
    margin: 0;
}

.gateway-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

.gateway-cancel-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* ── Modais ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.btn-close-modal {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

/* ── Seções de Detalhes ── */
.detail-section {
    margin-bottom: 24px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 6px;
}

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

@media (max-width: 480px) {
    .detail-grid { grid-template-columns: 1fr; }
}

.detail-item {
    font-size: 0.9rem;
    color: #334155;
}

.detail-item strong {
    color: #64748b;
    font-weight: 600;
    margin-right: 4px;
}

/* ── Botão de Detalhes na Tabela ── */
.btn-detail-row {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-detail-row:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #f5f3ff;
}

.hidden { display: none !important; }
