:root {
    /* Fondo principal */
    --bg-dark: #F1F5F9; /* Fondo gris muy claro */
    --bg-main: #F8FAFC; /* Contenido principal */
    --bg-card: #FFFFFF; /* Tarjetas blancas */
    --bg-hover: #F1F5F9;
    
    /* Textos */
    --text-main: #1E293B; /* Slate 800 */
    --text-muted: #64748B; /* Slate 500 */
    --text-light: #94A3B8; /* Slate 400 */
    
    /* Colores Acento Corporativo (Azul vibrante) */
    --primary: #3B82F6; /* Blue 500 */
    --primary-hover: #2563EB; /* Blue 600 */
    --primary-light: #EFF6FF; /* Blue 50 */
    
    /* Bordes y Divisiones */
    --border: #E2E8F0; /* Slate 200 */
    
    /* Status Colors */
    --success: #10B981; /* Emerald 500 */
    --success-light: #D1FAE5; /* Emerald 50 */
    --warning: #F59E0B; /* Amber 500 */
    --warning-light: #FEF3C7; /* Amber 50 */
    --info: #3B82F6; /* Blue 500 */
    --info-light: #DBEAFE; /* Blue 100 */
    --danger: #EF4444; /* Red 500 */

    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Premium Soft Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-dark);
    background-image: url('fondo%20roditrack%20new.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    justify-content: center;
}

/* Utilities */
.hidden { display: none !important; }

/* Visibilidad por Rol */
.client-only, .coord-only { display: none !important; }
body.role-cliente .client-only { display: inline-flex !important; }
body.role-coord .coord-only { display: inline-flex !important; }
body.role-cliente .coord-only { display: none !important; }
.flex-1 { flex: 1; }
.w-100 { width: 100%; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.pb-2 { padding-bottom: 0.5rem; }

/* Buttons Premium */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.primary-btn {
    background-color: var(--primary);
    color: #fff;
    padding: 14px 24px;
    border-radius: 40px; /* Pill shape */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}
.primary-btn:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59,130,246,0.23); }
.primary-btn.large { padding: 16px 32px; font-size: 1.05rem; }

.outline-btn {
    border: 2px solid var(--border);
    padding: 12px 24px;
    border-radius: 40px;
    background: #fff;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}
.outline-btn:hover { border-color: var(--text-muted); background: var(--bg-hover); }

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
}

/* Custom Dropdown for Column Status */
.custom-dropdown {
    position: relative;
    display: inline-block;
    min-width: 140px;
}
.dropdown-header {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.dropdown-header:hover {
    border-color: var(--primary);
}
.dropdown-header i {
    font-size: 0.7rem;
    color: #64748B;
    transition: transform 0.2s;
}
.dropdown-list.show ~ .dropdown-header i {
    transform: rotate(180deg);
}
.dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.dropdown-list.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
}
.dropdown-item:hover {
    background: var(--bg-hover);
}
.dropdown-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.back-btn:hover { background: var(--bg-hover); }
.icon-btn { padding: 8px; font-size: 1.2rem; color: var(--text-muted); }
.icon-btn:hover { color: var(--primary); }

/* Screens & Structure Wrappers */
.screen {
    width: 100vw;
    height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    background-color: transparent; /* Makes body background visible */
}

/* --- LOGIN SCREEN --- */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(circle at top right, rgba(82, 181, 212, 0.15), transparent 60%);
}
.login-card {
    background: var(--bg-card);
    padding: 56px 48px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    border: none;
    box-shadow: var(--shadow-lg);
}
.login-card .logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--text-main);
}
.login-card .logo-container i { font-size: 2.2rem; color: var(--primary); }
.login-subtitle { color: var(--text-muted); margin-bottom: 32px; }

.role-selector {
    display: flex;
    background: #F8FAFC; /* light gray */
    border-radius: 40px;
    padding: 6px;
    margin-bottom: 24px;
}
.role-btn {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    color: var(--text-muted);
    font-weight: 600;
}
.role-btn.active {
    background: #FFFFFF;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
input, select, textarea {
    padding: 14px 18px;
    border: none;
    background: #F8FAFC;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px var(--primary-light), inset 0 0 0 1px var(--primary);
}
.form-row { display: flex; gap: 16px; }

/* --- APP SCREEN --- */
#app-screen { display: flex; }

/* Sidebar */
#sidebar {
    width: 280px;
    background-color: var(--bg-card);
    margin: 0;
    border-radius: 0 24px 24px 0;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: none;
    height: 100vh;
}
.sidebar-header {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-box {
    background: transparent;
    color: var(--primary);
}
.logo-text h1 { font-size: 1.25rem; font-weight: 700; color: var(--text-main); }
.logo-text p { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; }

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    overflow-y: auto;
}
.nav-item {
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-lg);
    width: 100%;
    text-align: left;
}
.nav-item:hover { background: var(--bg-main); color: var(--text-main); }
.nav-item.active { background: var(--bg-main); color: var(--primary); }
.nav-item i { width: 22px; text-align: center; font-size: 1.1em;}
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }

