:root {
    /* Main colors */
    --revolut-dark: #13131A;
    --revolut-dark-secondary: #1E1E1E;
    --revolut-blue: #0666EB;
    --revolut-light-blue: #7CA5F8;
    --revolut-gray: #8E8E93;
    --revolut-light-gray: #AEAEB2;
    --revolut-green: #2FC952;
    --revolut-red: #FF3B30;
    
    /* App theme */
    --app-background: var(--revolut-dark);
    --text-color: #FFFFFF;
    --text-secondary: #8E8E93;
    --card-bg: #1E1E1E;
    --button-bg: #2C2C2E;
    --accent-color: var(--revolut-blue);
    --divider-color: #38383A;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
    
    /* Animations */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

html {
    height: -webkit-fill-available; /* Mobile Safari fix */
}

body {
    background-color: var(--app-background);
    color: var(--text-color);
    font-size: 16px;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Mobile Safari fix */
    width: 100%;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.app-container {
    max-width: 100%;
    height: 100%;
    flex: 1;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Pantalla de bloqueo PIN */
.lock-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding-top: 60px;
    background-color: var(--app-background);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lock-logo {
    width: 70px;
    height: 70px;
    margin-bottom: 30px;
    border-radius: var(--radius-md);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.lock-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lock-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 40px;
}

.lock-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.error-message {
    color: var(--revolut-red);
    font-size: 14px;
    margin-bottom: 20px;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.pin-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.pin-digit {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--divider-color);
    transition: background-color var(--transition-fast);
}

.pin-digit.filled {
    background-color: var(--text-color);
    transform: scale(1.1);
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 16px;
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
}

.pin-button {
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.pin-button:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.pin-button.special {
    background-color: transparent;
    font-size: 20px;
    color: var(--text-secondary);
}

.biometric-button {
    border: none;
    background-color: transparent;
    color: var(--revolut-blue);
    font-size: 16px;
    margin-top: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast);
}

.biometric-button:active {
    background-color: rgba(6, 102, 235, 0.1);
}

.biometric-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Home screen styling */
.home-screen, .payments-screen, .transaction-details-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background-color: var(--app-background);
    flex: 1;
    padding-bottom: 80px; /* Space for nav bar */
}

/* Search bar styling */
.search-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--app-background);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-input-container {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: var(--radius-full);
    padding: 12px 16px 12px 40px;
    color: white;
    font-size: 16px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 12px;
    margin-left: 12px;
}

.header-button, .action-icon-button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    font-size: 18px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.header-button:active, .action-icon-button:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

/* Balance section styling */
.balance-section {
    padding: 80px 16px 24px; /* Ajustado para evitar que se corte */
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(to bottom, #1a1a2e, #131320);
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.balance-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500"><path d="M0,100 Q125,50 250,100 T500,100 L500,500 L0,500 Z" fill="none" stroke="%230a4c95" stroke-width="1" opacity="0.2"/><path d="M0,150 Q125,100 250,150 T500,150 L500,500 L0,500 Z" fill="none" stroke="%2332a852" stroke-width="1" opacity="0.15"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.balance-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    z-index: 1;
}

/* Adjusted the balance amount size to be responsive */
.balance-amount {
    font-size: clamp(28px, 8vw, 40px);
    font-weight: 600;
    margin-bottom: 22px;
    z-index: 1;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
}

.account-button {
    background-color: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 24px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.account-button:active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(0.97);
}

/* User profile badge */
.user-profile-badge {
    position: absolute;
    top: 20px;
    right: 16px;
    z-index: 10;
}

.user-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-profile-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
}

/* Action buttons styling */
.action-buttons {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    background-color: var(--app-background);
    position: relative;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    color: white;
    gap: 8px;
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.action-button:active .action-icon {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.action-icon.add-money {
    color: white;
}

.action-icon.bizum {
    color: rgb(107, 204, 206);
}

.action-icon.move {
    color: rgb(118, 139, 212);
}

.action-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
    background-color: var(--app-background);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.view-all-button {
    background: transparent;
    border: none;
    color: var(--revolut-blue);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.view-all-button i {
    font-size: 12px;
}

/* Promotions section */
.promotions-section {
    padding: 0 16px;
    margin-bottom: 16px;
}

.promotion-card {
    background-color: #2c2c3a;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.promotion-content {
    flex: 1;
}

.promotion-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.promotion-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.promotion-image {
    width: 50px;
    display: flex;
    align-items: center;
}

.promotion-image img {
    max-width: 100%;
    height: auto;
}

.promotion-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: white;
    font-size: 12px;
    opacity: 0.7;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promotion-close:active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Transaction list styling - IMPROVED for better responsiveness */
.transaction-list, .transactions-list {
    padding: 0 16px;
}

.empty-transactions {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-illustration {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-secondary);
}

.empty-action-button {
    background-color: var(--revolut-blue);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.empty-action-button:active {
    background-color: #0557c5;
    transform: scale(0.97);
}

.transaction-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* IMPROVED: Transaction item layout */
.transaction-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 
        "avatar details amount";
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    position: relative;
    transition: background-color var(--transition-fast);
    column-gap: 14px;
}

.transaction-item:active {
    background-color: rgba(255, 255, 255, 0.05);
}

.transaction-avatar {
    position: relative;
    grid-area: avatar;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #1a1a2e;
    border: 2px solid var(--app-background);
    box-shadow: var(--shadow-sm);
}

/* IMPROVED: Transaction details with proper overflow handling */
.transaction-details {
    grid-area: details;
    min-width: 0; /* For text truncation */
    overflow: hidden;
}

.transaction-details h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.transaction-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.transaction-status i {
    margin-right: 6px;
    flex-shrink: 0;
}

.transaction-status .emoji {
    margin-left: 4px;
    flex-shrink: 0;
}

/* IMPROVED: Transaction info with proper spacing and size */
.transaction-info {
    grid-area: amount;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: max-content; /* Ensures amounts don't wrap */
    padding-left: 10px; /* Additional space to separate from transaction details */
    max-width: 40%; /* Limit maximum width */
}

.transaction-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.transaction-amount {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap; /* Prevent amount from wrapping */
}

.notification-badge {
    background-color: var(--revolut-blue);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
}

/* Navigation bar styling */
.nav-bar {
    display: flex;
    justify-content: space-around;
    padding: 14px 0 30px; /* Extra padding at bottom for iPhone home indicator */
    background-color: var(--app-background);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.nav-button.active {
    color: white;
}

.nav-icon {
    margin-bottom: 6px;
    font-size: 20px;
    opacity: 0.8;
    transition: transform var(--transition-fast);
}

.nav-button:active .nav-icon {
    transform: scale(0.9);
}

.nav-button.active .nav-icon {
    opacity: 1;
}

.nav-label {
    font-size: 12px;
}

/* Red dot indicator */
.indicator-dot {
    position: absolute;
    top: 4px;
    right: 28px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--revolut-red);
}

/* Utility classes */
.text-success {
    color: var(--revolut-green);
}

.text-danger {
    color: var(--revolut-red);
}

/* Bizum specific */
.bizum-contact-icon {
    color: #6bccce;
}

/* Alert messages */
.alert-success, .alert-danger {
    padding: 12px 16px;
    margin: 10px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background-color: rgba(47, 201, 82, 0.15);
    color: var(--revolut-green);
}

.alert-danger {
    background-color: rgba(255, 59, 48, 0.15);
    color: var(--revolut-red);
}

.alert-success i, .alert-danger i {
    margin-right: 8px;
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Animation for page transitions */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideInRight 0.3s forwards;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideInUp 0.3s forwards;
}

/* Modal para nueva transferencia - IMPROVED */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--app-background);
    z-index: 200;
    flex-direction: column;
    animation: slideInUp 0.3s forwards;
    overflow-y: auto; /* Allow scrolling in the modal */
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    background-color: var(--app-background);
    z-index: 10;
}

.back-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    margin-right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.back-button:active {
    background-color: rgba(255, 255, 255, 0.08);
}

.modal-title {
    font-size: 18px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    /* Prevent long titles from overflowing */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-content {
    padding: 16px 16px 100px; /* Extra padding at bottom to ensure content is visible above fixed elements */
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Forms for payments - IMPROVED */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.form-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: white;
    font-size: 16px;
    width: 100%;
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--revolut-blue);
    background-color: rgba(255, 255, 255, 0.12);
}

.form-field {
    margin-bottom: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}

.form-select {
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: white;
    font-size: 16px;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: all var(--transition-fast);
}

.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--revolut-blue);
    background-color: rgba(255, 255, 255, 0.12);
}

