.pix-payment-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1.5rem 3rem;
}

.pix-payment-page h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pix-payment-page .page-intro {
    color: #555;
    max-width: 720px;
    line-height: 1.6;
}

.notice {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.notice.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid rgba(133, 100, 4, 0.25);
}

.payment-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.qr-card,
.payment-details {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.payment-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-group label {
    font-weight: 600;
    color: #0f172a;
}

.field-group input {
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.field-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.schedule-warning {
    margin: 0;
    margin-top: 0.5rem;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #b45309;
    background: rgba(253, 230, 138, 0.35);
    border: 1px solid rgba(217, 119, 6, 0.25);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
}

.schedule-warning strong {
    font-weight: 700;
}

.field-error {
    margin: 0;
    font-size: 0.85rem;
    color: #b91c1c;
    font-weight: 600;
}

.auth-credentials {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.25rem;
}

.auth-session {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(22, 163, 74, 0.25);
    background: #ecfdf5;
}

.auth-session .secondary.small {
    align-self: flex-start;
}

.recover-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recover-panel label {
    font-weight: 600;
    color: #0f172a;
}

.recover-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.link-button {
    border: none;
    background: none;
    padding: 0;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover,
.link-button:focus {
    color: #1d4ed8;
}

.auth-warning {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #b45309;
    line-height: 1.5;
}

.auth-message {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: #0369a1;
}

.auth-message.error {
    color: #b91c1c;
    font-weight: 600;
}

.auth-status {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: #047857;
    font-weight: 600;
}

.schedule-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.schedule-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.schedule-selected {
    font-weight: 600;
    color: #0f172a;
}

.schedule-selected.has-selection {
    color: #047857;
}

.schedule-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1300;
}

.schedule-modal-overlay[hidden] {
    display: none !important;
}

.schedule-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 2rem 1rem;
    pointer-events: none;
    z-index: 1310;
}

#payment-schedule-modal.schedule-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    top: auto;
    left: auto;
    transform: none;
    padding: 2rem 1rem;
    max-height: none;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    pointer-events: none;
    color: inherit;
}

.schedule-modal[hidden] {
    display: none !important;
}

.schedule-modal__dialog {
    position: relative;
    width: min(960px, 92vw);
    max-height: min(78vh, calc(100vh - 4rem));
    background: #0f172a;
    border-radius: 1rem;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.schedule-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.2));
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.schedule-modal__header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #e0f2fe;
}

.schedule-modal__close {
    background: transparent;
    border: none;
    color: #e0f2fe;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 999px;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.schedule-modal__close:hover,
.schedule-modal__close:focus {
    background: rgba(14, 165, 233, 0.25);
    color: #ffffff;
    outline: none;
}

.schedule-modal__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem 0.5rem;
    color: #f8fafc;
}

.schedule-modal__controls .schedule-modal__range {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 600;
}

.schedule-modal__picker {
    margin-left: auto;
}

.schedule-modal__body {
    padding: 0 1.5rem 1.5rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.schedule-modal__footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.schedule-modal__footer .primary {
    min-width: 12rem;
}

.schedule-calendar {
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: inset 0 0 0 1px rgba(30, 64, 175, 0.15);
    padding: 1rem;
    overflow-x: auto;
}

.schedule-calendar .table-schedule {
    background: transparent;
    color: #f8fafc;
}

.schedule-calendar .table-schedule thead th {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(14, 165, 233, 0.85));
    border-color: rgba(255, 255, 255, 0.08);
}

.schedule-calendar .table-schedule td {
    min-height: 9rem;
    background: rgba(15, 23, 42, 0.2);
}

.schedule-slot {
    width: 100%;
    background: linear-gradient(160deg, rgba(129, 140, 248, 0.3), rgba(56, 189, 248, 0.25));
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.9rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

.schedule-slot:hover,
.schedule-slot:focus {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 18px 34px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    outline: none;
}

.schedule-slot.selected {
    border-color: #22c55e;
    box-shadow: 0 18px 34px rgba(34, 197, 94, 0.25);
    background: linear-gradient(160deg, rgba(34, 197, 94, 0.35), rgba(22, 163, 74, 0.35));
    color: #f0fdf4;
}

.schedule-slot__time {
    font-size: 1.1rem;
    font-weight: 700;
}

.schedule-slot__title {
    font-weight: 600;
}

.schedule-slot__description {
    font-size: 0.85rem;
    opacity: 0.85;
}

.schedule-empty {
    color: #94a3b8;
    text-align: center;
    font-size: 0.95rem;
}

.schedule-empty--cell {
    padding: 1rem 0.5rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.08);
}

