body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    margin: 0;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
}

.navbar-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-title {
    font-weight: 600;
    font-size: 1.15rem;
}

.navbar-title img {
    height: 24px;
    margin-right: 0.5rem;
}

.navbar-title a {
    text-decoration: none;
    color: #374151;
}

.navbar-lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.navbar-lang-link {
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    border: 1px solid transparent;
    background: #f9fafb;
    text-decoration: none;
    color: #374151;
    transition: all 0.15s ease;
}

.navbar-lang-link:hover {
    background: #e5e7eb;
}

.navbar-lang-link.active {
    border-color: #4f46e5;
    background: #e0e7ff;
    color: #111827;
    font-weight: 600;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1 0 auto;
}

h1 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.currencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.currency-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.currency-card img {
    max-width: 164px;
    max-height: 64px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.currency-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.currency-balance {
    font-size: 0.875rem;
    color: #6b7280;
}

.exchange-box {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.section-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.currency-select-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.currency-select-btn {
    border-radius: 999px;
    border: 2px solid transparent;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.currency-select-btn img {
    width: 100px;
    height: 28px;
    margin-right: 0.5rem;
    object-fit: contain;
}

.currency-select-btn span {
    font-size: 0.9rem;
}

.currency-select-btn:hover {
    background: #eef2ff;
}

.currency-select-btn.selected {
    border-color: #4f46e5;
    background: #e0e7ff;
}

.amount-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    outline: none;
    box-sizing: border-box;
}

.amount-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px #4f46e5;
}

.result-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.result-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

.result-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.error-message {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #b91c1c;
}

.footer {
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.75rem 1.5rem;
    flex-shrink: 0;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer a {
    color: #4f46e5;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.exchange-button {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: #4f46e5;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.exchange-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.exchange-button:not(:disabled):hover {
    background: #4338ca;
}

.exchange-button:not(:disabled):active {
    transform: translateY(1px);
}

/* Modal */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 40;
}

.modal {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

.modal-title {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-text {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.modal-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.modal-summary-label {
    font-weight: 600;
    color: #4b5563;
}

.modal-summary-value span + span {
    margin-left: 0.35rem;
}

.modal-warning {
    font-size: 0.9rem;
    color: #b91c1c;
    margin-bottom: 1rem;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .modal-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.modal-field label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #4b5563;
}

.modal-field input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 0.4rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.modal-field input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px #4f46e5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-button {
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
}

.modal-button.secondary {
    background: #e5e7eb;
    color: #374151;
}

.modal-button.secondary:hover {
    background: #d1d5db;
}

.modal-button.primary {
    background: #4f46e5;
    color: white;
    font-weight: 600;
}

.modal-button.primary:hover {
    background: #4338ca;
}

.d-none {
    display: none;
}

.cuneros-otp-link {
    cursor: pointer;
}

.logo-full {
    max-width: 100%;
}
