/* Cálida y social. Opt-in only: never loaded by the administration area. */
body.user-app {
    --primary-color: #781e28;
    --secondary-color: #442d29;
    --accent-color: #b44f35;
    --success-color: #39734e;
    --warning-color: #a44c19;
    --light-bg: #f8f1e8;
    --dark-text: #382b28;
    --light-text: #77645b;
    --white: #fffdf9;
    --shadow: 0 5px 20px rgba(100, 62, 36, .07);
    --border-radius: 22px;
    background: #fbf7f0 !important;
    color: var(--dark-text);
    font-family: 'Segoe UI', ui-rounded, system-ui, sans-serif;
    accent-color: var(--primary-color);
}
.user-app :is(button, input, select, textarea) { font-family: inherit; }
.user-app :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid #923c23;
    outline-offset: 4px;
}
.user-app .header {
    background: #fffdf9;
    border-bottom: 1px solid #e9dcd0;
    box-shadow: none;
}
.user-app .logo { color: #681820; letter-spacing: -.6px; }
.user-app .nav-logo { border-radius: 12px; object-fit: contain; }
.user-app .nav-links a { color: #654e44; border-radius: 12px; }
.user-app .nav-links a:hover,
.user-app .nav-links a.nav-active { color: #781e28; background: #f7e5dc; }
.user-app :is(.card, .profile-section, .event-card, .album-card, .item-card, .maintenance-card, .group-card, .photo-item) {
    background: #fffdf9;
    border: 1px solid #e9dcd0;
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.user-app :is(.card-title, .event-title, .profile-info h2) { color: #681e24; letter-spacing: -.5px; }
.user-app .profile-info h2 { font-size: 1.5rem; font-weight: 750; line-height: 1.3; }
.user-app :is(.card-subtitle, .profile-info p) { color: #77645b; }
.user-app .card-header { border-color: #eee1d5; }
.user-app .form-control {
    background: #fffefa;
    color: #382b28;
    border: 1px solid #d7c4b5;
    border-radius: 13px;
    min-height: 46px;
}
.user-app .form-control:focus { border-color: #a2503d; box-shadow: 0 0 0 3px #b96d4d20; }
.user-app .btn { border-radius: 14px; min-height: 44px; font-weight: 650; }
.user-app .btn-primary { background: #781e28 !important; color: #fffdf9 !important; }
.user-app .btn-primary:hover { background: #60151d !important; }
.user-app .download-button,
.user-download .button { background: #781e28; color: #fffdf9; box-shadow: var(--shadow); border-radius: 14px; }
.user-download .container { max-width: 560px; margin: 20px; padding: 28px; background: #fffdf9; border: 1px solid #e9dcd0; border-radius: 24px; }
.user-download .button { display: inline-block; padding: 14px 24px; }
.user-app .btn-secondary { background: #ede0d3 !important; color: #553d32 !important; }
.user-app .btn-outline { border-color: #9e4837; color: #781e28; }
.user-app .btn-outline:hover { color: #fff; background: #781e28; }
.user-app .btn-success { background: #39734e; color: white; }
.user-app .btn-warning { background: #985019; color: white; }
.user-app .alert-success { background: #eaf2e6; color: #29523a; border-color: #39734e; }
.user-app .alert-error { background: #fbe3db; color: #842820; border-color: #b43d32; }
.user-app .alert-info { background: #f8ead7; color: #674429; border-color: #bf8142; }
.user-app .garage-header,
.user-app .album-cover { background: linear-gradient(130deg, #87313a, #b45d43); border-radius: 22px; }
.user-app .item-photo:not(img) { background: #f2ded0 !important; }
.user-app .add-new-card { background: #faf1e6; border: 2px dashed #cba78f; }
.user-app .stat-card { background: #7b202b; }
.user-app .roles-section { background: #f8f1e8; border-radius: 18px; }
.user-app .group-header { background: #f4e4d7; color: #681e24; }
.user-app .role-item { border-color: #eadccd; }
.user-app .modal-content:has(form) { background: #fffdf9; border-radius: 22px; }
/* The QR canvas, member credential artwork, photos and emergency colors stay intact. */
.user-app #dashboard-shortcuts { gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.user-app .dashboard-overview { padding: 0; background: transparent; border: 0; box-shadow: none; }
.user-app .dashboard-overview .profile-header {
    flex-direction: row; text-align: left; gap: 18px; padding: 24px;
    background: #fffdf9; border: 1px solid #e9dcd0; border-radius: 24px;
    margin-bottom: 24px; box-shadow: var(--shadow);
}
.user-app .dashboard-overview .profile-avatar { flex-shrink: 0; margin: 0; }
.user-app .dashboard-overview .profile-info { min-width: 0; }
.user-app #dashboard-shortcuts > :is(a, button) {
    position: relative; min-width: 0; min-height: 174px; padding: 22px 22px 44px;
    border: 1px solid #e9cdbb; border-radius: 24px; text-align: left;
    color: #54231f !important; box-shadow: none; transition: transform .18s, box-shadow .18s;
    background: #f4c3ab; text-decoration: none; overflow: hidden;
}
.user-app #dashboard-shortcuts > :is(a, button)::after {
    content: '›'; position: absolute; right: 14px; bottom: 12px;
    width: 28px; height: 28px; display: grid; place-items: center;
    border: 1px solid currentColor; border-radius: 50%; font: 25px/1 system-ui;
    opacity: .8;
}
.user-app #dashboard-shortcuts > :is(a, button):hover { transform: translateY(-3px); box-shadow: 0 8px 20px #6f382016; }
.user-app #dashboard-shortcuts > .shortcut-qr { background: #fbe0d5; }
.user-app #dashboard-shortcuts > .shortcut-events { background: #fbdbab; }
.user-app #dashboard-shortcuts > .shortcut-garage { background: #eadecf; }
.user-app #dashboard-shortcuts > a[href='#registered-events-section'] { background: #7b202b; color: #fff7ed !important; border-color: #7b202b; }
.user-app #dashboard-shortcuts > a[href='profile.php'] { background: #f3c5bc; }
.user-app #dashboard-shortcuts > a[href='#patches-section'] { background: #f1c078; }
.user-app #dashboard-shortcuts > button { background: #e9a279; }
.user-app #dashboard-shortcuts > :is(.shortcut-radio, a[href='coordination.php']) { background: #dce5cc; }
.user-app #dashboard-shortcuts > :is(a, button) > .absolute { display: none; }
.user-app #dashboard-shortcuts :is(.text-white, .text-amber-200, .text-gray-200, .text-emerald-100) { color: inherit; }
.user-app #dashboard-shortcuts h3 { font-style: normal; letter-spacing: 0; font-size: 1.05rem; }
.user-app #dashboard-shortcuts .stat-number { font-size: 2rem; margin-bottom: 6px; }
.user-app #dashboard-shortcuts .stat-label { font-size: 1rem; font-weight: 650; opacity: 1; }
.user-app #dashboard-shortcuts small { font-size: .84rem; line-height: 1.4; }
.user-app .dashboard-shortcut > span { font-size: 2.2rem; margin-bottom: 8px; }
.user-bottom-nav { display: none; }
/* Coordination has its own tab bar. Keep high-contrast SOS and live badges. */
.user-app.user-coordination { --bg: #fbf7f0; --panel: #fffdf9; --line: #e4d4c4; --muted: #756056; }
.user-coordination :is(.top, .tabs) { background: #f6e7d9; color: #54231f; }
.user-coordination .card { background: #fff8ef; }
.user-coordination .voice { background: #f1e2d3; }
.user-coordination :is(.person, .tabs button) { color: #54231f; }
.user-coordination .role { color: #8a3926; }
.user-coordination .big { background: #781e28; }
.user-coordination :is(.emergency-box, .alert, .badge, #connectedCount) { color: white; }
/* Riding mode uses a warm dark variant to preserve instrument contrast. */
.user-app.user-riding { background: #251b18 !important; color: #fff7ed; }
.user-riding .glass-panel { background: #35251eeF; border-color: #82533f; }
.user-riding .neon-text { text-shadow: 0 0 12px #d88d5240; }
.user-riding .neon-border { border-color: #c37350; box-shadow: 0 0 15px #c3735025; }
.user-riding [class*='bg-[#020617]'] { background-color: #251b18; }
.user-riding [class*='from-blue-900'] { background-image: linear-gradient(#573728, #251b18); }
.user-riding :is(.text-blue-500, .text-blue-400) { color: #f5bc89; }
.user-riding .font-hud { font-family: 'Segoe UI', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
@media (max-width: 768px) {
    .user-app .navbar { padding: 12px 16px; }
    .user-app .logo { font-size: 1.2rem; }
    .user-app .nav-links { background: #fffdf9; }
    .user-app .container { padding: 16px; }
    .user-app .dashboard-overview .profile-header { padding: 18px; gap: 14px; margin-bottom: 18px; }
    .user-app .dashboard-overview .profile-avatar { width: 64px; height: 64px; }
    .user-app .profile-info h2 { font-size: 1.25rem; line-height: 1.25; }
    .user-app .profile-info p { font-size: .8rem; }
    .user-app #dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .user-app #dashboard-shortcuts > :is(a, button) { min-height: 164px; padding: 16px 14px 44px; border-radius: 20px; }
    .user-app #dashboard-shortcuts :is(strong, h3, .stat-label) { font-size: .95rem; }
    .user-app #dashboard-shortcuts small { font-size: .78rem; }
    .user-app .dashboard-shortcut > span { font-size: 2rem; }
    .user-app .garage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-app.has-user-nav { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
    .user-bottom-nav {
        position: fixed; z-index: 900; bottom: 0; left: 0; right: 0;
        display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        background: #fffdf9; border-top: 1px solid #e6d5c4;
        box-shadow: 0 -4px 18px #6b3b2008;
    }
    .user-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; color: #77645b; text-decoration: none; font-size: .72rem; font-weight: 650; border-radius: 14px; }
    .user-bottom-nav a[aria-current] { color: #781e28; background: #f9eae0; }
    .user-bottom-nav svg { width: 24px; height: 24px; }
    .user-bottom-nav .user-nav-qr svg { background: #781e28; color: #fff; border-radius: 12px; box-sizing: content-box; padding: 6px; margin-top: -6px; }
}
@media (max-width: 360px) {
    .user-app .logo { font-size: 1rem; }
    .user-app .dashboard-overview .profile-header { padding: 12px; }
    .user-app .dashboard-overview .profile-avatar { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
    .user-app #dashboard-shortcuts > :is(a, button) { transition: none; }
    .user-app #dashboard-shortcuts > :is(a, button):hover { transform: none; }
}
@media print { .user-bottom-nav { display: none; } .user-app.has-user-nav { padding-bottom: 0; } }

/* Illustrated edition: artwork is separate from live text and user data. */
.user-app.has-user-nav .header .nav-toggle { display: none !important; }
.user-app .header .nav-brand { gap: 14px; }
.user-app .header .nav-logo { width: 64px; height: 64px; border-radius: 0; object-fit: contain; }
.user-app .header .logo { display: flex; flex-direction: column; align-items: flex-start; font-size: 1.5rem; font-weight: 800; line-height: 1.05; letter-spacing: -.65px; }
.user-app .user-header-bell { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; color: #453b35; border-radius: 50%; text-decoration: none; }
.user-app .user-header-bell:hover { background: #f4e9dd; }
.user-app .user-header-bell svg { width: 24px; height: 24px; }
.user-app .user-more-options { display: none; }
@media (max-width: 768px) {
    .user-app .header .navbar { min-height: 96px; padding: 14px 18px; }
    .user-app.has-user-nav .header .nav-links { display: none !important; }
    .user-app [id$="-section"] { scroll-margin-top: 112px; }
    .user-app .header .nav-logo { width: 58px; height: 58px; }
    .user-app .header .logo { font-size: 1.45rem; }
    .user-app .user-more-options { display: block; }
    .user-app .user-more-options nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
}
.user-app .dashboard-overview .profile-header {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) minmax(230px, 36%);
    gap: 20px;
}
.user-app .dashboard-overview .profile-avatar { width: 88px; height: 88px; overflow: hidden; }
.user-app .dashboard-overview .profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.user-app .member-bike-stack { min-width: 0; display: grid; gap: 10px; }
.user-app .member-bike {
    display: flex; align-items: center; gap: 14px; min-width: 0;
    padding: 10px 14px; background: #f6ede2; border: 1px solid #e8d7c5;
    border-radius: 18px; color: #542c23; text-decoration: none;
}
.user-app .member-bike-photo { width: 112px; height: 82px; object-fit: contain; border-radius: 12px; flex-shrink: 0; background: #fffaf3; }
.user-app .member-bike-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.user-app .member-bike-copy small { font-size: .72rem; color: #7a6050; }
.user-app .member-bike-copy strong { font-size: .95rem; line-height: 1.3; }
.user-app .member-bike-copy > span { font-size: .72rem; }
.user-app .next-event-promo {
    display: grid; gap: 8px; min-width: 0; padding: 10px 14px;
    color: #542c23; text-decoration: none; background: #fff5e8;
    border: 1px solid #e8d7c5; border-radius: 16px;
}
.user-app .next-event-promo-copy {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px;
    align-items: center; min-width: 0;
}
.user-app .next-event-promo-copy strong { overflow-wrap: break-word; font-size: .82rem; line-height: 1.3; }
.user-app .next-event-countdown { color: #7a6050; font-size: .72rem; }
.user-app .next-event-promo-copy b { grid-column: 2; grid-row: 1 / 3; font-size: 1.4rem; }
.user-app .next-event-track { height: 4px; overflow: hidden; background: #ead9c8; border-radius: 999px; }
.user-app .next-event-fill { display: block; width: 0; height: 100%; background: #781e28; border-radius: inherit; }
.user-app #dashboard-shortcuts > .dashboard-shortcut {
    display: flex; flex-direction: column; justify-content: center;
    padding: 24px 14px 44px 44%; min-height: 202px;
    background-image: radial-gradient(ellipse at 80% 10%, #fff6 0%, #fff0 75%);
    isolation: isolate;
}
.user-app #dashboard-shortcuts .shortcut-art {
    position: absolute; z-index: -1; pointer-events: none;
    left: -4%; bottom: 0; width: 49%; height: 98%;
    display: block; margin: 0; font-size: initial;
}
.user-app #dashboard-shortcuts .shortcut-art img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.user-app #dashboard-shortcuts .shortcut-copy { display: flex; flex-direction: column; gap: 9px; margin: 0; font-size: 1rem; line-height: 1.35; }
.user-app #dashboard-shortcuts .shortcut-copy strong { font-size: 1.08rem; font-weight: 750; letter-spacing: -.35px; }
.user-app #dashboard-shortcuts .shortcut-copy small { font-size: .86rem; line-height: 1.45; }
.user-app #dashboard-shortcuts .clipboard-count {
    position: absolute; top: 56%; left: 50%; transform: translate(-50%, -50%);
    font-size: clamp(20px, 3vw, 42px); font-weight: 800; line-height: 1;
    color: #3a2b22; text-align: center;
}
.user-app #dashboard-shortcuts > .shortcut-registered { background-color: #7b202b; }
.user-app #dashboard-shortcuts > .shortcut-collection { background-color: #edb369; }
.user-app #dashboard-shortcuts > .shortcut-rider { background-color: #e9976d; }
.user-app #dashboard-shortcuts > .shortcut-garage .shortcut-art { width: 51%; left: -6%; }
.user-app #dashboard-shortcuts > .shortcut-rider .shortcut-art { height: 96%; }
.user-app #dashboard-shortcuts > .shortcut-qr .shortcut-art { height: 94%; }
@media (max-width: 1000px) {
    .user-app .dashboard-overview .profile-header { grid-template-columns: 72px minmax(0, 1fr); }
    .user-app .member-bike-stack { grid-column: 1 / -1; width: 100%; }
    .user-app .dashboard-overview .profile-avatar { width: 72px; height: 72px; }
}
@media (max-width: 768px) {
    .user-app .dashboard-overview .profile-header { grid-template-columns: 64px minmax(0, 1fr); padding: 16px; gap: 13px; }
    .user-app .dashboard-overview .profile-avatar { width: 64px; height: 64px; }
    .user-app .member-bike { width: 100%; padding: 8px; gap: 12px; }
    .user-app .member-bike-photo { width: 98px; height: 64px; }
    .user-app #dashboard-shortcuts > .dashboard-shortcut { min-height: 174px; padding: 15px 8px 40px 42%; border-radius: 20px; }
    .user-app #dashboard-shortcuts .shortcut-copy { gap: 7px; }
    .user-app #dashboard-shortcuts .shortcut-copy strong { font-size: .9rem; line-height: 1.22; }
    .user-app #dashboard-shortcuts .shortcut-copy small { font-size: .73rem; line-height: 1.35; }
    .user-app #dashboard-shortcuts .shortcut-art { width: 46%; left: -3%; height: 96%; }
    .user-app #dashboard-shortcuts .clipboard-count { font-size: 24px; }
    .user-bottom-nav .user-nav-qr svg { border-radius: 50%; padding: 12px; margin-top: -17px; }
    .user-bottom-nav a[aria-current] { background: transparent; }
}
@media (max-width: 360px) {
    .user-app #dashboard-shortcuts > .dashboard-shortcut { min-height: 186px; padding-left: 38%; }
    .user-app #dashboard-shortcuts .shortcut-art { width: 41%; left: -4%; }
    .user-app #dashboard-shortcuts .shortcut-copy strong { font-size: .84rem; }
    .user-app #dashboard-shortcuts .shortcut-copy small { font-size: .7rem; }
}
