:root {
    --bg-app: #f2f2f7; /* Gris Apple */
    --card-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #8e8e93;
    --accent: #007aff; /* Azul iOS */
    --success-bg: #e4fbf0;
    --success-text: #0d8a4e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    margin: 0; padding: 20px;
    -webkit-font-smoothing: antialiased; /* Texto nítido en iPhone */
}

.container { max-width: 600px; margin: 0 auto; padding-bottom: 80px; }

/* CABECERA */
.app-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; padding: 0 4px;
}
.app-header h1 { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.badge { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.btn-secondary {
    background: rgba(118, 118, 128, 0.12); color: var(--accent);
    border: none; padding: 8px 16px; border-radius: 40px;
    font-weight: 600; cursor: pointer;
}

/* SMART ASSET CARD (El nuevo ticket) */
.asset-card {
    background: var(--card-bg);
    border-radius: 16px; /* Bordes muy redondeados */
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); /* Sombra sutil */
    display: flex; align-items: center; justify-content: space-between;
    transition: transform 0.1s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.asset-card:active { transform: scale(0.98); background: #f9f9f9; }

.card-left { display: flex; align-items: center; gap: 14px; }

/* Icono Circular */
.brand-icon {
    width: 48px; height: 48px;
    background-color: #eef2ff; color: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}

.ticket-info h3 {
    margin: 0; font-size: 16px; font-weight: 600; color: #1c1c1e;
    line-height: 1.2;
}
.ticket-info p {
    margin: 4px 0 0 0; font-size: 13px; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}

.card-right { text-align: right; }
.price-tag { font-size: 15px; font-weight: 700; color: #1c1c1e; margin-bottom: 4px; }
.date-badge {
    display: inline-block; padding: 4px 8px;
    background: var(--success-bg); color: var(--success-text);
    border-radius: 6px; font-size: 11px; font-weight: 600;
}

/* CATEGORY BADGES */
.category-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: 6px;
    font-size: 11px; font-weight: 600;
    background: #f2f2f7; color: #8e8e93;
    margin-right: 6px;
}

/* BOTÓN FLOTANTE (+) */
.fab-btn {
    position: fixed; bottom: 24px; right: 24px;
    width: 60px; height: 60px;
    background: var(--accent); color: white;
    border-radius: 50%; border: none;
    font-size: 32px; cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3); /* Sombra azul brillante */
    display: flex; align-items: center; justify-content: center;
    z-index: 100; transition: transform 0.2s;
}
.fab-btn:active { transform: scale(0.90); }

/* LOGIN */
.login-card {
    background: white; padding: 40px 30px; border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); text-align: center;
    width: 100%; max-width: 340px;
}
.input-field {
    width: 100%; padding: 16px; margin: 16px 0;
    border: 1px solid #e5e5ea; border-radius: 12px;
    font-size: 16px; background: #f9f9f9; outline: none;
}
select.input-field {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007AFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 12px auto;
}
.input-field:focus { border-color: var(--accent); background: white; }
.btn-primary {
    background: var(--accent); color: white; width: 100%;
    padding: 16px; border-radius: 14px; border: none;
    font-size: 16px; font-weight: 600; cursor: pointer;
}

.hidden { display: none !important; }
.center-screen { display: flex; justify-content: center; align-items: center; height: 100vh; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 200; backdrop-filter: blur(5px); }
.spinner { border: 3px solid #eee; border-top: 3px solid var(--accent); border-radius: 50%; width: 30px; height: 30px; animation: spin 0.8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- DASHBOARD SUMMARY (Tarjeta de Totales) --- */
.dashboard-summary {
    background: linear-gradient(135deg, #007aff 0%, #005ecb 100%); /* Azul Apple degradado */
    color: white;
    border-radius: 22px;
    padding: 28px 20px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(0, 122, 255, 0.25);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Un brillo sutil de fondo */
.dashboard-summary::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.dashboard-summary h2 {
    margin: 0; font-size: 13px; opacity: 0.8; 
    text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600;
}

.total-amount {
    font-size: 46px; font-weight: 800; margin: 12px 0; 
    letter-spacing: -1px; line-height: 1;
}

.summary-footer {
    display: flex; justify-content: center; gap: 10px; margin-top: 16px;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 500;
    display: flex; align-items: center; gap: 6px;
    backdrop-filter: blur(5px);
}