.schedule-empty--message {
    margin-top: 1rem;
}

.schedule-feedback {
    margin: 0 1.5rem 1.5rem;
    min-height: 1.25rem;
    font-size: 0.95rem;
    color: #eab308;
}

.schedule-feedback.error {
    color: #f87171;
}

@media (max-width: 768px) {
    .schedule-modal__dialog {
        width: min(100%, 94vw);
        max-height: min(90vh, calc(100vh - 2.5rem));
        border-radius: 0.85rem;
    }

    .schedule-modal__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .schedule-modal__controls .schedule-modal__range {
        text-align: center;
    }

    .schedule-modal__picker {
        margin-left: 0;
    }

    .schedule-modal__footer {
        justify-content: center;
        width: 100%;
    }

    .schedule-modal__footer .primary {
        width: 100%;
    }
}

.primary.small,
.secondary.small {
    padding: 0.5rem 1.1rem;
    font-size: 0.95rem;
}

.qr-card h2,
.payment-details h2,
.instructions h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.qr-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border: 1px dashed rgba(100, 116, 139, 0.4);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(14, 165, 233, 0.06));
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.qr-container canvas,
.qr-container img {
    width: 100%;
    height: auto;
    max-width: 280px;
}

.qr-fallback {
    margin: 0;
    text-align: center;
    font-weight: 500;
    color: #1e293b;
}

.primary,
.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary {
    background: linear-gradient(120deg, #7c3aed, #1d4ed8);
    color: #fff;
    box-shadow: 0 12px 20px rgba(124, 58, 237, 0.25);
}

.primary:disabled {
    background: linear-gradient(120deg, #cbd5f5, #cbd5f5);
    box-shadow: none;
    cursor: not-allowed;
}

.primary:not(:disabled):hover,
.secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.25);
}

.secondary {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: none;
    padding: 0.6rem 1.25rem;
}

.secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.register-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1100;
}

.register-modal[hidden] {
    display: none !important;
}

.register-dialog {
    position: relative;
    max-width: 460px;
    width: 100%;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 25px 55px -20px rgba(0, 0, 0, 0.65);
    padding: 2rem 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    color: var(--color-white);
}

.register-dialog h2 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--color-white);
}

.close-modal {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
}

.register-dialog .field-group {
    gap: 0.75rem;
}

.register-dialog .field-group label {
    color: var(--color-white);
}

.register-dialog .field-group input {
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.75);
    color: var(--color-white);
    box-shadow: none;
}

.register-dialog .field-group input::placeholder {
    color: rgba(226, 232, 240, 0.75);
}

.register-dialog .field-group input:focus {
    outline: none;
    border-color: rgba(145, 70, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.25);
    background: rgba(15, 23, 42, 0.9);
}

.register-dialog .field-error {
    color: #fca5a5;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
    align-items: center;
}

.modal-actions .primary {
    margin-left: auto;
}

#register-feedback {
    margin-top: 0.25rem;
}

.details-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.details-list div {
    display: grid;
    gap: 0.2rem;
}

.details-list dt {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.details-list dd {
    margin: 0;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.status {
    margin-top: 1.5rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(250, 204, 21, 0.15);
    color: #92400e;
}

.status.success {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
}

.status.error {
    background: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
}

.status-actions {
    margin-top: 1rem;
}

.instructions {
    background: #0f172a;
    color: #f8fafc;
    border-radius: 1.25rem;
    padding: 2rem;
    display: grid;
    gap: 1rem;
}

.instructions ol {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.instructions li {
    line-height: 1.7;
}

.instructions .hint {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.85);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .pix-payment-page {
        padding: 1.5rem 1rem 2.5rem;
    }

    .qr-container {
        min-height: 240px;
    }
}