/* Main Content */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}
.header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
}
.header-action h2 { font-size: 1.8rem; font-weight: 700; }
.subtitle { color: var(--text-muted); font-size: 0.95rem; margin-top: 6px; }

/* Dashboard Cards (Sleek Grid) */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.kpi-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 100% 100%;
    z-index: 0;
    opacity: 0.8;
    pointer-events: none;
}
.kpi-card:nth-child(1)::before, .kpi-card:nth-child(2)::before {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill="%23EFF6FF" d="M30 100 C 50 70, 70 100, 100 40 L 100 100 Z" /></svg>');
}
.kpi-card:nth-child(3)::before {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill="%23FFF7ED" d="M30 100 C 50 70, 70 100, 100 40 L 100 100 Z" /></svg>');
}
.kpi-card:nth-child(4)::before {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill="%23F0FDF4" d="M30 100 C 50 70, 70 100, 100 40 L 100 100 Z" /></svg>');
}

.kpi-info { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 0.85rem; 
    font-weight: 700; 
    color: #64748B; 
    z-index: 1; 
}
.kpi-card h3 { 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: #0F172A; 
    z-index: 1; 
}
.kpi-subtitle { 
    z-index: 1; 
    color: #94A3B8; 
    font-size: 0.85rem; 
    font-weight: 500;
}
.kpi-icon { 
    width: 38px; 
    height: 38px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.1rem; 
    z-index: 1;
}
.kpi-icon.blue { background: #EFF6FF; color: #3B82F6; }
.kpi-icon.info { background: #EFF6FF; color: #3B82F6; } /* Matching Image 1 for En Proceso */
.kpi-icon.success { background: #F0FDF4; color: #22C55E; }
.kpi-icon.warning { background: #FFF7ED; color: #F59E0B; }

.filters { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-tag { padding: 8px 24px; border: 1px solid var(--border); border-radius: 40px; background: var(--bg-card); color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: all 0.3s; }
.filter-tag:hover { background: var(--bg-hover); color: var(--text-main); }
.filter-tag.active { background: var(--primary-light); color: var(--primary); border-color: transparent; }

.embarques-list { display: flex; flex-direction: column; gap: 16px; }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px dashed #CBD5E1;
}
.empty-state img { width: 280px; max-width: 100%; object-fit: contain; margin-bottom: -10px; }
.empty-state h3 { font-size: 1.4rem; font-weight: 700; color: var(--text-main); margin-bottom: -8px; }
.empty-state p { font-size: 0.95rem; color: var(--text-muted); max-width: 400px; margin-bottom: 8px; line-height: 1.5; }
.empty-state-btn {
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 40px;
    padding: 12px 32px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.empty-state-btn:hover { background: #DBEAFE; transform: translateY(-2px); }

.track-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}
.track-item-card:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.track-item-info { flex: 1; }
.track-item-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.track-item-header h4 { font-size: 1.1rem; }

.status-badge {
    padding: 6px 14px; border-radius: 30px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.status-badge.process { background: var(--primary-light); color: var(--primary); }
.status-badge.complete { background: var(--success-light); color: var(--success); }
.status-badge.transit { background: var(--warning-light); color: var(--warning); }

/* Forms & Cards (Nuevo & Seguimiento) */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 24px;
}
.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title i { color: var(--primary); }

.type-selector { display: flex; gap: 16px; }
.type-card {
    flex: 1; position: relative; border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 20px; cursor: pointer; text-align: center; transition: all 0.2s; background: var(--bg-main);
}
.type-card input { position: absolute; opacity: 0; }
.type-card:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.type-card .title { display: block; font-weight: 700; margin-bottom: 4px; color: var(--text-main); font-size: 1.1rem; }
.type-card:has(input:checked) .title { color: var(--primary); }
.type-card .desc { font-size: 0.85rem; color: var(--text-muted); }

.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-main);
    padding: 40px; text-align: center; color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.file-upload:hover { border-color: var(--primary); color: var(--primary); }
.file-upload i { font-size: 2rem; margin-bottom: 12px; }

/* --- SEGUIMIENTO MULTICOLUMNAS --- */
.tracking-columns-wrapper {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 24px;
    height: 100%;
}
.tracking-column {
    min-width: 380px;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    padding: 24px;
}
.tracking-col-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.tracking-col-header h3 { font-size: 1.3rem; margin-bottom: 6px; display:flex; align-items: center; gap:10px;}
.tracking-col-header h3 i { color: var(--primary); }
.tracking-col-header p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px;}
.col-actions { display: flex; gap: 8px; flex-wrap: wrap;}

/* STEPPER VERTICAL MODERNO */
.v-stepper { display: flex; flex-direction: column; position: relative; }
/* Linea vertical gris */
.v-stepper::before {
    content: ''; position: absolute; top: 15px; bottom: 30px; left: 16px; width: 3px; background: var(--border); z-index: 1;
}

.v-step {
    display: flex; align-items: flex-start; gap: 16px; position: relative; z-index: 2; margin-bottom: 24px; cursor: pointer; transition: transform 0.2s;
}
.v-step:hover { transform: translateX(4px); }
.v-step-icon {
    width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card); border: 3px solid var(--border);
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; color: var(--text-muted);
    transition: all 0.3s; flex-shrink: 0;
}
.v-step-content {
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; flex: 1; transition: all 0.2s;
}
.v-step-title { font-weight: 600; font-size: 0.95rem; color: var(--text-muted); margin-bottom: 4px; }
.v-step-desc { font-size: 0.8rem; color: #666; }

/* Vertically Active */
.v-step.active .v-step-icon { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.v-step.active .v-step-content { border-color: var(--primary); background: var(--primary-light); }
.v-step.active .v-step-title { color: var(--primary); }

/* Vertically Completed */
.v-step.completed .v-step-icon { background: var(--primary); border-color: var(--primary); color: #fff; }
.v-step.completed .v-step-title { color: var(--text-light); }

.input-with-icon { position: relative; }
.input-with-icon input { width: 100%; padding-right: 48px; }
.input-with-icon i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.input-with-icon i:hover { color: var(--text-main); }

/* Detalles Información list */
.info-list { display: flex; flex-direction: column; gap: 16px; }
.info-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-label { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px;}
.info-value { font-weight: 600; font-size: 1.05rem; }

/* CUSTOM SELECT DROPDOWN */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}
.select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.select-trigger:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}
.select-trigger i {
    transition: transform 0.3s;
    color: var(--text-muted);
}
.custom-select.open .select-trigger {
    border-color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 0 2px var(--primary-light);
}
.custom-select.open .select-trigger i:last-child {
    transform: rotate(180deg);
}
.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1c1c1e;
    border: 1px solid var(--primary);
    border-top: none;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}
.custom-select.open .select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.select-options .option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
}
.select-options .option i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
}
.select-options .option:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.select-options .option.selected {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* --- VISTA DE DETALLE (Stepper horizontal + Cards grid) --- */
.detail-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 0;
}
.btn-ver-detalle {
    margin-top: 20px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
    font-weight: 500;
}
.btn-ver-detalle:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* LIVE TRACKING IFRAME PANEL */
.live-tracking-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 400px;
    position: relative;
    margin-bottom: 24px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}
