:root {
    --blue:#00A3E0;
    --dark-blue:#005A9C;
    --text:#0D1B2A;
    --muted:#52627A;
    --border:#E2EEF6;
    --shadow:0 18px 45px rgba(13,27,42,.08);
}

*{box-sizing:border-box}

body{
    margin:0;
    min-height:100vh;
    font-family:Arial, Helvetica, sans-serif;
    color:var(--text);
    background:
        radial-gradient(circle at left 35%, rgba(0,163,224,.08), transparent 28%),
        linear-gradient(180deg,#FFFFFF 0%,#F2F8FC 100%);
}

.page{
    max-width:1280px;
    margin:0 auto;
    padding:28px 42px 36px;
}

.topbar{
    height:76px;
    display:flex;
    align-items:center;
    margin-bottom:20px;
}

.logo{
    width:310px;
    height:auto;
    display:block;
}

.hero{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:26px;
    align-items:stretch;
}

.card{
    background:rgba(255,255,255,.97);
    border:1px solid var(--border);
    border-radius:26px;
    box-shadow:var(--shadow);
    padding:34px 48px;
}

.eyebrow{
    color:var(--dark-blue);
    font-size:14px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
    margin-bottom:18px;
}

h1{
    margin:0 0 18px;
    font-size:44px;
    line-height:1.08;
    letter-spacing:-.055em;
    font-weight:800;
}

h1 span{color:var(--blue)}

h2{
    margin:0 0 30px;
    font-size:42px;
    line-height:1.1;
    letter-spacing:-.045em;
    font-weight:800;
}

.lead{
    color:var(--muted);
    font-size:17px;
    line-height:1.5;
    margin:0 0 20px;
}

.step{
    display:grid;
    grid-template-columns:58px 1fr;
    gap:16px;
    align-items:center;
    padding:13px 16px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    margin-bottom:10px;
}

.circle{
    width:46px;
    height:46px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--blue),var(--dark-blue));
    color:#fff;
    display:grid;
    place-items:center;
    font-size:24px;
    font-weight:800;
}

.step strong,.safe-box strong,.limit-box strong{
    font-size:17px;
    font-weight:800;
}

.step p,.safe-box p,.limit-box p,.upload-box p{
    margin:5px 0 0;
    color:var(--muted);
    line-height:1.35;
    font-size:15px;
}

.safe-box{
    margin-top:16px;
    padding:16px 20px;
    border-radius:16px;
    background:linear-gradient(90deg,rgba(0,163,224,.10),rgba(0,90,156,.04));
}

.upload-box{
    min-height:300px;
    display:grid;
    place-items:center;
    text-align:center;
    padding:28px;
    border-radius:22px;
    border:2px dashed rgba(0,163,224,.58);
    background:linear-gradient(180deg,#fff,#F8FCFF);
    cursor:pointer;
}

.upload-box input{display:none}

.upload-icon{
    width:70px;
    height:70px;
    border-radius:999px;
    background:rgba(0,163,224,.13);
    color:var(--blue);
    display:grid;
    place-items:center;
    font-size:36px;
    font-weight:800;
}

.upload-box strong{
    display:block;
    font-size:21px;
    margin-top:12px;
    font-weight:800;
}

.upload-box span{
    margin-top:20px;
    display:inline-block;
    padding:15px 32px;
    border-radius:12px;
    background:linear-gradient(135deg,var(--blue),var(--dark-blue));
    color:#fff;
    font-weight:800;
}

.limit-box{
    margin:18px 0;
    padding:17px 20px;
    border-radius:16px;
    background:#F4F8FB;
}

.btn{
    width:100%;
    border:0;
    border-radius:14px;
    padding:18px 20px;
    background:linear-gradient(135deg,var(--blue),var(--dark-blue));
    color:#fff;
    font-size:18px;
    font-weight:800;
    cursor:pointer;
}

.secure{
    margin:16px 0 0;
    text-align:center;
    color:var(--muted);
    font-size:14px;
    font-weight:600;
}

@media(max-width:900px){
    .page{padding:18px 18px 28px}
    .topbar{height:auto;margin-bottom:18px}
    .logo{width:330px;max-width:92vw}
    .hero{grid-template-columns:1fr}
    .card{padding:26px 24px}
    h1{font-size:40px}
    h2{font-size:34px}
}

/* MOBILE: mostrar upload antes da explicação */
@media (max-width: 900px) {
    .upload-card {
        order: -1 !important;
    }
}

.safe-box {
    text-align: center !important;
}

.safe-title {
    display: block;
    text-align: center !important;
}

.safe-box p {
    text-align: center !important;
}

/* PREVIEW PAGE */
.preview-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 26px;
    align-items: start;
}

.preview-main h1 {
    font-size: 42px;
}

.file-list {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.file-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #FFFFFF;
}

.file-number {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--dark-blue));
    color: #FFFFFF;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.file-info strong {
    display: block;
    font-size: 15px;
    word-break: break-word;
}

.file-info span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.preview-frame {
    width: 100%;
    height: 470px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #FFFFFF;
}

.preview-note {
    color: var(--muted);
    font-size: 13px;
    margin: 12px 0 0;
}

