* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.card.large {
    max-width: 600px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

h1 {
    color: #1f2937;
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.header h1 {
    margin-bottom: 0;
    text-align: left;
}

.subtitle {
    color: #6b7280;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

small {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-top: 5px;
}

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-logout {
    padding: 8px 16px;
    background: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #fecaca;
}

.btn-loading {
    display: inline-block;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.success {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.settings-link {
    text-align: center;
    margin-top: 20px;
}

.settings-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.settings-link a:hover {
    text-decoration: underline;
}

/* Success page styles */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.amount-display {
    text-align: center;
    margin: 20px 0 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.amount-label {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 5px;
}

.amount-value {
    display: block;
    color: #1f2937;
    font-size: 32px;
    font-weight: bold;
}

.qrcode-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

#qrcodeDiv canvas {
    border-radius: 8px;
}

.pix-code-container {
    margin: 25px 0;
    text-align: left;
}

.pix-code-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.code-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#pixCode {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-family: monospace;
    font-size: 0.85rem;
    resize: none;
    color: #334155;
    word-break: break-all;
}

.btn-copy {
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #5568d3;
}

.instructions {
    background: #f0f9ff;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #667eea;
}

.instructions h3 {
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 15px;
}

.instructions ol {
    margin-left: 20px;
    color: #374151;
}

.instructions li {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .amount-value {
        font-size: 28px;
    }

    .code-wrapper {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }
}