.live-tracking-header {
    background: rgba(0,0,0,0.3);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
}
.live-tracking-content {
    height: calc(100% - 45px);
    width: 100%;
}
.live-tracking-content iframe {
    filter: invert(90%) hue-rotate(180deg) brightness(1.2); /* Tinted for dark mode if it's a map */
}
.pulse-icon {
    width: 8px; height: 8px; background: var(--success); border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    animation: pulse 2s infinite;
}
#btn-map-help:hover {
    background: rgba(255,255,255,0.1) !important;
    color: var(--primary) !important;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(52, 199, 89, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

/* ===== HORIZONTAL STEPPER ===== */
.h-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 0 8px;
}
/* Linea base horizontal */
.h-stepper::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #E2E8F0;
    z-index: 0;
}
/* Linea de progreso (inyectada via JS) */
.h-stepper-progress {
    position: absolute;
    top: 24px;
    left: 60px;
    height: 2px;
    background: #3B82F6;
    z-index: 1;
    border-radius: 2px;
    transition: width 0.5s ease;
}
.h-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    transition: transform 0.2s;
}
.h-step:hover { transform: translateY(-2px); }
.h-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 12px;
    transition: all 0.3s;
    flex-shrink: 0;
    box-shadow: 0 0 0 8px white;
}
.h-step-label {
    font-size: 0.75rem;
    color: #64748B;
    font-weight: 500;
    text-align: center;
    max-width: 100px;
    line-height: 1.3;
}
/* Active */
.h-step.active .h-step-icon {
    border-color: #3B82F6;
    color: #3B82F6;
    box-shadow: 0 0 0 4px #EFF6FF, 0 0 0 8px white;
    background: white;
}
.h-step.active .h-step-label { color: #3B82F6; font-weight: 600; }
/* Completed */
.h-step.completed .h-step-icon {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
    box-shadow: 0 0 0 8px white;
}
/* --- DETAIL VIEW CSS --- */
#bottom-info-section.hidden {
    display: none;
}
#btn-toggle-info {
    transition: background 0.2s;
}
#btn-toggle-info:hover {
    background: #F1F5F9;
}

