/* ═══════════════════════════════════════════════════════════════
   GMAO AGV Manager — Premium Light Theme
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Artisteril Corporate Theme Colors */
    --bg-primary: #f0f7fb;      /* Pale sky blue tinted background */
    --bg-secondary: #ffffff;    /* Pure white for cards/inputs */
    --bg-sidebar: #1c2833;      /* Dark Slate/Navy sidebar */
    --bg-card: #ffffff;
    --bg-card-hover: #f9fcfe;   /* Slightly cool white */
    --bg-input: #ffffff;
    --bg-modal: #ffffff;
    
    /* Acentos Artisteril */
    --accent-primary: #0ebfba;  /* Azul Turquesa corporativo */
    --accent-primary-glow: rgba(14, 191, 186, 0.1);
    --accent-secondary: #0ea5e9; /* Azul Celeste corporativo */
    --accent-secondary-glow: rgba(14, 165, 233, 0.1);
    --accent-warning: #f39c12;  /* Orange */
    --accent-danger: #e74c3c;   /* Red */
    --accent-success: #2ecc71;  /* Green */
    --accent-orange: #f39c12;
    
    /* Texto */
    --text-primary: #333333;    /* Dark gray for readability */
    --text-secondary: #7f8c8d;  /* Slate gray for muted text */
    --text-muted: #95a5a6;
    --text-accent: var(--accent-primary);
    
    /* Bordes & Sombras */
    --border-color: #ebedef;
    --border-active: var(--accent-primary);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 15px rgba(14, 191, 186, 0.2);
    
    /* Radios */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Sidebar */
    --sidebar-width: 260px;
    
    /* Transiciones */
    --transition: all 0.25s ease;

    /* Nuevas variables de soporte para temas */
    --bg-list-stripe: #fafafa;
    --bg-hover: #f5f8fa;
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM DARK THEME OVERRIDES
   ═══════════════════════════════════════════════════════════════ */
html[data-theme="dark"], body.dark-mode {
    --bg-primary: #0a0f1d;      /* Deep midnight blue-black */
    --bg-secondary: #111827;    /* Sleek slate gray-blue */
    --bg-card: #111827;
    --bg-card-hover: #1e293b;   /* Beautiful slate gray */
    --bg-input: #1f2937;
    --bg-modal: #111827;
    
    --text-primary: #f8fafc;    /* Clean off-white */
    --text-secondary: #94a3b8;  /* Cool slate gray */
    --text-muted: #64748b;
    
    --border-color: #1e293b;
    --border-active: var(--accent-primary);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.6);
    
    --bg-list-stripe: #182235;  /* High premium dark list stripe */
    --bg-hover: #1e293b;        /* Hover background */
}


/* ═══ Reset & Base ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar personalizada */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ═══ FLOATING TOP NAVBAR ═══ */
.top-navbar {
    position: sticky;
    top: 16px;
    margin: 16px 32px 0 32px;
    z-index: 1000;
    
    background: rgba(28, 40, 51, 0.85); /* Dark Glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px; /* Fully rounded pill shape */
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: var(--transition);
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 12px;
}

.navbar-logo .logo-icon {
    font-size: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 4px 10px var(--accent-secondary-glow);
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text-group .logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.logo-text-group .logo-sub {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    padding: 4px 0;
}

.navbar-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 100px;
    z-index: -1;
}

.nav-item:hover {
    color: #ffffff;
    transform: translateY(-1px);
}
.nav-item:hover::before {
    opacity: 0.05;
}

.nav-item.active {
    color: #ffffff;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1);
}

.nav-item .material-icons-round { 
    font-size: 20px; 
    transition: transform 0.3s ease;
}

.nav-item.active .material-icons-round {
    color: var(--accent-primary);
}

.nav-item:hover .material-icons-round {
    transform: scale(1.1);
}

/* ═══ MAIN CONTENT ═══ */
.main-content {
    margin-left: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    z-index: 50;
    margin-top: 4px;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-primary);
}

