* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    background: #f2f4f7;
    color: #102a43;
}

a {
    color: #005f99;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #1f6f5e;
    color: #fff;
}

.container {
    max-width: 1000px;
    margin: 24px auto;
    padding: 0 16px;
    display: grid;
    gap: 16px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.08);
}

h1, h2 {
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    margin-bottom: 12px;
}

button,
.btn-secondary,
.btn-danger {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 700;
}

button {
    background: #ffcc00;
    color: #102a43;
}

.btn-secondary {
    background: #ffffff;
    color: #1f6f5e;
}

.btn-danger {
    background: #c53030;
    color: #fff;
}

.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid .full {
    grid-column: 1 / -1;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #e6edf4;
    text-align: left;
    vertical-align: top;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.auth-page,
.pix-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #4c8d76;
}

.auth-card,
.pix-card {
    width: min(92vw, 420px);
}

.pix-card {
    text-align: center;
    background: #1f6f5e;
    color: #fff;
}

.qr-image {
    width: 280px;
    height: 280px;
    max-width: 100%;
    border: 8px solid #fff;
    border-radius: 6px;
}

.muted {
    color: #627d98;
}

.pix-card .muted {
    color: #c6f6d5;
}

.small {
    font-size: 0.9rem;
}

.center {
    text-align: center;
}

.alert {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.alert.error {
    background: #fed7d7;
    color: #822727;
}

.alert.success {
    background: #c6f6d5;
    color: #22543d;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    min-width: 260px;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #fff;
    background: #1f6f5e;
    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.25);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #c53030;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    width: min(92vw, 420px);
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(16, 42, 67, 0.25);
}

.modal-card h3 {
    margin: 0 0 8px;
    color: #102a43;
}

.modal-card p {
    margin: 0 0 16px;
    color: #486581;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-btn {
    text-decoration: none;
}

@media (max-width: 800px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        min-width: auto;
        max-width: none;
    }
}
