:root {
    --bg: #edf2f7;
    --bg-soft: #f8fafc;
    --card: rgba(255, 255, 255, 0.9);
    --card-solid: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbe4ee;
    --primary: #0f766e;
    --primary-strong: #0b5f59;
    --primary-soft: #d8f2ee;
    --success: #198754;
    --success-soft: #dff5e8;
    --warning: #a16207;
    --warning-soft: #fff4d6;
    --danger: #b42318;
    --danger-soft: #fde7e7;
    --shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 25%),
        linear-gradient(180deg, #eff4fa 0%, #e9eef6 100%);
    color: var(--text);
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-shell {
    min-height: 100vh;
    padding: 18px 14px 34px;
    display: flex;
    justify-content: center;
}

.app {
    width: 100%;
    max-width: 430px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.app-header,
.card {
    background: var(--card);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.65);
    box-shadow: var(--shadow);
    border-radius: 10px;
}

.app-header {
    padding: 18px;
}

.brand-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.brand-icon {
    width: 58px;
    height: 58px;
    border-radius: 5px;
    background: linear-gradient(180deg, #13a08f 0%, #0f766e 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
    flex-shrink: 0;
}

.brand-text h1 {
    margin: 4px 0 6px;
    font-size: 31px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.brand-text p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e7f6f3;
    color: var(--primary);
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.header-btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-btn.primary {
    background: var(--primary);
    color: #fff;
}

.header-btn.secondary {
    background: #edf2f7;
    color: var(--text);
}

.card {
    padding: 18px;
}

.card-form {
    position: relative;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.section-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: #e7f6f3;
    border-radius: 999px;
    padding: 7px 10px;
    margin-bottom: 10px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.mini-status {
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.online-pill {
    background: #e7f6f3;
    color: var(--primary);
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.campo label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.campo input,
.campo textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 16px;
    padding: 15px 16px;
    font-size: 16px;
    outline: none;
    transition: .2s ease;
    color: var(--text);
}

.campo input:focus,
.campo textarea:focus {
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.10);
}

.money-wrap {
    position: relative;
}

.money-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.money-wrap input {
    padding-left: 48px;
}

.campo textarea {
    min-height: 110px;
    resize: none;
    line-height: 1.45;
}

.btn-main {
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 16px 18px;
    background: linear-gradient(180deg, #139686 0%, #0f766e 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(15, 118, 110, 0.22);
}

.btn-main:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.feedback {
    margin-top: 14px;
    padding: 14px 15px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
}

.feedback.success {
    background: var(--success-soft);
    color: var(--success);
}

.feedback.error {
    background: var(--danger-soft);
    color: var(--danger);
}

.resultado-topo {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.resultado-header-left h2 {
    margin: 10px 0 6px;
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.resultado-header-left p {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.resultado-header-right {
    max-width: 42%;
}

.meta-mini {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
}

.meta-mini span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.meta-mini strong {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-family: monospace;
}

.qr-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 14px;
}

.qr-card-head {
    margin-bottom: 14px;
}

.qr-card-head h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.qr-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.qr-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.acoes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 4px;
}

.secundario {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.meta-box {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px;
    min-width: 0;
}

.meta-box span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.meta-box strong {
    display: block;
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-family: monospace;
}

.popup-overlay,
.offline-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.popup-card,
.offline-card {
    width: 100%;
    max-width: 390px;
    background: var(--card-solid);
    border-radius: 28px;
    padding: 24px 20px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
    text-align: center;
    animation: popupShow .22s ease;
}

.popup-icone,
.offline-icone {
    font-size: 54px;
    line-height: 1;
    margin-bottom: 12px;
}

.popup-card h3,
.offline-card h3 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.popup-texto,
.offline-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.popup-info {
    text-align: left;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 18px;
}

.popup-info div + div {
    margin-top: 8px;
}

.popup-info span {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.btn-novo-pagamento {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 15px 16px;
    background: linear-gradient(180deg, #139686 0%, #0f766e 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(15, 118, 110, 0.20);
}

.instalar-wrap {
    display: contents;
}

.topo-acoes,
.btn-relatorio {
    display: inline-block;
}

.btn-relatorio {
    text-decoration: none;
    border-radius: 14px;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.popup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-whatsapp {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 15px 16px;
    background: #25d366;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(37, 211, 102, 0.20);
}