/* =========================================================
   Gestión Vehículos — Public CSS  v2.0
   Dephant © 2025
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Barlow+Condensed:wght@700;900&display=swap');

:root {
    --vm-primary:    #E63946;
    --vm-secondary:  #1D3557;
    --vm-accent:     #457B9D;
    --vm-bg:         #F0F4F8;
    --vm-surface:    #ffffff;
    --vm-border:     #E2E8F0;
    --vm-text:       #1A202C;
    --vm-muted:      #718096;
    --vm-radius-sm:  8px;
    --vm-radius:     14px;
    --vm-radius-lg:  20px;
    --vm-shadow-sm:  0 1px 4px rgba(0,0,0,.08);
    --vm-shadow:     0 4px 20px rgba(29,53,87,.10);
    --vm-shadow-lg:  0 12px 40px rgba(29,53,87,.18);
    --vm-trans:      0.22s cubic-bezier(.4,0,.2,1);
    --vm-primary-10: rgba(230,57,70,.10);
    --vm-primary-20: rgba(230,57,70,.20);
}

.vm-app, .vm-app * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.vm-app { color: var(--vm-text); }

/* ===================== AUTH ===================== */
.vm-auth-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; background: var(--vm-bg); padding: 24px 16px; }

.vm-auth-card { background: var(--vm-surface); border-radius: var(--vm-radius-lg); box-shadow: var(--vm-shadow-lg); width: 100%; max-width: 420px; overflow: hidden; animation: vmSlideUp .4s cubic-bezier(.22,1,.36,1) both; }

.vm-auth-header { background: var(--vm-secondary); padding: 36px 32px 28px; text-align: center; position: relative; overflow: hidden; }
.vm-auth-header::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(230,57,70,.18) 0%, transparent 60%); pointer-events: none; }

.vm-auth-header img.vm-logo { max-height: 68px; max-width: 200px; margin: 0 auto 14px; object-fit: contain; display: block; position: relative; }
.vm-auth-header h2 { color: #fff; font-family: 'Barlow Condensed', sans-serif; font-size: 1.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; position: relative; }
.vm-auth-tagline { color: rgba(255,255,255,.55); font-size: .78rem; margin-top: 4px; position: relative; }

.vm-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--vm-border); background: #fafbfc; }
.vm-auth-tab { padding: 14px; text-align: center; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .7px; cursor: pointer; color: var(--vm-muted); border: none; background: none; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: all var(--vm-trans); }
.vm-auth-tab.active { color: var(--vm-primary); border-bottom-color: var(--vm-primary); background: var(--vm-surface); }

.vm-auth-panel { display: none; }
.vm-auth-panel.active { display: block; animation: vmFadeIn .2s ease; }
.vm-auth-body { padding: 28px 32px 32px; }

