/* ==========================================================
   VARIÁVEIS GLOBAIS
   ========================================================== */
:root {
    /* Cores principais */
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-gradient: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    
    /* Cores de fundo */
    --bg-body: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bg-card: #ffffff;
    --bg-input: #f9fafb;
    --bg-hover: #f3f4f6;
    
    /* Cores de texto */
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #888;
    
    /* Cores de borda */
    --border-light: #e5e7eb;
    --border-focus: #667eea;
    
    /* Cores de estado */
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-border: #34d399;
    --success-text: #065f46;
    
    --error: #ef4444;
    --error-bg: #fee2e2;
    --error-border: #f87171;
    --error-text: #991b1b;
    
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-border: #fbbf24;
    --warning-text: #92400e;
    
    --info: #3b82f6;
    --info-bg: #dbeafe;
    --info-border: #60a5fa;
    --info-text: #1e40af;
    
    /* Cores de botões */
    --btn-primary-bg: var(--primary-gradient);
    --btn-primary-text: #ffffff;
    --btn-primary-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
    
    --btn-secondary-bg: #6b7280;
    --btn-secondary-text: #ffffff;
    
    --btn-success-bg: #10b981;
    --btn-success-text: #ffffff;
    
    /* Tipografia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Espaçamento */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* Arredondamentos */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-pill: 50px;
    
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    
    /* Transições */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ==========================================================
   RESET E BASE
   ========================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    background: var(--bg-body);
    min-height: 100vh;
    padding: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.5;
}

/* ==========================================================
   CONTAINER PRINCIPAL
   ========================================================== */
.app-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* ==========================================================
   HEADER PREMIUM
   ========================================================== */
.header-premium {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-2xl);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.brand-text h1 {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-text span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.btn-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-header.support {
    background: #25D366;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-header.support:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-header.orders {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-header.orders:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-header.faq {
    background: #6f42c1;
    color: white;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
}

.btn-header.faq:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.4);
}

/* ==========================================================
   TOAST MESSAGE
   ========================================================== */
.toast-message {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    box-shadow: var(--shadow-lg);
    font-weight: var(--font-weight-medium);
    z-index: 2000;
    max-width: 400px;
    animation: slideInRight 0.4s ease;
    display: none;
}

.toast-message.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.toast-message.error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.toast-message.info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info-text);
}

.toast-message.warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning-text);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================
   CARD PRINCIPAL
   ========================================================== */
.card-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.panel-header {
    margin-bottom: var(--spacing-xl);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.panel-title i {
    color: var(--primary-start);
}

.panel-subtitle {
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
    font-size: 15px;
}

/* ==========================================================
   FORMULÁRIO PREMIUM
   ========================================================== */
.form-premium .form-group {
    margin-bottom: var(--spacing-lg);
}

.form-premium label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 15px;
}

.form-premium label i {
    color: var(--primary-start);
}

.input-wrapper {
    position: relative;
}

.input-wrapper select,
.input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: var(--font-family);
    color: var(--text-primary);
    transition: all var(--transition-base);
    appearance: none;
}

.input-wrapper select:focus,
.input-wrapper input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.input-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.hint-text {
    display: block;
    margin-top: var(--spacing-xs);
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================
   SERVIÇO INFO
   ========================================================== */
.service-info-container {
    margin-top: var(--spacing-sm);
}

.btn-ghost-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 2px solid var(--border-focus);
    color: var(--primary-start);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-ghost-info:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* ==========================================================
   PREÇO DISPLAY
   ========================================================== */
.price-group {
    margin-top: var(--spacing-lg);
}

.price-display-modern {
    background: var(--bg-input);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-base);
}