/* IMPROVED contact list for better scrolling and visibility */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    max-height: 300px; /* Increased height */
    overflow-y: auto;
    padding-right: 4px;
    /* Estilizar scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.contact-list::-webkit-scrollbar {
    width: 4px;
}

.contact-list::-webkit-scrollbar-track {
    background: transparent;
}

.contact-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.contact-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.08);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.contact-option:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.contact-option:active:before {
    opacity: 1;
}

.new-contact-option {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    margin-top: 4px;
}

.contact-option:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.99);
}

.contact-option input[type="radio"] {
    display: none;
}

.contact-option input[type="radio"]:checked + .contact-item {
    outline: 2px solid var(--revolut-blue);
    background-color: rgba(6, 102, 235, 0.08);
}

.contact-option input[type="radio"]:checked + .contact-item:after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--revolut-blue);
    font-weight: bold;
}

.contact-item {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: var(--radius-md);
    padding: 8px;
    position: relative;
}

.contact-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    margin-right: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.contact-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.contact-name {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* IMPROVED amount input for better display */
.amount-input {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.amount-input:focus-within {
    border-color: var(--revolut-blue);
    box-shadow: 0 0 0 2px rgba(6, 102, 235, 0.25);
    background-color: rgba(255, 255, 255, 0.12);
}

.amount-input span {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 500;
    padding-right: 8px;
    flex-shrink: 0;
}

.amount-input input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 8px;
    color: white;
    font-size: 20px;
    font-weight: 500;
    text-align: right;
    width: 100%;
    min-width: 0; /* Allows flex shrinking */
}