.summary-box,
.price-box {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.summary-box div,
.price-box div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.summary-box span,
.price-box span {
    color: var(--muted);
    font-size: 14px;
}

.summary-box strong,
.price-box strong {
    color: var(--text);
    font-weight: 800;
    text-align: right;
}

.final-price strong {
    color: var(--blue);
    font-size: 24px;
}

.field-label {
    display: block;
    font-weight: 800;
    margin: 14px 0 8px;
}

input[type="number"],
input[type="text"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 15px 16px;
    font-size: 16px;
    outline: none;
    background: #FFFFFF;
}

#coupon {
    text-transform: uppercase;
}

.coupon-message {
    color: #0A9F5A;
    font-weight: 800;
    min-height: 22px;
}

.cancel-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: var(--dark-blue);
    font-weight: 700;
    text-decoration: none;
}

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

    .checkout-card {
        order: -1;
    }

    .preview-frame {
        height: 360px;
    }

    .preview-main h1 {
        font-size: 36px;
    }
}

.selected-files {
    display: none;
    gap: 10px;
    margin-top: 16px;
}

.selected-files-title {
    font-weight: 800;
    color: var(--dark-blue);
    font-size: 15px;
}

.selected-file-row {
    display: grid;
    grid-template-columns: 1fr 34px;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #FFFFFF;
}

.selected-file-row span {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    word-break: break-word;
}

.selected-file-row button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: #EEF5FA;
    color: var(--dark-blue);
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}

.selected-file-row button {
    background: #FEECEC !important;
    color: #DC2626 !important;
}

.selected-file-row button:hover {
    background: #FBD5D5 !important;
}

.btn-disabled {
    background: #C7D2DA !important;
    cursor: not-allowed !important;
    opacity: 0.75 !important;
    box-shadow: none !important;
}

/* PAYMENT PAGE */
.payment-layout {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    gap: 26px;
    align-items: start;
}

.pix-card h1 {
    font-size: 42px;
}

.qr-card {
    display: grid;
    place-items: center;
    margin: 22px 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #FFFFFF;
}

.qr-card img {
    width: 260px;
    max-width: 100%;
    height: auto;
}

.pix-textarea {
    width: 100%;
    min-height: 118px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    resize: vertical;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #FFFFFF;
    margin-bottom: 14px;
}

.copy-status {
    min-height: 22px;
    color: #0A9F5A;
    font-weight: 800;
    text-align: center;
    margin: 12px 0;
}

.payment-status {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(0, 163, 224, 0.10), rgba(0, 90, 156, 0.04));
    color: var(--dark-blue);
    text-align: center;
    font-weight: 800;
}

.payment-status-paid {
    background: rgba(10, 159, 90, 0.12);
    color: #0A9F5A;
}

.coupon-pill {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(10, 159, 90, 0.12);
    color: #0A9F5A;
    font-weight: 800;
    text-align: center;
}

.payment-files {
    margin-top: 18px;
}

.payment-files > strong {
    display: block;
    margin-bottom: 10px;
}

.payment-file-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.payment-file-row span {
    font-weight: 700;
    word-break: break-word;
}

.payment-file-row small {
    color: var(--muted);
    white-space: nowrap;
}

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

    .checkout-card {
        order: 2;
    }

    .pix-card {
        order: 1;
    }

    .pix-card h1 {
        font-size: 36px;
    }
}

.print-progress {
    margin: 26px 0;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(90deg, rgba(0,163,224,.10), rgba(0,90,156,.04));
    text-align: center;
}

.progress-ring {
    width: 88px;
    height: 88px;
    margin: 0 auto 14px;
    border-radius: 999px;
    border: 8px solid rgba(0,163,224,.18);
    border-top-color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-blue);
    font-size: 28px;
    font-weight: 800;
}

.print-progress strong {
    display: block;
    font-size: 18px;
    color: var(--dark-blue);
}

.print-progress p {
    margin: 8px 0 16px;
    color: var(--muted);
}

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(0,163,224,.14);
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--dark-blue));
    transition: width 1s linear;
}

.success-btn {
    margin-top: 28px !important;
}

.safe-box {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
}

@media (max-width: 900px) {

    .success-card {
        padding-bottom: 28px !important;
    }

    .success-btn {
        margin-top: 30px !important;
    }
}

/* SUCCESS MOBILE SPACING FIX */
.success-card .safe-box {
    margin-top: 24px !important;
    margin-bottom: 28px !important;
}

.success-btn {
    margin-top: 28px !important;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .success-card {
        padding-bottom: 32px !important;
    }

    .success-card .safe-box {
        margin-bottom: 30px !important;
    }

    .success-btn {
        margin-top: 32px !important;
    }
}

.success-btn {
    width: fit-content !important;
    min-width: 260px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.progress-complete {
    border-color: rgba(10,159,90,.22) !important;
    border-top-color: #0A9F5A !important;
    color: #0A9F5A !important;
    background: rgba(10,159,90,.08) !important;
}

.progress-complete span {
    font-size: 42px !important;
}

/* CENTRALIZACAO FINAL BOTAO SUCCESS */

.success-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.success-card .summary-box,
.success-card .safe-box,
.success-card .print-progress {
    width: 100% !important;
}

.success-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 320px !important;
    max-width: 100% !important;

    margin: 28px auto 0 auto !important;
}

/* CENTRALIZACAO FINAL BOTAO SUCCESS */
.success-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.success-card .summary-box,
.success-card .safe-box,
.success-card .print-progress {
    width: 100% !important;
}

.success-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 320px !important;
    max-width: 100% !important;
    margin: 28px auto 0 auto !important;
}
