/* --- BASE Y ESTILOS REUTILIZADOS --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary-color: #ff6b35; --secondary-color: #4CAF50; --accent-color: #ff8f65;
    --danger-color: #f44336; --info-color: #2196f3; --light-color: #ffffff; --dark-color: #1a1a1a;
    --gray-100: #f8f9fa; --gray-200: #e9ecef; --gray-300: #dee2e6; --gray-600: #6c757d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 12px; --transition: all 0.3s ease;
}
[data-theme="dark"] {
    --light-color: #1a1a1a; --dark-color: #ffffff; --gray-100: #2d2d2d; --gray-200: #3a3a3a;
    --gray-300: #4a4a4a; --gray-600: #7a7a7a;
}
body {
    font-family: 'Poppins', sans-serif; background: var(--gray-100); color: var(--dark-color);
    transition: background 0.3s, color 0.3s; display: flex; flex-direction: column; height: 100vh; overflow-x: hidden;
}
.sidebar { position: fixed; left: -300px; top: 0; width: 300px; height: 100vh; background: var(--light-color); box-shadow: var(--shadow-lg); transition: var(--transition); z-index: 4000; padding: 2rem 0; }
.sidebar.active { left: 0; }
.sidebar-header { padding: 0 2rem 2rem; border-bottom: 1px solid var(--gray-300); margin-bottom: 1rem; }
.sidebar-title { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 0.5rem; }
.sidebar-menu { list-style: none; }
.sidebar-menu li { margin: 0.5rem 0; }
.sidebar-menu a { display: flex; align-items: center; padding: 1rem 2rem; color: var(--dark-color); text-decoration: none; transition: var(--transition); font-weight: 500; }
.sidebar-menu a:hover { background: var(--gray-100); color: var(--primary-color); transform: translateX(5px); }
.sidebar-menu i { margin-right: 1rem; font-size: 1.2rem; }
.theme-toggle { display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; cursor: pointer; transition: var(--transition); }
.toggle-switch { position: relative; width: 50px; height: 25px; background: var(--gray-300); border-radius: 15px; cursor: pointer; transition: var(--transition); }
.toggle-switch::before { content: ''; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; background: white; border-radius: 50%; transition: var(--transition); }
.toggle-switch.active { background: var(--primary-color); }
.toggle-switch.active::before { transform: translateX(25px); }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 3500; opacity: 0; visibility: hidden; transition: var(--transition); }
.overlay.active { opacity: 1; visibility: visible; }

/* --- HEADER DEL REPARTIDOR --- */
.repartidor-header {
    background: var(--light-color); padding: 1rem 1.5rem; box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 1rem; z-index: 1000;
}
.menu-btn, .options-btn { background: none; border: none; font-size: 1.2rem; color: var(--gray-600); cursor: pointer; flex-shrink: 0; padding: 0.5rem; }
.menu-btn { color: var(--primary-color); font-size: 1.5rem; }
.search-container { flex-grow: 1; position: relative; }
.search-input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.5rem; border: 2px solid var(--gray-200); border-radius: 25px; background: var(--gray-100); }
.search-icon { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--gray-600); }
.options-menu-container { position: relative; }
.dropdown-menu {
    display: none; position: absolute; top: 120%; right: 0; background: var(--light-color);
    border-radius: var(--border-radius); box-shadow: var(--shadow-lg); z-index: 1100;
    width: 250px; overflow: hidden;
}
.dropdown-menu.active { display: block; }
.dropdown-menu a { display: flex; align-items: center; padding: 1rem; color: var(--dark-color); text-decoration: none; transition: background 0.2s; }
.dropdown-menu a:hover { background: var(--gray-100); }
.dropdown-menu i { margin-right: 1rem; width: 20px; color: var(--primary-color); }

/* --- VISTA DE ENTREGA --- */
.delivery-view { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.delivery-details { background: var(--light-color); padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow); flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.delivery-actions { padding: 1.5rem 0; flex-shrink: 0; }

/* Mensaje de espera */
.waiting-message { text-align: center; color: var(--gray-600); }
.waiting-message i { font-size: 4rem; margin-bottom: 1rem; color: var(--gray-300); }
.waiting-message h2 { font-size: 1.5rem; }
.status-active { color: var(--secondary-color); }
.status-inactive { color: var(--danger-color); }

/* Detalles del pedido */
.info-card { margin-bottom: 1.5rem; }
.info-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--gray-200); padding-bottom: 0.5rem; }
.info-card h3 i { margin-right: 0.75rem; }
.info-card p { margin-bottom: 0.25rem; }

/* Botones de acción */
.action-buttons { display: flex; gap: 1rem; }
.action-buttons .btn {
    flex-grow: 1; padding: 1.2rem; font-size: 1.2rem; font-weight: 600;
    border: none; border-radius: var(--border-radius); cursor: pointer; transition: var(--transition);
}
.btn-accept { background: var(--secondary-color); color: white; }
.btn-reject { background: var(--danger-color); color: white; }

.status-buttons { display: flex; flex-direction: column; gap: 1rem; }
.status-buttons .btn {
    width: 100%; padding: 1rem; font-size: 1rem; font-weight: 500;
    border: 2px solid var(--gray-300); background: transparent; color: var(--dark-color);
    border-radius: var(--border-radius); cursor: pointer; text-align: left;
    display: flex; align-items: center; transition: var(--transition);
}
.status-buttons .btn:hover { background: var(--gray-100); border-color: var(--primary-color); }
.status-buttons .btn.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.status-buttons .btn i { margin-right: 1rem; }