.amount-input input:focus {
    outline: none;
}

.balance-info {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.balance-info:before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--revolut-green);
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

/* Campo de mensaje */
textarea.form-control {
    resize: none;
    min-height: 80px;
    line-height: 1.4;
}

/* IMPROVED Emoji selector - more responsive */
.emoji-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 12px;
    margin-top: 8px;
    justify-content: space-between;
}

.emoji-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
    justify-self: center;
}

.emoji-option:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.92);
}

.emoji-option input[type="radio"] {
    display: none;
}

.emoji-option input[type="radio"]:checked + span {
    background-color: var(--revolut-blue);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(6, 102, 235, 0.4);
}

/* Botón de enviar */
.submit-button {
    background-color: var(--revolut-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.submit-button:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.submit-button:active:before {
    opacity: 1;
}

.submit-button:active {
    background-color: #0557c5;
    transform: scale(0.98);
}

.submit-button:disabled {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
}

.submit-button i {
    font-size: 18px;
}

/* IMPROVED: Search results with better structure */
.search-results {
    background-color: rgba(30, 30, 46, 0.95);
    border-radius: var(--radius-md);
    margin-top: 8px;
    max-height: 300px; /* Increased height */
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 50;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin-right: 12px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.search-result-name {
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Mejora de selección de tipo de transferencia */
.transfer-type-selector {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.transfer-type-option {
    flex: 1;
    padding: 14px 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.transfer-type-option:active {
    background-color: rgba(255, 255, 255, 0.12);
}

.transfer-type-option input[type="radio"] {
    display: none;
}

.transfer-type-option input[type="radio"]:checked + .transfer-type-content {
    border-color: var(--revolut-blue);
}

.transfer-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.transfer-icon {
    color: var(--revolut-blue);
}

.bizum-icon {
    color: #6bccce;
}

.transfer-type-label {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Separador con texto */
.separator {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.separator:before, .separator:after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

.separator-text {
    margin: 0 10px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Pantalla de pagos */
.payments-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background-color: var(--app-background);
    flex: 1;
    padding-bottom: 80px; /* Space for nav bar */
}

.payments-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--app-background);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.payments-title {
    font-size: 24px;
    font-weight: 600;
}

.payments-actions {
    display: flex;
    gap: 12px;
}

.action-icon-button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.action-icon-button:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.balance-summary {
    padding: 24px 16px;
    background: linear-gradient(to bottom, #1a1a2e, #151525);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.balance-summary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(6, 102, 235, 0.2), transparent 70%);
    opacity: 0.6;
    z-index: 0;
}

.balance-summary h2 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.balance-summary h3 {
    font-size: clamp(24px, 7vw, 32px);
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    word-break: break-word;
}

.card-section {
    padding: 0 16px 16px;
    background: linear-gradient(to bottom, #151525, var(--app-background));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.credit-card {
    background: linear-gradient(135deg, #1e1e2d 0%, #2d2d3d 100%);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.credit-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.1), transparent 70%);
    z-index: 0;
}

.card-image {
    width: 60px;
    height: auto;
    margin-right: 16px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.card-details {
    flex: 1;
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
}

.card-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-details p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-left: 10px;
}

.quick-actions {
    padding: 20px 16px;
    display: flex;
    gap: 16px;
    background-color: var(--app-background);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap; /* Allow wrapping on very small screens */
}

.quick-action-button {
    flex: 1;
    min-width: calc(50% - 16px); /* Ensure minimum width */
    background-color: #2C2C2E;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.quick-action-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.quick-action-button:active::before {
    opacity: 1;
}

.quick-action-button:active {
    background-color: #3A3A3C;
    transform: scale(0.98);
}

.quick-action-button i {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.section-title {
    padding: 16px 16px 8px;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* Transaction search results */
.search-results {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-top: 8px;
    max-height: 300px; /* Increased height */
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin-right: 12px;
    background-color: var(--revolut-blue);
    color: white;
    flex-shrink: 0;
}

.search-result-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Detalles de transacción */
.transaction-details-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background-color: var(--app-background);
    flex: 1;
    padding-bottom: 80px; /* Space for nav bar */
}

.screen-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: var(--app-background);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.screen-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-amount-header {
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(to bottom, #1a1a2e, #151525);
    position: relative;
    overflow: hidden;
}

.transaction-amount-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
    opacity: 0.4;
    z-index: 0;
}

.transaction-amount-header.outgoing::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 59, 48, 0.15), transparent 70%);
    z-index: 0;
}

.transaction-amount-header.incoming::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(47, 201, 82, 0.15), transparent 70%);
    z-index: 0;
}

.transaction-big-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.outgoing .transaction-big-icon {
    color: var(--revolut-red);
}

.incoming .transaction-big-icon {
    color: var(--revolut-green);
}

.bizum-icon {
    color: #6bccce;
}

.transaction-big-amount {
    font-size: clamp(28px, 8vw, 38px);
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    word-break: break-word;
    line-height: 1.2;
}

.outgoing .transaction-big-amount {
    color: var(--revolut-red);
}

.incoming .transaction-big-amount {
    color: var(--revolut-green);
}

.transaction-status-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.emoji-big {
    font-size: 22px;
    margin-left: 6px;
    position: relative;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.transaction-date-full {
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.details-card {
    margin: 16px;
    background-color: #1e1e2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.details-row {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.details-row:last-child {
    border-bottom: none;
}

.details-label {
    color: var(--text-secondary);
    font-size: 15px;
    flex-shrink: 0;
    padding-right: 12px;
}

.details-value {
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.details-value.with-avatar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.details-avatar, .details-avatar-initial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.details-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background-color: var(--revolut-blue);
}

.status-completed {
    color: var(--revolut-green);
    display: flex;
    align-items: center;
}

.status-completed::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--revolut-green);
    margin-right: 6px;
    flex-shrink: 0;
}

.status-pending {
    color: var(--revolut-light-blue);
    display: flex;
    align-items: center;
}

.status-pending::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--revolut-light-blue);
    margin-right: 6px;
    flex-shrink: 0;
}

.status-rejected {
    color: var(--revolut-red);
    display: flex;
    align-items: center;
}

.status-rejected::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--revolut-red);
    margin-right: 6px;
    flex-shrink: 0;
}

.transaction-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wide-button {
    width: 100%;
    background-color: var(--revolut-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(6, 102, 235, 0.3);
}

.wide-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    transform: translateX(-100%);
    transition: transform 1.5s ease;
}

.wide-button:active::before {
    transform: translateX(100%);
}

.wide-button.secondary {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.wide-button:active {
    transform: scale(0.98);
}

.wide-button i {
    font-size: 18px;
}

/* Responsive improvements */
@media (min-width: 768px) {
    /* Center app in larger screens to simulate phone */
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #000000;
        height: 100vh;
        padding: 20px;
    }
    
    .app-container {
        max-width: 390px;
        height: 90vh;
        max-height: 844px;
        border-radius: 32px;
        overflow: hidden;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        border: 10px solid #000000;
    }
    
    .home-screen, .payments-screen, .transaction-details-screen {
        border-radius: 22px 22px 0 0;
    }
    
    .nav-bar {
        border-radius: 0 0 22px 22px;
    }
}

/* Hover effects (only on desktop) */
@media (hover: hover) {
    .pin-button:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
    
    .header-button:hover, .action-icon-button:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
    
    .account-button:hover {
        background-color: rgba(255, 255, 255, 0.18);
    }
    
    .action-icon:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
    
    .empty-action-button:hover {
        background-color: #0557c5;
    }
    
    .nav-button:hover {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .transaction-item:hover {
        background-color: rgba(255, 255, 255, 0.03);
    }
    
    .search-result-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .emoji-option:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
    
    .submit-button:hover:not(:disabled) {
        background-color: #0557c5;
    }
    
    .wide-button:hover {
        opacity: 0.95;
    }
    
    .wide-button.secondary:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
    
    .quick-action-button:hover {
        background-color: #3A3A3C;
    }
}

/* Estilos para PWA */
.pwa-install-banner {
  animation: slideUp 0.3s ease-out;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: relative;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Mejoras para pantalla completa en modo app */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  .app-container {
    height: 100vh;
    height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  
  .nav-bar {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Mejora para la pantalla de splash y app icon */
.lock-logo img {
  border-radius: 22px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Mejoras visuales generales */
.pin-button:active, 
.action-button:active, 
.submit-button:active {
  transform: scale(0.95);
  transition: transform 0.1s;
}

/* NUEVAS MEJORAS ADICIONALES */

/* Fix para el problema de superposición de cantidades en la lista de transacciones */
/* Este es el principal problema que se ve en la imagen */
.transaction-item {
  position: relative;
}

/* Mejorar formato transacciones en el home */
.transaction-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Fix para espaciamiento correcto en transacciones */
.transaction-status {
  max-width: calc(100% - 20px); /* Restamos espacio para el emoji */
}

/* Mejora en soporte para pantallas muy pequeñas */
@media (max-width: 330px) {
  .action-buttons {
    gap: 4px;
    padding: 16px 0;
  }
  
  .action-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .action-label {
    font-size: 12px;
  }
  
  .transaction-info {
    min-width: max-content;
    max-width: 35%;
  }
  
  .transaction-details h3 {
    font-size: 15px;
  }
  
  .transaction-status {
    font-size: 13px;
  }
  
  .balance-amount {
    font-size: clamp(22px, 6vw, 32px);
  }
}

/* Especificamente para el modal de transferencia */
.modal-content .contact-option {
  width: 100%;
}

.modal-content .contact-name,
.modal-content .contact-detail {
  max-width: 85%; /* Evita superposición con el check */
}

/* Fix para tamaños extremos (iPhone SE y similares) */
@media (max-width: 360px) {
  .pin-pad {
    width: 90%;
  }
  
  .pin-button {
    width: 60px;
    height: 60px;
  }
  
  .quick-actions {
    flex-direction: column;
  }
  
  .quick-action-button {
    width: 100%;
  }
  
  .emoji-select {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }
  
  .emoji-option {
    width: 40px;
    height: 40px;
  }
  
  .emoji-option input[type="radio"]:checked + span {
    width: 36px;
    height: 36px;
  }
}

/* Mejora para los botones principales */ 
.account-button {
  white-space: nowrap;
}

/* Optimización para cantidades grandes (como en la imagen) */
.balance-amount,
.transaction-big-amount {
  max-width: 100%;
  text-align: center;
}

/* Mejoras en el manejo de texto para montos grandes de transacciones */
.transaction-amount {
  word-break: keep-all;
  font-variant-numeric: tabular-nums; /* Mejora alineación de números */
}

/* Específicamente para los textos que se sobreponen en la imagen */
.transaction-status {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Mejora formato de contenedor de cantidades en transacciones */
.transaction-info {
  margin-left: auto;
}