.price-display-modern .currency {
    font-size: 20px;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.price-display-modern .price-value {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================
   BOTÃO PRIMÁRIO
   ========================================================== */
.btn-primary-modern {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--btn-primary-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================
   MODAIS (OVERLAY + BOX)
   ========================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

.modal-box.payment-box {
    max-width: 720px;
}

.modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: var(--spacing-md) var(--spacing-xl);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================
   BOTÕES SECUNDÁRIOS (MODAL)
   ========================================================== */
.btn-secondary-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--btn-secondary-bg);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary-modern:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ==========================================================
   DESCRIÇÃO DO SERVIÇO (MODAL)
   ========================================================== */
.service-description-full {
    background: var(--bg-input);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: var(--spacing-lg);
}

.service-description-full strong {
    color: var(--primary-start);
}

/* ==========================================================
   MODAL DE PAGAMENTO
   ========================================================== */
.payment-layout {
    display: flex;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    align-items: flex-start;
}

.qr-section {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.qr-wrapper {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

#qrcode {
    display: inline-block;
}

.payment-amount {
    text-align: center;
}

.payment-amount span {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
}

.payment-amount strong {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.info-section {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item .label {
    color: var(--text-muted);
    font-size: 14px;
}

.info-item .value {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

/* ==========================================================
   CÓDIGO PIX
   ========================================================== */
.pix-code-area {
    margin: var(--spacing-sm) 0;
}

.pix-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.pix-label span {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.pix-code-area textarea {
    width: 100%;
    height: 80px;
    padding: var(--spacing-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    resize: none;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary);
    transition: border-color var(--transition-base);
}

.pix-code-area textarea:focus {
    outline: none;
    border-color: var(--border-focus);
}

.btn-copy-pix {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--btn-success-bg);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-copy-pix:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* ==========================================================
   STATUS DO PAGAMENTO
   ========================================================== */
.payment-status {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: var(--font-weight-medium);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.payment-status.paid {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.payment-timer {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================
   INFO BOX (PRAZO)
   ========================================================== */
.payment-info-box {
    background: var(--bg-input);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    font-size: 14px;
}

.payment-info-box strong {
    color: var(--text-primary);
}

.warning-badge {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: var(--radius-md);
    color: var(--warning-text);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
}

/* ==========================================================
   AÇÕES DO PAGAMENTO
   ========================================================== */
.payment-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.btn-support-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: #25D366;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-support-modern:hover {
    background: #1ebe57;
    transform: translateY(-1px);
}

/* ==========================================================
   RESPONSIVIDADE
   ========================================================== */
@media (max-width: 768px) {
    .app-wrapper {
        padding: var(--spacing-sm);
    }
    
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .brand {
        justify-content: center;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .btn-header {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .card-panel {
        padding: var(--spacing-lg);
    }
    
    .payment-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .qr-section {
        flex: 1;
        width: 100%;
    }
    
    .info-section {
        width: 100%;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .btn-support-modern {
        justify-content: center;
    }
    
    .modal-box {
        width: 95%;
        margin: var(--spacing-sm);
    }
    
    .modal-body {
        padding: var(--spacing-lg);
    }
    
    .price-display-modern .price-value {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .brand-text h1 {
        font-size: 20px;
    }
    
    .brand-text span {
        font-size: 12px;
    }
    
    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .panel-title {
        font-size: 20px;
    }
    
    .btn-primary-modern {
        font-size: 16px;
        padding: 14px;
    }
    
    .price-display-modern .price-value {
        font-size: 24px;
    }
}

/* ==========================================================
   MODAL DE CONFIRMAÇÃO
   ========================================================== */

.confirmation-content {
    text-align: center;
    padding: var(--spacing-sm) 0;
}

.confirmation-icon {
    font-size: 64px;
    color: var(--success);
    margin-bottom: var(--spacing-md);
}

.confirmation-content h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.confirmation-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.confirmation-details {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    border: 1px solid var(--border-light);
    text-align: left;
}

.confirmation-details .detail-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.confirmation-details .detail-item:last-child {
    border-bottom: none;
}

.confirmation-details .detail-label {
    color: var(--text-muted);
    font-size: 14px;
}

.confirmation-details .detail-value {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.confirmation-note {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    color: var(--info-text);
    text-align: left;
}

.confirmation-note i {
    font-size: 20px;
    color: var(--info);
    margin-top: 2px;
}

.confirmation-note p {
    margin: 0;
    font-size: 14px;
}

.confirmation-actions {
    display: flex;
    gap: var(--spacing-sm);
}

@media (max-width: 480px) {
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-details .detail-item {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}