/* --- DATA TABLE STYLES --- */
.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.15);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}
.data-table th, .data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.data-table td {
    color: var(--text-main);
    vertical-align: middle;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Lavado Form Grid */
.lavado-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Navegación Móvil (Oculta en Desktop) */
.mobile-top-bar { display: none; }
.bottom-nav { display: none; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .detail-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 932px) {
    #sidebar { display: none !important; }
    
    /* Configuración del contenedor principal para dar espacio a la navegación */
    #app-screen { flex-direction: column; }
    #main-content { 
        padding: 0 16px 90px 16px; /* 90px abajo para no solapar con la barra */
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Top App Bar Móvil */
    .mobile-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0;
        margin-bottom: 16px;
        position: sticky;
        top: 0;
        background: var(--bg-main);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        z-index: 50;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    /* Ocultar el header-action por defecto de desktop si choca, o ajustarlo */
    .header-action h2 { font-size: 1.5rem; }
    .header-action { flex-direction: column; align-items: flex-start; margin-bottom: 24px; }
    #btn-header-nuevo, #btn-logout-client { display: none !important; } /* Ocultar botones de header en móvil que ahora están en bottom nav/top bar */
    
    /* Bottom Navigation Bar */
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background: rgba(28, 28, 30, 0.85); /* Glassmorphism oscuro premium */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom); /* Soporte para notch iOS */
        box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    }
    
    .b-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--text-muted);
        flex: 1;
        height: 100%;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 6px;
    }
    
    .b-nav-item i {
        font-size: 1.3rem;
        transition: transform 0.2s, color 0.2s;
    }
    
    .b-nav-item span {
        font-size: 0.65rem;
        font-weight: 500;
        opacity: 0.8;
    }
    
    .b-nav-item:hover { color: var(--text-light); }
    
    .b-nav-item.active {
        color: var(--primary);
    }
    
    .b-nav-item.active i {
        transform: translateY(-2px);
        color: var(--primary);
        filter: drop-shadow(0 0 8px rgba(82, 181, 212, 0.6));
    }
    
    .b-nav-item.active span {
        opacity: 1;
        font-weight: 700;
    }
    
    /* Ajustes varios para móvil */
    .track-actions { align-self: flex-start; margin-top: 10px; }
    .track-header-info { margin-left: 0; margin-top: 10px; }
    .h-step-label { font-size: 0.6rem; max-width: 60px; }
    .h-step-icon { width: 28px; height: 28px; font-size: 0.7rem; }
    .login-card { padding: 32px 24px; border-radius: 20px; }
    .kpi-container { grid-template-columns: 1fr 1fr; gap: 12px; }
    .kpi-card { padding: 16px; }
    .kpi-card h3 { font-size: 1.6rem; }
    .content-card { padding: 20px; border-radius: 16px; }
    
    /* Botones grandes a todo el ancho en móvil */
    .form-row { flex-direction: column; gap: 0; }
    
    /* Detail View Grid Responsiveness */
    .detail-grid-layout {
        grid-template-columns: 1fr !important;
    }
    .detail-column-right {
        min-height: 400px !important;
    }
    
    /* Lavado Form Responsivo */
    .lavado-form-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

/* Específico para modo Horizontal (Landscape) en móviles */
@media (max-width: 932px) and (orientation: landscape) {
    .bottom-nav { height: 50px; }
    .b-nav-item i { font-size: 1.1rem; }
    .b-nav-item span { font-size: 0.6rem; }
    .b-nav-item { padding-top: 4px; }
    #main-content { padding-bottom: 60px; }
    .mobile-top-bar { padding: 8px 0; margin-bottom: 8px; }
    .content-card { padding: 16px; }
}

/* Lavado de Contenedor Styles */
.photo-upload-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.photo-upload-box label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.upload-area {
    width: 100%;
    height: 150px;
    background: rgba(255,255,255,0.03);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
}
.upload-area:hover, .upload-area:focus {
    border-color: var(--primary);
    background: rgba(82, 181, 212, 0.05);
    outline: none;
}
.upload-area:focus {
    box-shadow: 0 0 0 3px var(--primary-light);
}
.upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upload-area i {
    font-size: 2rem;
    color: var(--text-muted);
}
.btn-remove-photo {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.9);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.btn-remove-photo:hover {
    background: #ff4757;
    transform: scale(1.1);
}