/* ===================== FORMS ===================== */
.vm-form-group { margin-bottom: 16px; }
.vm-form-group label { display: block; font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .6px; color: var(--vm-secondary); margin-bottom: 6px; }
.vm-form-group input, .vm-form-group select, .vm-form-group textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--vm-border); border-radius: var(--vm-radius-sm); font-size: .94rem; font-family: 'Inter', sans-serif; color: var(--vm-text); background: var(--vm-surface); transition: border-color var(--vm-trans), box-shadow var(--vm-trans); appearance: none; -webkit-appearance: none; }
.vm-form-group input:focus, .vm-form-group select:focus, .vm-form-group textarea:focus { outline: none; border-color: var(--vm-primary); box-shadow: 0 0 0 3px var(--vm-primary-10); }
.vm-form-group input::placeholder { color: #b0bec5; }
.vm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===================== BUTTONS ===================== */
.vm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--vm-radius-sm); font-family: 'Inter', sans-serif; font-weight: 700; font-size: .88rem; letter-spacing: .2px; cursor: pointer; border: none; transition: all var(--vm-trans); white-space: nowrap; }
.vm-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }
.vm-btn-primary { background: var(--vm-primary); color: #fff; width: 100%; box-shadow: 0 2px 8px var(--vm-primary-20); }
.vm-btn-primary:hover:not(:disabled) { background: #c0303b; transform: translateY(-1px); box-shadow: 0 6px 16px var(--vm-primary-20); }
.vm-btn-secondary { background: var(--vm-secondary); color: #fff; }
.vm-btn-secondary:hover:not(:disabled) { opacity: .88; }
.vm-btn-ghost { background: transparent; color: var(--vm-muted); border: 1.5px solid var(--vm-border); }
.vm-btn-ghost:hover:not(:disabled) { background: var(--vm-bg); color: var(--vm-text); }
.vm-btn-danger { background: #EF4444; color: #fff; }
.vm-btn-danger:hover:not(:disabled) { background: #dc2626; }
.vm-btn-sm { padding: 8px 16px; font-size: .8rem; }
.vm-btn-xs { padding: 5px 10px; font-size: .74rem; }

/* ===================== MESSAGES ===================== */
.vm-error-msg { background: #FFF5F5; border: 1px solid #FED7D7; color: #C53030; padding: 11px 14px; border-radius: var(--vm-radius-sm); font-size: .86rem; margin-bottom: 16px; }
.vm-success-msg { background: #F0FFF4; border: 1px solid #C6F6D5; color: #276749; padding: 11px 14px; border-radius: var(--vm-radius-sm); font-size: .86rem; margin-bottom: 16px; }

/* ===================== DASHBOARD ===================== */
.vm-dashboard-wrap { background: var(--vm-bg); min-height: 100vh; }

/* Top Nav */
.vm-topnav { background: var(--vm-secondary); position: sticky; top: 0; z-index: 100; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 58px; box-shadow: 0 2px 12px rgba(29,53,87,.3); }
.vm-topnav-brand { display: flex; align-items: center; gap: 12px; }
.vm-topnav-brand img { max-height: 34px; object-fit: contain; }
.vm-brand-name { font-family: 'Barlow Condensed', sans-serif; font-size: 1.1rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: #fff; }
.vm-topnav-right { display: flex; align-items: center; gap: 12px; }
.vm-topnav-user { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.75); font-size: .82rem; font-weight: 500; }
.vm-topnav-avatar { width: 32px; height: 32px; background: var(--vm-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .78rem; color: #fff; flex-shrink: 0; }
.vm-topnav .vm-btn-ghost { border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.8); font-size: .8rem; padding: 7px 14px; }
.vm-topnav .vm-btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }

.vm-dashboard-body { max-width: 960px; margin: 0 auto; padding: 24px 16px 80px; }

/* Alerts */
.vm-alerts { margin-bottom: 16px; }
.vm-alert { display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px; border-radius: var(--vm-radius-sm); margin-bottom: 10px; border: 1px solid transparent; animation: vmSlideUp .3s ease both; }
.vm-alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.vm-alert-danger { background: #FFF5F5; border-color: #FED7D7; color: #7F1D1D; }
.vm-alert-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }
.vm-alert strong { display: block; font-weight: 700; font-size: .87rem; margin-bottom: 2px; }
.vm-alert span { font-size: .82rem; line-height: 1.5; }

/* Vehicle Card */
.vm-vehicle-card { background: linear-gradient(135deg, var(--vm-secondary) 0%, #2a4a72 100%); border-radius: var(--vm-radius); padding: 20px 24px; margin-bottom: 16px; display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden; box-shadow: var(--vm-shadow); }
.vm-vehicle-card::after { content: '🚗'; position: absolute; right: 16px; bottom: -10px; font-size: 5rem; opacity: .08; pointer-events: none; }
.vm-vehicle-icon { font-size: 2.4rem; flex-shrink: 0; }
.vm-vehicle-info { flex: 1; min-width: 0; }
.vm-vehicle-info h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.25rem; font-weight: 900; text-transform: uppercase; letter-spacing: .8px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vm-vehicle-info p { color: rgba(255,255,255,.6); font-size: .8rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vm-patente { background: #fff; color: var(--vm-secondary); font-family: 'Barlow Condensed', sans-serif; font-size: 1.3rem; font-weight: 900; padding: 8px 14px; border-radius: var(--vm-radius-sm); letter-spacing: 2px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* Stats Row */
.vm-stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.vm-stat { background: var(--vm-surface); border-radius: var(--vm-radius); padding: 16px; text-align: center; box-shadow: var(--vm-shadow-sm); border: 1px solid var(--vm-border); }
.vm-stat-num { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; font-weight: 900; color: var(--vm-primary); line-height: 1; display: block; }
.vm-stat-label { color: var(--vm-muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; display: block; }

/* Tabs */
.vm-tabs { display: flex; background: var(--vm-surface); border-radius: var(--vm-radius-sm); padding: 4px; margin-bottom: 16px; box-shadow: var(--vm-shadow-sm); border: 1px solid var(--vm-border); gap: 3px; }
.vm-tab-btn { flex: 1; padding: 9px 12px; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; cursor: pointer; color: var(--vm-muted); background: none; border: none; border-radius: 6px; transition: all var(--vm-trans); }
.vm-tab-btn.active { background: var(--vm-primary); color: #fff; box-shadow: 0 2px 8px var(--vm-primary-20); }
.vm-tab-panel { display: none; }
.vm-tab-panel.active { display: block; animation: vmFadeIn .2s ease; }

/* Cards */
.vm-card { background: var(--vm-surface); border-radius: var(--vm-radius); box-shadow: var(--vm-shadow-sm); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--vm-border); }
.vm-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--vm-border); }
.vm-card-header h2 { font-weight: 700; font-size: .95rem; color: var(--vm-secondary); display: flex; align-items: center; gap: 8px; }
.vm-card-body { padding: 16px 20px; }

/* Service Items */
.vm-service-list { display: flex; flex-direction: column; gap: 10px; }
.vm-service-item { background: var(--vm-bg); border-radius: var(--vm-radius-sm); padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--vm-border); transition: box-shadow var(--vm-trans), border-color var(--vm-trans); }
.vm-service-item:hover { box-shadow: var(--vm-shadow); border-color: #cbd5e0; }
.vm-service-icon-wrap { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.vm-service-icon-wrap.oil   { background: #FEF9C3; }
.vm-service-icon-wrap.tires { background: #DBEAFE; }
.vm-service-info { flex: 1; min-width: 0; }
.vm-service-title { font-weight: 700; font-size: .9rem; color: var(--vm-text); }
.vm-service-meta { color: var(--vm-muted); font-size: .77rem; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 10px; }
.vm-service-meta span { display: flex; align-items: center; gap: 3px; }
.vm-service-extra { font-size: .77rem; color: var(--vm-accent); font-weight: 600; margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }
.vm-service-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.vm-svc-del { background: none; border: none; color: #CBD5E0; cursor: pointer; font-size: .95rem; padding: 4px 6px; border-radius: 5px; transition: color var(--vm-trans), background var(--vm-trans); line-height: 1; }
.vm-svc-del:hover { color: #EF4444; background: #FEE2E2; }

/* Badges */
.vm-badge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; border-radius: 20px; font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.vm-badge-oil   { background: #FEF9C3; color: #854D0E; }
.vm-badge-tires { background: #DBEAFE; color: #1D4ED8; }
.vm-badge-ok    { background: #DCFCE7; color: #15803D; }
.vm-badge-warn  { background: #FEF9C3; color: #92400E; }
.vm-badge-exp   { background: #FEE2E2; color: #991B1B; }

/* Profile */
.vm-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Empty */
.vm-empty { text-align: center; padding: 48px 20px; color: var(--vm-muted); }
.vm-empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.vm-empty p { font-size: .9rem; }
.vm-empty .vm-btn { margin-top: 18px; width: auto; }

/* Modal */
.vm-modal-overlay { position: fixed; inset: 0; background: rgba(10,20,40,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 9999; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: vmFadeIn .2s ease; }
.vm-modal { background: var(--vm-surface); border-radius: var(--vm-radius-lg) var(--vm-radius-lg) 0 0; box-shadow: var(--vm-shadow-lg); width: 100%; max-width: 480px; animation: vmSheetUp .32s cubic-bezier(.22,1,.36,1) both; max-height: 92vh; overflow-y: auto; }
.vm-modal-handle { width: 36px; height: 4px; background: var(--vm-border); border-radius: 2px; margin: 12px auto 0; display: block; }
.vm-modal-header { padding: 16px 20px 14px; border-bottom: 1px solid var(--vm-border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--vm-surface); z-index: 1; }
.vm-modal-header h3 { font-weight: 800; font-size: 1rem; color: var(--vm-secondary); }
.vm-modal-close { background: var(--vm-bg); border: none; font-size: .95rem; cursor: pointer; color: var(--vm-muted); padding: 6px 9px; border-radius: 6px; transition: all var(--vm-trans); line-height: 1; }
.vm-modal-close:hover { background: var(--vm-border); color: var(--vm-text); }
.vm-modal-body { padding: 20px; }

/* Dynamic extra fields */
.vm-extra-fields { border-top: 1px dashed var(--vm-border); margin-top: 4px; padding-top: 14px; display: none; animation: vmFadeIn .2s ease; }
.vm-extra-fields.visible { display: block; }
.vm-extra-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--vm-accent); margin-bottom: 12px; display: block; }

/* Spinner */
.vm-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: vmSpin .7s linear infinite; }

/* Animations */
@keyframes vmSlideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vmSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes vmFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes vmSpin    { to { transform: rotate(360deg); } }

/* Responsive */
@media (min-width: 600px) {
    .vm-modal-overlay { align-items: center; padding: 20px; }
    .vm-modal { border-radius: var(--vm-radius-lg); animation: vmSlideUp .3s cubic-bezier(.22,1,.36,1) both; max-height: 85vh; }
    .vm-modal-handle { display: none; }
}
@media (max-width: 600px) {
    .vm-stats-row { gap: 8px; }
    .vm-stat { padding: 14px 8px; }
    .vm-stat-num { font-size: 1.6rem; }
    .vm-vehicle-card { flex-wrap: wrap; }
    .vm-patente { margin-left: 0; }
    .vm-auth-body { padding: 20px 20px 28px; }
    .vm-profile-grid { grid-template-columns: 1fr; }
    .vm-form-row { grid-template-columns: 1fr; }
    .vm-dashboard-body { padding: 16px 12px 80px; }
    .vm-topnav-user span { display: none; }
}
/* Generic service type icon */
.vm-service-icon-wrap.generic { background: #F3E8FF; }
/* Push button active state */
#vm-push-toggle.active,
#vm-push-toggle.vm-btn-secondary { border-color: var(--vm-secondary); }
