/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a2332;
    background: #f8fafb;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #0075d9; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* === LAYOUT === */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* === HEADER === */
.header {
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
    padding: 16px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.logo { height: 56px; }
.tagline {
    color: #5a6b7d;
    font-size: 0.95rem;
    font-weight: 500;
}

/* === SECTIONS === */
.section { padding: 60px 0; }
.section-dark { background: linear-gradient(135deg, #071e36 0%, #0d2e4f 100%); }
.section-light { background: #f8fafb; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-dark .section-header h1,
.section-dark .section-header h2 { color: #fff; font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.section-dark .section-header p { color: rgba(255,255,255,0.75); font-size: 1.1rem; }
.section-light .section-header h2 { color: #1a2332; font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.section-light .section-header p { color: #5a6b7d; font-size: 1.1rem; }

/* === CARDS === */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.card-centered { max-width: 600px; margin: 0 auto 24px; }
.card-muted {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    text-align: center;
}
.card-muted code { background: rgba(255,255,255,0.12); padding: 2px 8px; border-radius: 4px; font-size: 0.9rem; }

/* === FORMS === */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3a4a5c;
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e5eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.form-group input:focus {
    outline: none;
    border-color: #0075d9;
    box-shadow: 0 0 0 3px rgba(0,117,217,0.12);
}
.form-group input.error {
    border-color: #e74c3c;
}
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-divider { border: none; border-top: 1px solid #e8ecf0; margin: 20px 0; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: #0075d9; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #005fb3; }
.btn-outline { background: transparent; color: #0075d9; border: 2px solid #0075d9; }
.btn-outline:hover:not(:disabled) { background: #0075d9; color: #fff; }
.btn-ghost { background: transparent; color: #5a6b7d; margin-top: 8px; font-size: 0.9rem; }
.btn-ghost:hover { color: #0075d9; }
.btn-full { width: 100%; }

/* === INVOICE SUMMARY BAR === */
.invoice-summary-bar {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    background: #f0f6ff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.inv-detail { text-align: center; }
.inv-label { display: block; font-size: 0.75rem; text-transform: uppercase; color: #5a6b7d; letter-spacing: 0.05em; font-weight: 600; }
.inv-value { font-size: 1.1rem; font-weight: 700; color: #1a2332; }
.inv-amount { color: #0075d9; }

/* === HELP TEXT === */
.help-text { text-align: center; color: rgba(255,255,255,0.55); font-size: 0.85rem; margin-top: 16px; }
.help-text code { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 3px; }

/* === BANK TRANSFER === */
.bank-title { font-weight: 600; margin-bottom: 8px; font-size: 1rem; }
.bank-details { font-size: 0.9rem; line-height: 1.8; }
.bank-details small { display: block; margin-top: 6px; opacity: 0.7; }

/* === BILLING TOGGLE === */
.billing-toggle {
    display: inline-flex;
    background: #e8ecf0;
    border-radius: 8px;
    padding: 4px;
    margin-top: 20px;
}
.toggle-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: #5a6b7d;
    transition: all 0.2s;
}
.toggle-btn.active { background: #0075d9; color: #fff; box-shadow: 0 2px 4px rgba(0,117,217,0.25); }
.badge-save {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.toggle-btn.active .badge-save { background: rgba(255,255,255,0.25); }

/* === PRICING GRID === */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}
.pricing-card {
    background: #fff;
    border: 2px solid #e8ecf0;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.pricing-card.recommended { border-color: #0075d9; box-shadow: 0 4px 20px rgba(0,117,217,0.15); }
.badge-recommended {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #0075d9;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.plan-name { font-size: 1.1rem; font-weight: 700; color: #1a2332; margin-bottom: 12px; }
.plan-price { margin-bottom: 8px; }
.plan-price .currency { font-size: 1.2rem; font-weight: 700; color: #0075d9; vertical-align: top; }
.plan-price .amount { font-size: 2.8rem; font-weight: 700; color: #0075d9; line-height: 1; }
.plan-price .period { font-size: 0.95rem; color: #5a6b7d; }
.plan-note { font-size: 0.85rem; color: #8899aa; margin-bottom: 20px; }
.plan-features { list-style: none; text-align: left; margin-bottom: 24px; }
.plan-features li { padding: 6px 0; font-size: 0.9rem; color: #3a4a5c; }
.plan-features li.check::before { content: '✓'; color: #27ae60; font-weight: 700; margin-right: 8px; }

/* === MODAL === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7,30,54,0.7);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #8899aa;
    cursor: pointer;
}
.modal-close:hover { color: #1a2332; }
.sub-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f6ff;
    border-radius: 8px;
    padding: 14px 20px;
    margin: 16px 0 24px;
    font-weight: 600;
}

/* === RESULT OVERLAY === */
.result-content { text-align: center; max-width: 400px; }
.result-content h2 { margin: 16px 0 8px; }
.result-content p { color: #5a6b7d; margin-bottom: 24px; }
.result-icon-success { font-size: 3rem; }
.result-icon-error { font-size: 3rem; }

/* === PROCESSING SPINNER === */
.btn .spinner-inline {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === FOOTER === */
.footer {
    background: #fff;
    border-top: 1px solid #e8ecf0;
    padding: 40px 0 20px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 24px;
}
.footer-logo { height: 48px; margin-bottom: 8px; }
.footer-brand p { color: #5a6b7d; font-size: 0.9rem; max-width: 300px; }
.footer-contact p { color: #5a6b7d; font-size: 0.9rem; margin: 4px 0; }
.footer-contact a { color: #0075d9; }
.footer-bottom { border-top: 1px solid #e8ecf0; padding-top: 16px; text-align: center; }
.footer-bottom p { color: #8899aa; font-size: 0.8rem; }

/* === ERROR MESSAGE === */
.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .section { padding: 40px 0; }
    .section-dark .section-header h1,
    .section-dark .section-header h2,
    .section-light .section-header h2 { font-size: 1.6rem; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
    .form-row-2col { grid-template-columns: 1fr; }
    .header-inner { justify-content: center; text-align: center; }
    .tagline { display: none; }
    .invoice-summary-bar { flex-direction: column; gap: 12px; }
    .footer-inner { flex-direction: column; align-items: center; text-align: center; }
    .modal-content { padding: 24px; }
    .card { padding: 24px; }
}