.gmao-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--accent-secondary-glow);
    border: 1px solid var(--accent-secondary);
    border-radius: 20px;
    color: var(--accent-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.gmao-badge .material-icons-round { font-size: 16px; }

.content-area {
    flex: 1;
    padding: 24px 32px;
}

/* ═══ KPI CARDS ═══ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

.kpi-card:hover { transform: translateY(-6px) scale(1.02); }

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.kpi-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    background: #ffffff;
    padding: 2px;
}

/* Bright solid Color Variants */
.kpi-card.emerald { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.kpi-card.turquoise { background: linear-gradient(135deg, #0ebfba 0%, #088f8b 100%); }
.kpi-card.blue { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.kpi-card.purple { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.kpi-card.red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.kpi-card.orange { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.kpi-card.yellow { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.kpi-card.indigo { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }
.kpi-card.green { background: linear-gradient(135deg, #22c55e 0%, #15803d 100%); }
.kpi-card.teal { background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%); }
.kpi-card.grey { background: linear-gradient(135deg, #6b7280 0%, #374151 100%); }

.kpi-card.emerald:hover { box-shadow: 0 15px 30px rgba(16, 185, 129, 0.3); }
.kpi-card.turquoise:hover { box-shadow: 0 15px 30px rgba(14, 191, 186, 0.3); }
.kpi-card.blue:hover { box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3); }
.kpi-card.red:hover { box-shadow: 0 15px 30px rgba(239, 68, 68, 0.3); }
.kpi-card.orange:hover { box-shadow: 0 15px 30px rgba(249, 115, 22, 0.3); }
.kpi-card.yellow:hover { box-shadow: 0 15px 30px rgba(245, 158, 11, 0.3); }
.kpi-card.indigo:hover { box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3); }
.kpi-card.green:hover { box-shadow: 0 15px 30px rgba(34, 197, 94, 0.3); }
.kpi-card.teal:hover { box-shadow: 0 15px 30px rgba(20, 184, 166, 0.3); }
.kpi-card.grey:hover { box-shadow: 0 15px 30px rgba(107, 114, 128, 0.3); }

.kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.kpi-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

/* ═══ HERO SECTION (Dashboard) ═══ */
.dashboard-hero {
    background: linear-gradient(-45deg, var(--bg-sidebar), var(--accent-secondary), var(--accent-primary), var(--bg-sidebar));
    background-size: 400% 400%;
    animation: gradientHero 15s ease infinite;
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

@keyframes gradientHero {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    border-radius: 50%;
}

.hero-info { position: relative; z-index: 1; }
.hero-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-desc { color: rgba(255,255,255,0.8); font-size: 1rem; font-weight: 500; }

.hero-actions {
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* ═══ DASHBOARD ALERTS ═══ */
.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.alert-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.alert-panel-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.alert-panel-header.urgent {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
}
.alert-panel-header.urgent .material-icons-round { color: #dc2626; }

.alert-panel-header.upcoming {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
}
.alert-panel-header.upcoming .material-icons-round { color: #ea580c; }

.alert-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.alert-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.alert-item:hover {
    background: rgba(0,0,0,0.02);
    transform: translateX(4px);
}

.alert-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 16px;
}
.alert-dot.overdue { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.alert-dot.upcoming { background: #f97316; box-shadow: 0 0 8px rgba(249, 115, 22, 0.4); }

.alert-info { flex: 1; }
.alert-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.alert-detail { font-size: 0.85rem; color: var(--text-secondary); }

.alert-date { text-align: right; }
.days-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.days-badge.overdue { background: #fee2e2; color: #dc2626; }
.days-badge.soon { background: #ffedd5; color: #ea580c; }
.alert-date .date { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.alert-date .label { font-size: 0.75rem; color: var(--text-muted); display: block; }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.btn .material-icons-round { font-size: 20px; }

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 6px var(--accent-primary-glow);
}
.btn-primary:hover {
    background: var(--accent-secondary);
    box-shadow: 0 6px 12px var(--accent-secondary-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-muted);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-icon.danger:hover { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }

/* ═══ CARDS ═══ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.card:hover { border-color: var(--accent-secondary); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.card-subtitle { color: var(--text-secondary); font-size: 0.85rem; }

/* ═══ INTERACTIVE STYLED CARDS ═══ */
.styled-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.styled-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--accent-secondary-glow);
    z-index: 10;
}

/* ═══ CLIENT CARDS ═══ */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.client-card {
    border: 1px solid transparent;
}
.client-card:hover { border-color: var(--accent-secondary); }

.client-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.client-card-body { padding: 20px; }

.client-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.client-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.client-logo .material-icons-round { font-size: 28px; color: var(--text-muted); }

.client-name { font-size: 1rem; font-weight: 700; }
.client-contact { font-size: 0.8rem; color: var(--text-secondary); }

.agv-count-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.agv-count-badge .material-icons-round { font-size: 16px; }

.client-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.client-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.client-detail-row .material-icons-round { font-size: 16px; color: var(--text-muted); }

.client-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.client-card-actions .btn-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: var(--transition);
}

.client-card-actions .btn-link:hover { color: #00e6b8; }

.client-card-actions .btn-link .material-icons-round { font-size: 18px; }

.actions-right {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

/* ═══ SEARCH BAR ═══ */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 20px;
    max-width: 500px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.search-bar .material-icons-round { color: var(--text-muted); }

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.search-bar input::placeholder { color: var(--text-muted); }

/* ═══ PAGE HEADER ═══ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
}

.page-header .subtitle { color: var(--text-secondary); font-size: 0.9rem; }

/* ═══ TABLES / LISTS ═══ */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.list-item:nth-child(even) {
    background-color: var(--bg-list-stripe);
}

.list-item:hover {
    background: var(--bg-hover);
}

.list-item:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.list-item:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    border-bottom: none;
}

.list-container {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.list-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══ BADGES / TAGS ═══ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--accent-success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.badge-info { background: rgba(14, 165, 233, 0.15); color: var(--accent-secondary); }
.badge-muted { background: rgba(90, 109, 135, 0.2); color: var(--text-secondary); }

/* Status badges for AGV */
.status-activo { background: rgba(46, 204, 113, 0.15); color: #27ae60; }
.status-inactivo { background: rgba(149, 165, 166, 0.15); color: #7f8c8d; }
.status-en_mantenimiento { background: rgba(243, 156, 18, 0.15); color: #d35400; }
.status-retirado { background: rgba(231, 76, 60, 0.15); color: #c0392b; }

/* ═══ FORMS ═══ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-textarea { min-height: 80px; resize: vertical; }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238899b4'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* File upload */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-zone:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.03);
}

.file-upload-zone .material-icons-round {
    font-size: 36px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.file-upload-zone p { color: var(--text-secondary); font-size: 0.85rem; }

.file-upload-input { display: none; }

/* ═══ MODAL ═══ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

.modal.wide {
    max-width: 1000px;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 { font-size: 1.15rem; font-weight: 700; }

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }

.modal-body { padding: 24px; }

/* ═══ TOAST ═══ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: toastIn 0.4s ease;
    font-size: 0.85rem;
}

.toast.success { border-left: 3px solid var(--accent-success); }
.toast.error { border-left: 3px solid var(--accent-danger); }
.toast.info { border-left: 3px solid var(--accent-secondary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ═══ ALERTS PANEL ═══ */
.alerts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.alert-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.alert-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.alert-panel-header .material-icons-round { font-size: 24px; }
.alert-panel-header.urgent { color: var(--accent-danger); }
.alert-panel-header.upcoming { color: var(--accent-secondary); }

.alert-panel-header h3 { font-size: 1rem; font-weight: 700; }
.alert-panel-header .count-badge {
    margin-left: auto;
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent-secondary);
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.alert-item:last-child { border-bottom: none; }
.alert-item:hover { background: var(--bg-card-hover); }

.alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.alert-dot.overdue { background: var(--accent-danger); }
.alert-dot.upcoming { background: var(--accent-warning); }

.alert-info { flex: 1; }
.alert-name { font-weight: 600; font-size: 0.85rem; }
.alert-detail { font-size: 0.75rem; color: var(--text-secondary); }

.alert-date {
    text-align: right;
    font-size: 0.8rem;
}

.alert-date .date { font-weight: 600; }
.alert-date .label { font-size: 0.7rem; color: var(--text-secondary); }

.days-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.days-badge.overdue { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.days-badge.soon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.empty-state {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

.empty-state .material-icons-round { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* ═══ AGV DETAIL ═══ */
.agv-detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.qr-section {
    flex-shrink: 0;
    text-align: center;
}

.qr-container {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-container img { max-width: 100%; max-height: 100%; }

.qr-label {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.agv-info-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.info-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 1rem; font-weight: 600; margin-top: 2px; }

/* Tabs */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab:hover { color: var(--text-primary); }
.tab.active { background: var(--bg-card); color: var(--accent-primary); box-shadow: var(--shadow-sm); }

/* Image gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover { border-color: var(--accent-primary); }

.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.gallery-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: var(--accent-danger);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-item-delete { opacity: 1; }
.gallery-item-delete .material-icons-round { font-size: 16px; }

/* File list */
.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
}

.file-item:hover { background: var(--bg-card-hover); }
.file-item .material-icons-round { color: var(--accent-danger); font-size: 24px; }
.file-name { flex: 1; font-size: 0.85rem; }

/* ═══ SIGNATURE PAD ═══ */
.signature-section {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.signature-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.signature-canvas-wrapper {
    background: white;
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 8px;
}

.signature-canvas {
    width: 100%;
    height: 150px;
    border-radius: 4px;
    cursor: crosshair;
    touch-action: none;
}

.signature-actions {
    display: flex;
    gap: 8px;
}

.signature-preview {
    width: 200px;
    height: 80px;
    background: white;
    border-radius: var(--radius-sm);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-preview img { max-width: 100%; max-height: 100%; }

/* ═══ BREADCRUMB ═══ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover { color: var(--accent-primary); }
.breadcrumb .separator { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-primary); font-weight: 600; }

/* Bulletin list styles */
.bulletin-number {
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Bulletin number duplicate fix */
.bulletin-item .bulletin-number {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open { transform: translateX(0); }
    
    .mobile-menu-btn { display: flex; }
    
    .main-content { margin-left: 0; }
    
    .content-area { padding: 16px; }
    
    .top-bar { padding: 12px 16px; }
    
    .clients-grid { grid-template-columns: 1fr; }
    
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    
    .alerts-grid { grid-template-columns: 1fr; }
    
    .agv-detail-header { flex-direction: column; }
    
    .agv-info-grid { grid-template-columns: 1fr; }
    
    .form-row { grid-template-columns: 1fr; }
    
    .dashboard-hero { flex-direction: column; gap: 16px; }
    
    .hero-actions { width: 100%; }
    
    .hero-actions .btn { flex: 1; justify-content: center; }
    
    .page-header { flex-direction: column; align-items: flex-start; }

    .modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

/* ═══ LOADING ═══ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Contacts section in form */
.contacts-list { margin-top: 8px; }

.contact-entry {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 8px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.contact-entry .form-group { margin-bottom: 0; flex: 1; }

/* ═══ CALENDAR ═══ */
.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-header-cell {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 8px 0;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-cell {
    min-height: 80px;
    padding: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: var(--transition);
}

.calendar-cell.empty { background: transparent; }
.calendar-cell:hover:not(.empty) { border-color: var(--accent-primary); }

.calendar-cell.today {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.08);
}

.calendar-cell.has-events {
    background: rgba(0, 212, 170, 0.05);
}

.calendar-day {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.calendar-cell.today .calendar-day {
    color: var(--accent-primary);
    font-weight: 700;
}

.calendar-event {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    transition: var(--transition);
}

.calendar-event:hover { opacity: 0.8; }

.calendar-event.preventivo {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.calendar-event.boletin {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

/* ═══ ARTISTERIL REPORT STYLES ═══ */
.report-container {
    background: #fff;
    max-width: 1000px;
    margin: 20px auto;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    color: #333;
    font-family: 'Inter', sans-serif;
}

.report-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.brand-info h1 {
    color: var(--accent-primary);
    text-transform: uppercase;
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.brand-details {
    font-size: 0.75rem;
    color: #777;
    line-height: 1.4;
}

.report-meta {
    text-align: right;
}

.report-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-secondary);
    margin-bottom: 10px;
}

.meta-row {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.meta-row strong { color: #555; }

.banner-teal {
    background: var(--accent-primary);
    color: #fff;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.banner-navy {
    background: #1a2533;
    color: #fff;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: 600;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-top: 25px;
}

.info-section {
    margin-bottom: 25px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 10px;
}

.field {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
    font-size: 0.9rem;
}

.field .label { font-weight: 700; color: #555; width: 80px; }
.field .value { color: #000; font-weight: 500; }

.checklist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.checklist-table th {
    background: #f8f9fa;
    text-align: left;
    padding: 10px;
    border: 1px solid #eee;
    color: #666;
    font-weight: 700;
}

.checklist-table td {
    padding: 8px 10px;
    border: 1px solid #eee;
}

.status-box {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.status-box.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.status-box.active .material-icons-round { font-size: 18px; }

.report-footer {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.sig-box {
    text-align: center;
}

.sig-box p {
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 60px;
    color: #777;
}

.sig-line {
    border-top: 1px solid #333;
    width: 80%;
    margin: 0 auto;
}

/* ═══ RESPONSIVE & MOBILE ═══ */
@media (max-width: 1024px) {
    .top-navbar {
        margin: 8px 16px 0 16px;
        flex-direction: column;
        border-radius: 24px;
        padding: 16px;
        gap: 16px;
    }
    .navbar-nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .nav-item {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .top-bar {
        padding: 12px 16px;
    }
    .content-area {
        padding: 16px;
    }
}

/* ═══ MOBILE BOTTOM APP BAR (Responsive Web) ═══ */
@media (max-width: 768px) {
    /* Ocultar botones irrelevantes en móvil */
    #nav-dashboard, #nav-zones, #nav-clients, #nav-calendar, #nav-users, #nav-settings {
        display: none !important;
    }

    /* Convertir el header top-navbar en una barra inferior */
    .top-navbar {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 10px 16px 20px 16px !important; /* Padding extra abajo para móviles */
        background: rgba(28, 40, 51, 0.95) !important;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.2) !important;
        z-index: 9999 !important;
    }

    /* Ocultar el logo en el móvil para dejar espacio a los iconos */
    .navbar-logo {
        display: none !important;
    }

    /* Distribución de la barra inferior */
    .navbar-nav {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        width: 100% !important;
        gap: 0 !important;
        padding: 0 !important;
    }

    .nav-item {
        flex-direction: column !important;
        padding: 4px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        gap: 4px !important;
        flex: 1;
        justify-content: center;
        align-items: center;
    }

    .nav-item .material-icons-round {
        font-size: 24px !important;
    }

    .nav-item .nav-text {
        font-size: 0.65rem !important;
        font-weight: 600 !important;
        opacity: 0.8;
    }

    /* Resaltar el botón QR en el centro */
    .nav-item.qr-scanner-btn {
        position: relative;
        top: -20px;
        flex: 0 0 65px;
    }

    .nav-item.qr-scanner-btn .material-icons-round {
        background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
        color: #fff !important;
        padding: 16px !important;
        border-radius: 50% !important;
        font-size: 30px !important;
        box-shadow: 0 8px 25px rgba(14, 191, 186, 0.5) !important;
        border: 4px solid var(--bg-primary) !important;
    }
    
    .nav-item.qr-scanner-btn .nav-text {
        color: var(--accent-primary) !important;
        opacity: 1;
        font-weight: 800 !important;
    }

    /* Añadir margen inferior al main-content para que la barra no tape el contenido */
    .main-content {
        padding-bottom: 90px !important;
    }
}

/* ═══ AGV CARDS ═══ */
.agvs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.agv-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid transparent;
}
.agv-card:hover { border-color: var(--accent-primary); }

.agv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.agv-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(0,212,170,0.1);
    color: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agv-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
}
.agv-status-badge.status-activo { background: #dcfce7; color: #166534; }
.agv-status-badge.status-inactivo { background: #f3f4f6; color: #4b5563; }
.agv-status-badge.status-en_mantenimiento { background: #fef08a; color: #854d0e; }
.agv-status-badge.status-retirado { background: #fee2e2; color: #991b1b; }

.agv-card-body { flex: 1; }

.agv-name {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.agv-type, .agv-serial {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.agv-serial .material-icons-round { font-size: 14px; }

.agv-card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: flex-end;
}

.view-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s;
}

.agv-card:hover .view-link { transform: translateX(4px); }

/* ═══ PRINT STYLES ═══ */
@media print {
    .top-navbar, .top-bar, .no-print, .breadcrumb, .form-actions { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    .report-container { 
        box-shadow: none !important; 
        padding: 0 !important; 
        max-width: 100% !important;
        margin: 0 !important;
    }
    body { background: #fff !important; }
}

/* ═══ FICHAJES VIEW ═══ */

.fichajes-kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}
.fichajes-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--kpi-color, var(--accent-primary));
}
.fichajes-kpi-card .material-icons-round {
    font-size: 2rem;
    color: var(--kpi-color, var(--accent-primary));
    background: rgba(14,191,186,0.1);
    padding: 12px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.fichajes-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.fichajes-kpi-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fichajes-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}
.fichajes-date-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
}
.fichajes-date-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.fichajes-day-group {
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.fichajes-day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(90deg, var(--bg-primary), var(--bg-card));
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.fichajes-day-header .material-icons-round {
    font-size: 1.1rem;
    color: var(--accent-primary);
}
.fichajes-day-count {
    margin-left: auto;
    background: var(--accent-primary-glow);
    color: var(--accent-primary);
    border: 1px solid rgba(14,191,186,0.3);
    border-radius: 100px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.fichaje-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}
.fichaje-item:last-child { border-bottom: none; }
.fichaje-item:hover { background: var(--bg-primary); }

.fichaje-event-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fichaje-event-icon .material-icons-round { font-size: 1.4rem; }

.fichaje-info { flex: 1; min-width: 0; }
.fichaje-event-label { font-weight: 700; font-size: 0.95rem; }
.fichaje-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 3px;
}
.fichaje-meta .material-icons-round { vertical-align: middle; }

.fichaje-location { flex-shrink: 0; }

.fichaje-gps-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: rgba(59,130,246,0.08);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,0.25);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
}
.fichaje-gps-btn:hover {
    background: rgba(59,130,246,0.18);
    border-color: #3b82f6;
    transform: translateY(-1px);
}
.fichaje-gps-btn .material-icons-round { font-size: 1rem; }
.fichaje-coords {
    font-family: monospace;
    font-size: 0.75rem;
}

/* ═══ INTERACTIVE PDF SHEET FORM (A4 STYLE) ═══ */
.pdf-sheet {
    max-width: 900px;
    margin: 25px auto;
    padding: 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #1a202c;
}

.pdf-sheet-header {
    background: #1c2833;
    padding: 24px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    border-bottom: 4px solid #0ebfba;
}

.pdf-sheet-header .logo-area h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    color: #ffffff;
    text-transform: lowercase;
}

.pdf-sheet-header .logo-area p {
    font-size: 0.72rem;
    letter-spacing: 1px;
    margin: 2px 0 0 0;
    opacity: 0.75;
    text-transform: uppercase;
}

.pdf-sheet-header .title-area {
    text-align: right;
}

.pdf-sheet-header .title-area h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.pdf-sheet-header .title-area .meta-row {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    justify-content: flex-end;
    align-items: center;
}

.pdf-sheet-header .title-area .meta-row input {
    background: rgba(255,255,255,0.08);
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 4px;
    color: #ffffff;
    padding: 3px 8px;
    font-size: 0.85rem;
    width: 100px;
    text-align: center;
    outline: none;
    font-weight: 600;
}

.pdf-sheet-header .title-area .meta-row input[type="date"] {
    width: 135px;
}

.pdf-sheet-section-title {
    background: #0ebfba;
    color: #ffffff;
    font-weight: 700;
    padding: 8px 16px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 25px 36px 12px 36px;
    border-radius: 3px;
}

.pdf-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
    padding: 10px 36px;
}

.pdf-sheet-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.pdf-sheet-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pdf-sheet-field label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdf-sheet-input, .pdf-sheet-select {
    border: none;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 0;
    padding: 6px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
    background: transparent;
    outline: none;
    transition: all 0.2s ease;
}

.pdf-sheet-input:focus, .pdf-sheet-select:focus {
    border-bottom-color: #0ebfba;
}

.pdf-sheet-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23718096'%3E%3Cpath d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.pdf-sheet-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    background: #f8fafc;
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pdf-sheet-textarea:focus {
    border-color: #0ebfba;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(14,191,186,0.1);
}

.pdf-sheet-textarea-container {
    padding: 10px 36px;
}

/* Materials Table Style */
.pdf-materials-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.pdf-materials-table th {
    background: #0ebfba;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    text-align: left;
}

.pdf-materials-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #edf2f7;
}

.pdf-materials-table tr:hover {
    background: #f7fafc;
}

.pdf-materials-table input, .pdf-materials-table select {
    width: 100%;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 4px 0;
    font-size: 0.85rem;
    background: transparent;
    outline: none;
}

.pdf-materials-table input:focus, .pdf-materials-table select:focus {
    border-bottom-color: #0ebfba;
}

.pdf-materials-table .btn-icon {
    border: none;
    background: none;
    color: #e53e3e;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pdf-materials-table .btn-icon:hover {
    background: rgba(229,62,62,0.1);
}

.pdf-sheet-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 15px 36px 30px 36px;
}

.signature-box-pdf {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.signature-box-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signature-box-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.signature-box-footer {
    border-top: 1px solid #e2e8f0;
    padding: 8px 12px;
    background: #f8fafc;
}

.signature-box-footer input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    outline: none;
    color: #2d3748;
}

